OPENAIRINTERFACE / openair-epc-fed

Federation of all Open-Air-CN components
BSD 3-Clause "New" or "Revised" License
63 stars 67 forks source link

ping "request" from UE going across eNB is going to the eth0 interface on the openair-spgwu-tiny container. I think it should be going to the pdn interface??? Right? #5

Open dcollin5 opened 3 years ago

dcollin5 commented 3 years ago

ping "request" from UE going across eNB is going to the eth0 interface on the openair-spgwu-tiny container. I think it should be going to the pdn interface??? Right?

root@0380057da8bb:/openair-spgwu-tiny# tcpdump -i eth0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 17:09:29.879160 IP 12.1.1.2 > 12.1.1.1: ICMP echo request, id 22845, seq 21, length 64

The ping command from the UE to the pdn gateway interface 12.1.1.1 never responds..

However, a ping from the pdn interface on openair-spgwu-tiny to 12.1.1.2, goes to the UE, but the reply goes to eth0.

Are these commands correct? $ python3 component/oai-spgwu-tiny/ci-scripts/generateConfigFiles.py --kind=SPGW-U \ --sxc_ip_addr=${SPGW0_IP} --sxu=eth0 --s1u=eth0 --from_docker_file $ docker cp ./spgwu-cfg.sh prod-oai-spgwu-tiny:/openair-spgwu-tiny $ docker exec -it prod-oai-spgwu-tiny /bin/bash -c "cd /openair-spgwu-tiny && chmod 777 spgwu-cfg.sh && ./spgwu-cfg.sh"

dcollin5 commented 3 years ago

The "temporary" solution. Change the following in the etc/spgw_u.conf file in the openair-spgwu-tiny container. From: SGI : {

No config to set, the software will set the SGi interface to the interface used for the default route.

        INTERFACE_NAME         = "eth0"; # STRING, interface name or "default_gateway"

.....

to SGI : {

No config to set, the software will set the SGi interface to the interface used for the default route.

        INTERFACE_NAME         = "pdn"; # STRING, interface name or "default_gateway"

....

Then reload the containers. When the UE attaches to the network, ping responds

I will see if i can find a permanent fix in the scripts.

liyinxin commented 3 years ago

Hi,dcollin5 I also meet this error,but when i change the SGI inferface_name = "pdn",i find the ue can ping the pdn but i can't access the network, can you help me ? Thanks very much.

dcollin5 commented 3 years ago

Hi

I think doing the following [from here: http://iristestbed.eu/index.php/2-uncategorised/13-12-oai-gnb-and-oai-nrue]: Install tools in Docker containers

The following tools can be useful to install in the in the prod-oai-spgwu-tiny. support tcpdump to gateway address. Also ping, and vi if you need it.

docker exec -it prod-oai-spgwu-tiny /bin/bash

apt-get update

apt install iputils-ping tcpdump iptables vim -y

In Docker Container

docker exec -it prod-oai-spgwu-tiny /bin/bash

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE iptables --append FORWARD --in-interface pdn -j ACCEPT sysctl net.ipv4.conf.all.forwarding=1

Then reload the containers. When the UE attaches to the network, ping responds when ping the Google DNS server 8.8.8.8

[INFO] [B200] Actually got clock rate 23.040000 MHz. Waiting PHY to initialize ... done! Attaching UE... . Found Cell: Mode=FDD, PCI=0, PRB=50, Ports=1, CFO=-6.6 KHz Found PLMN: Id=22201, TAC=1 Random Access Transmission: seq=33, ra-rnti=0x2 Random Access Complete. c-rnti=0x7025, ta=0 RRC Connected Network attach successful. IP: 12.1.1.2 RF status: O=0, U=1, L=0

iristestbed@iristestbed-Inspiron-7577:~$ ping 12.1.1.1 PING 12.1.1.1 (12.1.1.1) 56(84) bytes of data. 64 bytes from 12.1.1.1: icmp_seq=1 ttl=64 time=26.4 ms 64 bytes from 12.1.1.1: icmp_seq=2 ttl=64 time=35.0 ms 64 bytes from 12.1.1.1: icmp_seq=3 ttl=64 time=33.9 ms 64 bytes from 12.1.1.1: icmp_seq=4 ttl=64 time=40.8 ms 64 bytes from 12.1.1.1: icmp_seq=5 ttl=64 time=23.1 ms


Diarmuid Collins PhD Iris Testbed Manager, CONNECT Centre for Future Networks, Dunlop Oriel House, Trinity College, Dublin 2, Ireland E: dcollin5@tcd.ie W:https://connectcentre.ie/people/diarmuid-collins/

On Mon, 12 Oct 2020 at 15:15, liyinxin notifications@github.com wrote:

Hi,dcollin5 I also meet this error,but when i change the SGI inferface_name = "pdn",i find the ue can ping the pdn but i can't access the network, can you help me ? Thanks very much.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OPENAIRINTERFACE/openair-epc-fed/issues/5#issuecomment-707147314, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMGWFEOJIYJQI3XSXCKPBTSKMFPTANCNFSM4RWEUWNQ .

liyinxin commented 3 years ago

Ok, i will try it. Thanks Very much

Matheus-Garbelini commented 3 years ago

Hi, do you need to manually create the interface "pdn" before hand? Can you share how you call generate_spgwu-tiny_config_script arguments?

Matheus-Garbelini commented 3 years ago

Hi @liyinxin and @dcollin5 another way is to just change ci-scripts/generate_spgwu-tiny_config_script.py: from SNAT = "no" to SNAT = "yes". This will enable address translation and masquerade requests to/from PDN. Unfortunately, this feature is undocumented, not sure why.