5GSEC / 5G-Spector

An O-RAN compliant runtime intrusion detection system (xApp) for layer-3 (L3) celluar attack detection
https://www.5gsec.com
Apache License 2.0
37 stars 6 forks source link

Error when verifying RAN is communicating with the nRT-RIC #4

Closed Mitziu closed 4 weeks ago

Mitziu commented 4 weeks ago

Hello,

I am having an issue with getting the RAN to communicate with the nRT-RIC.

I successfully deployed the ONOS RIC and the Core Network

NAME                           READY   STATUS    RESTARTS   AGE
cassandra-0                    1/1     Running   0          40m
hss-0                          1/1     Running   0          40m
mme-0                          4/4     Running   0          40m
onos-a1t-68c59fb46-n69w6       2/2     Running   0          38m
onos-cli-c7d5b54b4-hxm89       1/1     Running   0          38m
onos-config-5786dbc85c-6r6hv   3/3     Running   0          38m
onos-e2t-5798f554b7-lgkcj      2/2     Running   0          38m
onos-kpimon-555c9fdb5c-k96m8   2/2     Running   0          38m
onos-rsm-7b6d84b5fc-74mg4      2/2     Running   0          38m
onos-topo-6b59c97579-t7j64     2/2     Running   0          38m
onos-uenib-6f65dc66b4-d828c    2/2     Running   0          38m
pcrf-0                         1/1     Running   0          40m
sd-ran-consensus-0             1/1     Running   0          38m
sd-ran-consensus-1             1/1     Running   0          38m
sd-ran-consensus-2             1/1     Running   0          38m
sec-sm-xapp-6d8f56cb46-4g9fn   2/2     Running   0          26s
spgwc-0                        2/2     Running   0          40m
upf-0                          4/4     Running   0          40m

I also ran the ./install_secsm_xapp.sh, encountered the error: no matching resources found but ignored it based on your Troubleshooting section

Release "sec-sm-xapp" has been upgraded. Happy Helming!
NAME: sec-sm-xapp
LAST DEPLOYED: Mon Sep 23 22:52:00 2024
NAMESPACE: riab
STATUS: deployed
REVISION: 2
TEST SUITE: None
error: no matching resources found

I am able to start running the eNodeB and UE using the corresponding commands. However, I am not seeing the output that was expected to verify the RAN Is deployed and communicating with the nRT-RIC. Instead of seeing the following output based on your instructions:

<E2AP-PDU>
   ...
</E2AP-PDU>
[RIC_AGENT]   Encoded succesfully, encoded size = 406
[RIC_AGENT]   Send SCTP data, ranid:0, assoc_id:19, len:406
[RIC_AGENT]   [SECSM] Total UE: 0
[RIC_AGENT]   [2023/8/28 | 2:9:32] ----  Sending KPM RIC Indication, timer_id 600244270 function_id 1---------

I just see the following from the eNodeB terminal:

[RIC_AGENT]   ranid 0 connecting to RIC at 127.0.0.1:36421 with IP 192.168.200.21
[RIC_AGENT]   ranid 0 connecting to RIC at 127.0.0.1:36421 with IP 192.168.200.21
[RIC_AGENT]   ranid 0 connecting to RIC at 127.0.0.1:36421 with IP 192.168.200.21
...

I have double checked the E2T IP, MME IP , and the IP address using the commands provided and they are entered correctly into the ~/enb.conf file.

I have also tried to recompile the OAI binaries from scratch using the provided commands.

I appreciate your help!

onehouwong commented 4 weeks ago

I noticed that from your log your RIC IP is set to 127.0.0.1, which is unusual. Can you provide the output of the RIC E2T node's IP by running kubectl get pods -A -o wide?

Mitziu commented 4 weeks ago

I have just rebooted the machine and adjust the enb.conf file accordingly. This is the output when running the requested command:

