UE not able to reach internet in UERANSIM

Hi,

We are using two machines.
First machine 10.161.4.192 is having Free5gc VM based configuration
2nd Machine - installed UERANSIM on it 10.161.4.193

We are able to establish successful PDU session and UE gets IP series 60.60.0.X over uesimtun0. We are trying to ping google using uesimtun0 interface from 10.161.4.193 server. Request is reaching 10.161.4.192 server and hitting upfgtp interface too but request is not going out of this machine (10.161.4.192) towards internet and ping is failing .

on 10.161.4.193 server

Before ping ifconfig dump for upfgtp interface ONLY (RX packet 151)

upfgtp: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet6 fe80::3ef5:b66e:2ba4:5615 prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 151 bytes 11460 (11.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7 bytes 600 (600.0 B)
TX errors 33 dropped 0 overruns 0 carrier 0 collisions 0

root@free5gc-docker:~/UERANSIM/build# ping -I uesimtun0 www.google.com
PING www.google.com (172.217.160.132) from 60.60.0.2 uesimtun0: 56(84) bytes of data.
^C
www.google.com ping statistics —
12 packets transmitted, 0 received, 100% packet loss, time 11258ms

After ping ifconfig dump for upfgtp interface ONLY (RX packet 151 + 12 = 163)

upfgtp: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet6 fe80::3ef5:b66e:2ba4:5615 prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 163 bytes 12468 (12.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7 bytes 600 (600.0 B)
TX errors 33 dropped 0 overruns 0 carrier 0 collisions 0

on 10.161.4.192 server

TCPDUMP

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
09:10:36.537975 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 1, length 64
09:10:37.556567 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 2, length 64
09:10:38.143725 IP6 fe80::faf2:1eff:fea3:fd90 > ip6-allrouters: ICMP6, router solicitation, length 16
09:10:38.580515 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 3, length 64
09:10:39.604601 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 4, length 64
09:10:40.628554 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 5, length 64
09:10:41.652523 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 6, length 64
09:10:42.676494 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 7, length 64
09:10:43.700531 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 8, length 64
09:10:44.724489 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 9, length 64
09:10:45.748422 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 10, length 64
09:10:46.772417 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 11, length 64
09:10:47.796496 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 12, length 64
09:10:48.820594 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 13, length 64
09:10:49.844541 IP 60-60-0-1.rev.home.ne.jp > maa03s29-in-f4.1e100.net: ICMP echo request, id 11737, seq 14, length 64
09:10:53.888027 IP6 fe80::3eec:efff:fe82:96c > ip6-allrouters: ICMP6, router solicitation, length 1

root@free5gc-vm:/home/ubuntu# iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 3796 packets, 260K bytes)
pkts bytes target prot opt in out source destination
107 6787 DOCKER all – * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT 487 packets, 40168 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 222 packets, 17785 bytes)
pkts bytes target prot opt in out source destination
101 6084 DOCKER all – * * 0.0.0.0/0 !127.0.0.0/8 ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT 144 packets, 11400 bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all – * !br-a9d59fc20bd1 172.18.0.0/16 0.0.0.0/0
126 7736 MASQUERADE all – * !docker0 172.17.0.0/16 0.0.0.0/0
0 0 MASQUERADE all – * !br-b0e7fd67b02f 192.168.176.0/20 0.0.0.0/0
19 1140 MASQUERADE all – * !br-7304d0d51edc 192.168.128.0/20 0.0.0.0/0
0 0 MASQUERADE tcp – * * 192.168.128.2 192.168.128.2 tcp dpt:8086
1839 125K MASQUERADE all – * ens3 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE tcp – * * 192.168.128.5 192.168.128.5 tcp dpt:5432
0 0 MASQUERADE tcp – * * 192.168.176.2 192.168.176.2 tcp dpt:19999
0 0 MASQUERADE tcp – * * 192.168.176.2 192.168.176.2 tcp dpt:8080

Chain DOCKER (2 references)
pkts bytes target prot opt in out source destination
0 0 RETURN all – br-a9d59fc20bd1 * 0.0.0.0/0 0.0.0.0/0
0 0 RETURN all – docker0 * 0.0.0.0/0 0.0.0.0/0
0 0 RETURN all – br-b0e7fd67b02f * 0.0.0.0/0 0.0.0.0/0
3 180 RETURN all – br-7304d0d51edc * 0.0.0.0/0 0.0.0.0/0
4 208 DNAT tcp – !br-7304d0d51edc * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8086 to:192.168.128.2:8086
0 0 DNAT tcp – !br-7304d0d51edc * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5432 to:192.168.128.5:5432
0 0 DNAT tcp – !br-b0e7fd67b02f * 0.0.0.0/0 0.0.0.0/0 tcp dpt:19999 to:192.168.176.2:19999
0 0 DNAT tcp – !br-b0e7fd67b02f * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8087 to:192.168.176.2:8080

Sharing routes defined on 192 server

root@free5gc-vm:/home/ubuntu# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.161.4.1 0.0.0.0 UG 100 0 0 ens3
10.161.4.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3
60.60.0.0 0.0.0.0 255.255.255.0 U 0 0 0 upfgtp
169.254.169.254 10.161.4.111 255.255.255.255 UGH 100 0 0 ens3
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-a9d59fc20bd1
192.168.128.0 0.0.0.0 255.255.240.0 U 0 0 0 br-7304d0d51edc
192.168.176.0 0.0.0.0 255.255.240.0 U 0 0 0 br-b0e7fd67b02f

Please let us know what is missing here.

Regards,
Razat Trehan

Hello,

I have a similar issue: https://forum.free5gc.org/t/upf-not-forwarding-packets-received-in-gtp-tunnel-with-ueransim/1263 . I received an answer indicating that the problem could be similar to the one indicated here: https://forum.free5gc.org/t/issue-with-tcp-traffic-and-nat-running-free5gc-in-openstack/1156, but I haven’t found any problem with checksum in my wireshark traces, as indicated in my thread.

I hope we could receive any additional indication helping to solve our issue.

Regards,
José María

Hi Jose Maria,

Thanks for your inputs. We tried to turn off checksum today but even after checksum turning off, situation is same. Only tx we could turn off .Rx is still ON and system is not allowing to turn it off . Seems it is fixed to be ON only.

root@free5gc-vm:/home/ubuntu# ethtool -K ens3 rx off
Cannot change rx-checksumming
Could not change any device features

root@free5gc-vm:/home/ubuntu# ethtool -K ens3 tx off
Actual changes:
tx-checksumming: off
tx-checksum-ip-generic: off
tcp-segmentation-offload: off
tx-tcp-segmentation: off [requested on]
tx-tcp-ecn-segmentation: off [requested on]
tx-tcp6-segmentation: off [requested on]

Regards,
Razat Trehan

Hello,

I finally found a fix that worked for me. You can find the details in https://forum.free5gc.org/t/upf-not-forwarding-packets-received-in-gtp-tunnel-with-ueransim/
I hope it helps.