herlesupreeth / docker_open5gs

Docker files to run open5gs + IMS + eNB + gNB + NR-UE in a docker
BSD 2-Clause "Simplified" License
321 stars 180 forks source link

How to configure Docker host has multiple network interface #72

Closed yasuhirom closed 2 years ago

yasuhirom commented 2 years ago

Hi I am try to run docker open5gs with external eNB. the docker host has multiple network interfaces. (Ubuntu is running on Virtual Box for Windows) One is for Wifi to access internet. DHCP. One is wired lan for connect eNB. Has 192.168.101.6 Last one is virtual host interface to connect terminal. 192.168.6.101.

I follow the instructions. build was successfully done. Open 5GS components seems works fine. But eNB has not been established to MME.

ping from mme docker container is not reached to eNB. I did 'ip route add 172.22.0.0/24 via 192.168.101.6'

build instruction does not have the step for specify which interface is for which purpose. how install script configure each network interface to which purpose? Can I assign it by manually?

s5uishida commented 2 years ago

Hi @yasuhirom

On the Docker host, run tcpdump for all interfaces and check the S1AP between eNB <-> MME. If possible, please share pcap.

(Windows F/W?)

yasuhirom commented 2 years ago

hi @s5uishida

Thank you for your help. I found my mistake. tac in tai section is still unchanged.

Today, s1ap communication is happen(yesterday was not seen it. reboot virtual machine and eNB). but it rejected by unknown PLMN. image

After modified, rebuild, now eNB

yasuhirom commented 2 years ago

UE is attached. but it can access to internet. attached is pcap for any interface. 1) execute 'tcpdump -i any -w internetNotConnect.pcap 2) Air plane mode off on UE 3) access https://www.nhk.or.jp/archives/teaches-i/

SGWU_ADVERTISE_IP and UPF_ADVERTISE_IP is 192.168.101.5 (sorry .6 is my mistake)

How I can route the data traffic to WiFi network adaptor ?

internetNotConnect.zip

s5uishida commented 2 years ago

Hi @yasuhirom

In this case, UPF_ADVERTISE_IP should not change the default value 172.22.0.8. Change only SGWU_ADVERTISE_IP.

Don't forget to register the IMSI and MSISDN with OsmoHLR.

yasuhirom commented 2 years ago

Hi @s5uishida

thank you for your info. but, unfortunately, UE still can't access internet. I revert UPF_ADVERTISE_IP to 172.22.0.8. then re-build open5gs comportment. (base only)

Attach is the tcpdump for your reference.

internetNotConnect.zip

ip tables is as below.

[internetNotConnect.zip](https://github.com/herlesupreeth/docker_open5gs/files/8229332/internetNotConnect.zip)

Chain INPUT (policy ACCEPT)
target     pr
[internetNotConnect.zip](https://github.com/herlesupreeth/docker_open5gs/files/8229327/internetNotConnect.zip)
ot opt source               destination

Chain FORWARD (policy DROP)
target     prot opt source               destination
DOCKER-USER  all  --  anywhere             anywhere
DOCKER-ISOLATION-STAGE-1  all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain DOCKER (2 references)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             172.22.0.26          tcp dpt:3000
ACCEPT     udp  --  anywhere             172.22.0.6           udp dpt:2152
ACCEPT     sctp --  anywhere             172.22.0.9           sctp dpt:36412
ACCEPT     tcp  --  anywhere             172.22.0.18          tcp dpt:http-alt

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target     prot opt source               destination
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere
RETURN     all  --  anywhere             anywhere

Chain DOCKER-ISOLATION-STAGE-2 (2 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere
RETURN     all  --  anywhere             anywhere

Chain DOCKER-USER (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere
ubuntu@ubuntu:~$
s5uishida commented 2 years ago

Hi @yasuhirom

Could you ping from the upf container to your device? And could you share a set of Open5GS logs?

yasuhirom commented 2 years ago

Hi @s5uishida

ok, will do. I found the IP address range for eNB network and ims bearer are same. 192.168.101.x I modify Open5GS settings and are rebuilding now.

yasuhirom commented 2 years ago

After rebuilding, UE is now able to access internet. most probably, address conflict is the root cause.