vagrant@5g-spector:~/sdran-in-a-box$ kubectl get pods -A -o wide
NAMESPACE            NAME                                                       READY   STATUS      RESTARTS         AGE     IP                NODE         NOMINATED NODE   READINESS GATES
calico-system        calico-kube-controllers-7f7959b5db-64r4q                   1/1     Running     10 (8m24s ago)   362d    192.168.84.139    5g-spector   <none>           <none>
calico-system        calico-node-q6j2s                                          1/1     Running     6 (8m23s ago)    362d    192.168.121.100   5g-spector   <none>           <none>
calico-system        calico-typha-b8d4bcf85-q2cgb                               1/1     Running     5 (8m24s ago)    362d    192.168.121.100   5g-spector   <none>           <none>
default              router                                                     1/1     Running     0                5m45s   192.168.84.156    5g-spector   <none>           <none>
kube-system          atomix-runtime-consensus-controller-6796b7556d-4c4fh       1/1     Running     0                4m38s   192.168.84.153    5g-spector   <none>           <none>
kube-system          atomix-runtime-controller-66cf5558c6-h49m5                 1/1     Running     0                4m38s   192.168.84.133    5g-spector   <none>           <none>
kube-system          atomix-runtime-pod-memory-controller-858ff44659-jlnlz      1/1     Running     0                4m38s   192.168.84.152    5g-spector   <none>           <none>
kube-system          atomix-runtime-raft-controller-6699445c6d-5kr79            1/1     Running     0                4m38s   192.168.84.186    5g-spector   <none>           <none>
kube-system          atomix-runtime-runtime-controller-8d6c956bc-fjvgh          1/1     Running     0                4m38s   192.168.84.131    5g-spector   <none>           <none>
kube-system          atomix-runtime-shared-memory-controller-5479b9564f-nt5mw   1/1     Running     0                4m38s   192.168.84.177    5g-spector   <none>           <none>
kube-system          atomix-runtime-sidecar-controller-7fb56cd648-4c5fq         1/1     Running     0                4m38s   192.168.84.132    5g-spector   <none>           <none>
kube-system          cloud-controller-manager-5g-spector                        1/1     Running     29 (8m15s ago)   362d    192.168.121.100   5g-spector   <none>           <none>
kube-system          etcd-5g-spector                                            1/1     Running     4 (8m23s ago)    362d    192.168.121.100   5g-spector   <none>           <none>
kube-system          helm-install-rke2-calico-crd-mbqbg                         0/1     Completed   0                362d    192.168.121.245   5g-spector   <none>           <none>
kube-system          helm-install-rke2-calico-zd4pd                             0/1     Completed   2                362d    192.168.121.245   5g-spector   <none>           <none>
kube-system          helm-install-rke2-coredns-22678                            0/1     Completed   0                362d    192.168.121.245   5g-spector   <none>           <none>
kube-system          helm-install-rke2-ingress-nginx-6z2lf                      0/1     Completed   0                362d    192.168.84.132    5g-spector   <none>           <none>
kube-system          helm-install-rke2-metrics-server-gdj6j                     0/1     Completed   0                362d    192.168.84.133    5g-spector   <none>           <none>
kube-system          helm-install-rke2-multus-qjmgv                             0/1     Completed   0                362d    192.168.121.245   5g-spector   <none>           <none>
kube-system          kube-apiserver-5g-spector                                  1/1     Running     4 (8m24s ago)    362d    192.168.121.100   5g-spector   <none>           <none>
kube-system          kube-controller-manager-5g-spector                         1/1     Running     29 (8m15s ago)   362d    192.168.121.100   5g-spector   <none>           <none>
kube-system          kube-proxy-5g-spector                                      1/1     Running     4 (8m24s ago)    362d    192.168.121.100   5g-spector   <none>           <none>
kube-system          kube-scheduler-5g-spector                                  1/1     Running     25 (8m23s ago)   362d    192.168.121.100   5g-spector   <none>           <none>
kube-system          onos-operator-app-6f5c4c8656-ms5s6                         1/1     Running     0                4m22s   192.168.84.134    5g-spector   <none>           <none>
kube-system          onos-operator-topo-55cfbdd947-xs272                        1/1     Running     0                4m22s   192.168.84.161    5g-spector   <none>           <none>
kube-system          rke2-coredns-rke2-coredns-775c5b4bb4-pv9bv                 1/1     Running     8 (8m24s ago)    362d    192.168.84.155    5g-spector   <none>           <none>
kube-system          rke2-coredns-rke2-coredns-autoscaler-695fc554c9-q7npw      1/1     Running     8 (8m24s ago)    362d    192.168.84.138    5g-spector   <none>           <none>
kube-system          rke2-ingress-nginx-controller-4sfv7                        1/1     Running     8 (8m24s ago)    362d    192.168.84.176    5g-spector   <none>           <none>
kube-system          rke2-metrics-server-644f588b5-xztv6                        1/1     Running     8 (8m24s ago)    362d    192.168.84.182    5g-spector   <none>           <none>
kube-system          rke2-multus-ds-8qp2q                                       1/1     Running     4 (8m23s ago)    362d    192.168.121.100   5g-spector   <none>           <none>
local-path-storage   local-path-provisioner-67f5f9cb7b-ztkjg                    1/1     Running     8 (8m24s ago)    362d    192.168.84.183    5g-spector   <none>           <none>
riab                 cassandra-0                                                1/1     Running     0                5m39s   192.168.84.185    5g-spector   <none>           <none>
riab                 hss-0                                                      1/1     Running     0                5m39s   192.168.84.190    5g-spector   <none>           <none>
riab                 mme-0                                                      4/4     Running     0                5m39s   192.168.84.144    5g-spector   <none>           <none>
riab                 onos-a1t-68c59fb46-5z7gz                                   2/2     Running     0                4m6s    192.168.84.160    5g-spector   <none>           <none>
riab                 onos-cli-c7d5b54b4-qzl5t                                   1/1     Running     0                4m6s    192.168.84.189    5g-spector   <none>           <none>
riab                 onos-config-5786dbc85c-mzwz8                               3/3     Running     0                4m6s    192.168.84.143    5g-spector   <none>           <none>
riab                 onos-e2t-5798f554b7-fh49p                                  2/2     Running     0                4m6s    192.168.84.159    5g-spector   <none>           <none>
riab                 onos-kpimon-555c9fdb5c-ghwck                               2/2     Running     0                4m6s    192.168.84.154    5g-spector   <none>           <none>
riab                 onos-rsm-7b6d84b5fc-5fmgs                                  2/2     Running     0                4m6s    192.168.84.129    5g-spector   <none>           <none>
riab                 onos-topo-6b59c97579-5b2x2                                 2/2     Running     0                4m6s    192.168.84.191    5g-spector   <none>           <none>
riab                 onos-uenib-6f65dc66b4-dc5qp                                2/2     Running     0                4m6s    192.168.84.181    5g-spector   <none>           <none>
riab                 pcrf-0                                                     1/1     Running     0                5m39s   192.168.84.164    5g-spector   <none>           <none>
riab                 sd-ran-consensus-0                                         1/1     Running     0                4m6s    192.168.84.174    5g-spector   <none>           <none>
riab                 sd-ran-consensus-1                                         1/1     Running     0                4m6s    192.168.84.171    5g-spector   <none>           <none>
riab                 sd-ran-consensus-2                                         1/1     Running     0                4m6s    192.168.84.142    5g-spector   <none>           <none>
riab                 sec-sm-xapp-6d8f56cb46-ccxpv                               2/2     Running     0                2m31s   192.168.84.137    5g-spector   <none>           <none>
riab                 spgwc-0                                                    2/2     Running     0                5m39s   192.168.84.140    5g-spector   <none>           <none>
riab                 upf-0                                                      4/4     Running     0                4m55s   192.168.84.147    5g-spector   <none>           <none>
tigera-operator      tigera-operator-b77ddd45f-rvzx2                            1/1     Running     19 (8m23s ago)   362d    192.168.121.100   5g-spector   <none>           <none>

Thank you for your help!

onehouwong commented 4 weeks ago

Based on the provided log, the E2T address in the enb config should be set to 192.168.84.159. Can you try that?

Mitziu commented 4 weeks ago

That is what it's set to in the ~/enb.conf file

    # Begin RIC-specific settings
    RIC : {
        #remote_ipv4_addr = "192.168.84.129"; # TODO Replace it with the actual RIC e2t Address
        remove_ipv4_addr = "192.168.84.159";
        remote_port = 36421;
        enabled = "yes";
    };
Mitziu commented 4 weeks ago

I have found the the issue, I had an issue with the enb conf file. Thank you!