Hi,
Our machine 10.161.4.193 is having Docker environment (172.17.0.1)
Free5GC with containers having IP series 10.100.200.x and UERANSIM are installed on same machine.
we successfully created PDU session with UERANSIM . Tunnel uesimtun0 gets created and UE gets IP of series 60.60.0.0/16
We are able to ping www.google.com using uesimtun0 interface.
With in 10.161.4.193, ping is successful to 10.100.200.x and 60.60.0.x series
We are having another server 10.161.4.192.
We are trying to reach caontainer or UE IP from 10.161.4.192 but ping request is only reaching upto 10.161.4.193 and not able to reach conatainer or UE IP.
Need your support to know how we can access conatiner IP or UE IP from outside this container.
root@free5gc-docker:/home/ubuntu/v3.0.6_Docker/free5gc-compose# tcpdump -i any|grep ICMP
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
05:42:14.990024 IP 10.161.4.192 > 60-60-0-5.rev.home.ne.jp: ICMP echo request, id 18073, seq 16, length 64
05:42:16.014140 IP 10.161.4.192 > 60-60-0-5.rev.home.ne.jp: ICMP echo request, id 18073, seq 17, length 64
05:42:17.038002 IP 10.161.4.192 > 60-60-0-5.rev.home.ne.jp: ICMP echo request, id 18073, seq 18, length 64
05:42:18.061977 IP 10.161.4.192 > 60-60-0-5.rev.home.ne.jp: ICMP echo request, id 18073, seq 19, length 64
05:42:19.085971 IP 10.161.4.192 > 60-60-0-5.rev.home.ne.jp: ICMP echo request, id 18073, seq 20, length 64
root@free5gc-docker:/home/ubuntu# docker network ls
NETWORK ID NAME DRIVER SCOPE
3e27082b7f61 bridge bridge local
83eb5b5157e2 free5gc-compose_privnet bridge local
9edbe33c2afa host host local
72669c9f0dd3 none null local
root@free5gc-docker:/home/ubuntu# docker network inspect bridge
[
{
“Name”: “bridge”,
“Id”: “3e27082b7f619a6d360fbca55ef784cee2bb900b2df00f90f96075150a1a85f2”,
“Created”: “2021-11-02T06:26:53.94033904Z”,
“Scope”: “local”,
“Driver”: “bridge”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: [
{
“Subnet”: “172.17.0.0/16”,
“Gateway”: “172.17.0.1”
}
]
},
“Internal”: false,
“Attachable”: false,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
},
“ConfigOnly”: false,
“Containers”: {},
“Options”: {
“com.docker.network.bridge.default_bridge”: “true”,
“com.docker.network.bridge.enable_icc”: “true”,
“com.docker.network.bridge.enable_ip_masquerade”: “true”,
“com.docker.network.bridge.host_binding_ipv4”: “0.0.0.0”,
“com.docker.network.bridge.name”: “docker0”,
“com.docker.network.driver.mtu”: “1500”
},
“Labels”: {}
}
]
root@free5gc-docker:/home/ubuntu# docker network inspect host
[
{
“Name”: “host”,
“Id”: “9edbe33c2afab200685c3677b3f848c3abb7f92aab333ec5ac86a90e248d94ab”,
“Created”: “2021-10-08T10:26:35.420990488Z”,
“Scope”: “local”,
“Driver”: “host”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: []
},
“Internal”: false,
“Attachable”: false,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
},
“ConfigOnly”: false,
“Containers”: {},
“Options”: {},
“Labels”: {}
}
]
root@free5gc-docker:/home/ubuntu# docker network inspect free5gc-compose_privnet
[
{
“Name”: “free5gc-compose_privnet”,
“Id”: “83eb5b5157e2addb01b1711740e911effeba58d1442f6e3a4b9320f3cc6c0a26”,
“Created”: “2021-11-29T09:35:07.139603123Z”,
“Scope”: “local”,
“Driver”: “bridge”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: [
{
“Subnet”: “10.100.200.0/24”
}
]
},
“Internal”: false,
“Attachable”: true,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
},
“ConfigOnly”: false,
“Containers”: {
“2461188ad083d4a05e72e5a91819debb16cf5f0337b5897f1da1a41352fa29b2”: {
“Name”: “nssf”,
“EndpointID”: “6c8d4c375ca175dd43cb32740cd354cdfe860cb2da5c21cb3de445d15444f8a3”,
“MacAddress”: “02:42:0a:64:c8:0b”,
“IPv4Address”: “10.100.200.11/24”,
“IPv6Address”: “”
},
“3d8f47c2b6cb224cb2dd7c14524cb7438bb4c6ca1f4fdb4e61d4b9af493c717a”: {
“Name”: “webui”,
“EndpointID”: “36112916f906c45c8a4c38678d6bd3f004b4754194211f942d82a0c2294f20a6”,
“MacAddress”: “02:42:0a:64:c8:07”,
“IPv4Address”: “10.100.200.7/24”,
“IPv6Address”: “”
},
“607a602853eb493fbe4baee2854ea895daf2d6905f42a32b418a124e475c45c8”: {
“Name”: “upf1”,
“EndpointID”: “d1a94a8b64a4893c3293d7703c6a3919b202ae2d6a05189175b9bba92e75be28”,
“MacAddress”: “02:42:0a:64:c8:05”,
“IPv4Address”: “10.100.200.5/24”,
“IPv6Address”: “”
},
“81e08120ef0a7980a57b10e15e447774cd76a84b3da5a937f8291d791f3b1f84”: {
“Name”: “udm”,
“EndpointID”: “e682a035a6315f104bf5e199b9aad478e5d11cfa455d4e76e0433fc1693937c3”,
“MacAddress”: “02:42:0a:64:c8:09”,
“IPv4Address”: “10.100.200.9/24”,
“IPv6Address”: “”
},
“8dc420d25e238c13f5a47389a76873c017c56efe4f17206583f1e04b0fd6b741”: {
“Name”: “udr”,
“EndpointID”: “89ed739755fcaaef85ce819933e8575c7b79f9aa7825dae1aa4ab7bc71b30e52”,
“MacAddress”: “02:42:0a:64:c8:0e”,
“IPv4Address”: “10.100.200.14/24”,
“IPv6Address”: “”
},
“b1399162c7596c39b7501a61d00b1e44b251a82f7c1f81f0d55b29d69895353f”: {
“Name”: “smf”,
“EndpointID”: “89ffd5ab6a87363f12677f443d655b9f840c4a2e450d922d56ba0ba5fa49ec6f”,
“MacAddress”: “02:42:0a:64:c8:08”,
“IPv4Address”: “10.100.200.8/24”,
“IPv6Address”: “”
},
“b609b61352d0b621eff63298492a0176625a673aca6ad3bc3d1eeef90d7dc67f”: {
“Name”: “pcf”,
“EndpointID”: “627dded444bc7ceb38acc203842877443b7e68d812b27ea5f587b7358355302d”,
“MacAddress”: “02:42:0a:64:c8:0a”,
“IPv4Address”: “10.100.200.10/24”,
“IPv6Address”: “”
},
“bd1023993c6c69fd72b3b6ab4de4820b717610141bb7feb37fe7a130f04225b6”: {
“Name”: “ausf”,
“EndpointID”: “ede2a887c106dad5ef3cafff025729d9d9c072b9f645b9365a519fcd58d9d3d4”,
“MacAddress”: “02:42:0a:64:c8:0d”,
“IPv4Address”: “10.100.200.13/24”,
“IPv6Address”: “”
},
“c161a4b49f139daccbfe2a77f0948fc743bc2c70d7f7e9a8ac7a837df8dcb998”: {
“Name”: “amf”,
“EndpointID”: “b053f2eafe8e6c3530f33c126991b97bb38493d65fdb716d1b46be1155dab557”,
“MacAddress”: “02:42:0a:64:c8:0c”,
“IPv4Address”: “10.100.200.12/24”,
“IPv6Address”: “”
},
“c29981a311e4c98ac99a8c267689d956ce14076487de135584ce773784c312ec”: {
“Name”: “mongodb”,
“EndpointID”: “bc8d450dbf2c856cd9836618fb4a2001a6def183395dd969527c4fcc40cad6a9”,
“MacAddress”: “02:42:0a:64:c8:04”,
“IPv4Address”: “10.100.200.4/24”,
“IPv6Address”: “”
},
“cc2673e464a6c3059558cd776eb32b53bd05f5b3c7e7d7c6aeaba5b06c70e587”: {
“Name”: “nrf”,
“EndpointID”: “a5dfd8ad60e1b8f1a86cc620605915d84c2b49947644af5b8f5948bc8f3ba7eb”,
“MacAddress”: “02:42:0a:64:c8:06”,
“IPv4Address”: “10.100.200.6/24”,
“IPv6Address”: “”
},
“ce8afcbe158c1a749742300cf695536941b123c4b281427c0327fca20adb2846”: {
“Name”: “upf2”,
“EndpointID”: “4891e669789689625cb3e439bd08ce3967bf9c910b17975d4b07c912044b3cfb”,
“MacAddress”: “02:42:0a:64:c8:03”,
“IPv4Address”: “10.100.200.3/24”,
“IPv6Address”: “”
},
“dedfa087c0691edd153f14ef7cc46f0f386f84c7f3b20deafffd4986a900d598”: {
“Name”: “upfb”,
“EndpointID”: “46b330f911fb5e20e4bf37f97230c8f50533ccc7d4e09229c61f29866ca78b48”,
“MacAddress”: “02:42:0a:64:c8:02”,
“IPv4Address”: “10.100.200.2/24”,
“IPv6Address”: “”
}
},
“Options”: {},
“Labels”: {
“com.docker.compose.network”: “privnet”,
“com.docker.compose.project”: “free5gc-compose”,
“com.docker.compose.version”: “1.29.2”
}
}
]
root@free5gc-docker:/home/ubuntu# docker network inspect none
[
{
“Name”: “none”,
“Id”: “72669c9f0dd3c85a96f8df6105a6d785beb56930f78687b6f3a9d72ca90f9a1c”,
“Created”: “2021-10-08T10:26:35.381890257Z”,
“Scope”: “local”,
“Driver”: “null”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: []
},
“Internal”: false,
“Attachable”: false,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
},
“ConfigOnly”: false,
“Containers”: {},
“Options”: {},
“Labels”: {}
}
]
root@free5gc-docker:/home/ubuntu#
br-83eb5b5157e2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.100.200.1 netmask 255.255.255.0 broadcast 10.100.200.255
inet6 fe80::42:66ff:fefe:4783 prefixlen 64 scopeid 0x20
ether 02:42:66:fe:47:83 txqueuelen 0 (Ethernet)
RX packets 88380 bytes 7681295 (7.6 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 87640 bytes 13129285 (13.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:99ff:fe76:bcb prefixlen 64 scopeid 0x20
ether 02:42:99:76:0b:cb txqueuelen 0 (Ethernet)
RX packets 35404 bytes 2426146 (2.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71889 bytes 136274605 (136.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.161.4.193 netmask 255.255.255.0 broadcast 10.161.4.255
inet6 fe80::f816:3eff:fe56:7cdd prefixlen 64 scopeid 0x20
ether fa:16:3e:56:7c:dd txqueuelen 1000 (Ethernet)
RX packets 3513333 bytes 1114489859 (1.1 GB)
RX errors 0 dropped 186 overruns 0 frame 0
TX packets 771539 bytes 122390047 (122.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 988022 bytes 53717758 (53.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 988022 bytes 53717758 (53.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
uesimtun0: flags=369<UP,POINTOPOINT,NOTRAILERS,RUNNING,PROMISC> mtu 1400
inet 60.60.0.5 netmask 255.255.255.255 destination 60.60.0.5
inet6 fe80::9460:3f89:c536:a566 prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 88 bytes 7092 (7.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 405 bytes 23476 (23.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth11f6405: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::d41e:c6ff:fe48:6259 prefixlen 64 scopeid 0x20
ether d6:1e:c6:48:62:59 txqueuelen 0 (Ethernet)
RX packets 165125 bytes 11879061 (11.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 165326 bytes 12079902 (12.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth57fc1d1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::489c:42ff:feda:b6a9 prefixlen 64 scopeid 0x20
ether 4a:9c:42:da:b6:a9 txqueuelen 0 (Ethernet)
RX packets 195048 bytes 15835283 (15.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 142615 bytes 41423606 (41.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth5da1dea: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::f8b5:9eff:fe5e:595f prefixlen 64 scopeid 0x20
ether fa:b5:9e:5e:59:5f txqueuelen 0 (Ethernet)
RX packets 559081 bytes 165672290 (165.6 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 769631 bytes 62537672 (62.5 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth72aa922: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::b059:e5ff:fe48:f216 prefixlen 64 scopeid 0x20
ether b2:59:e5:48:f2:16 txqueuelen 0 (Ethernet)
RX packets 88 bytes 8086 (8.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 296 bytes 24244 (24.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth84281bf: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::d8f6:16ff:fe0f:ae35 prefixlen 64 scopeid 0x20
ether da:f6:16:0f:ae:35 txqueuelen 0 (Ethernet)
RX packets 943 bytes 76985 (76.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1220 bytes 1943315 (1.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth843a4ab: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::a469:eeff:fea4:6194 prefixlen 64 scopeid 0x20
ether a6:69:ee:a4:61:94 txqueuelen 0 (Ethernet)
RX packets 595 bytes 40213 (40.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1130 bytes 1914158 (1.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth9263a93: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::c0be:98ff:fee7:ac4a prefixlen 64 scopeid 0x20
ether c2:be:98:e7:ac:4a txqueuelen 0 (Ethernet)
RX packets 680 bytes 63100 (63.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 874 bytes 122071 (122.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vetha668376: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::7808:9eff:fecd:5f0f prefixlen 64 scopeid 0x20
ether 7a:08:9e:cd:5f:0f txqueuelen 0 (Ethernet)
RX packets 1452 bytes 138906 (138.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1662 bytes 163203 (163.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vetha02486c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::4020:d7ff:fec6:6752 prefixlen 64 scopeid 0x20
ether 42:20:d7:c6:67:52 txqueuelen 0 (Ethernet)
RX packets 195475 bytes 16278067 (16.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 143066 bytes 41951146 (41.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vetha3f3c9e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::4092:b9ff:fe05:e330 prefixlen 64 scopeid 0x20
ether 42:92:b9:05:e3:30 txqueuelen 0 (Ethernet)
RX packets 455 bytes 33337 (33.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 704 bytes 1889562 (1.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethaba6b37: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::748e:efff:fe3e:9d23 prefixlen 64 scopeid 0x20
ether 76:8e:ef:3e:9d:23 txqueuelen 0 (Ethernet)
RX packets 703 bytes 71520 (71.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 904 bytes 163707 (163.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethaf1b81d: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::6c7f:e3ff:fe11:17f1 prefixlen 64 scopeid 0x20
ether 6e:7f:e3:11:17:f1 txqueuelen 0 (Ethernet)
RX packets 289057 bytes 21375867 (21.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 236740 bytes 47422815 (47.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethc23e8c8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::c877:85ff:fe56:73bb prefixlen 64 scopeid 0x20
ether ca:77:85:56:73:bb txqueuelen 0 (Ethernet)
RX packets 187258 bytes 15263382 (15.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 134936 bytes 40867243 (40.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@free5gc-docker:/home/ubuntu/v3.0.6_Docker/free5gc-compose#
root@free5gc-docker:/home/ubuntu/v3.0.6_Docker/free5gc-compose# 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.100.200.0 0.0.0.0 255.255.255.0 U 0 0 0 br-83eb5b5157e2
10.161.4.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3
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
root@free5gc-docker:/home/ubuntu/v3.0.6_Docker/free5gc-compose# iptables -t nat -vL
Chain PREROUTING (policy ACCEPT 33963 packets, 2668K bytes)
pkts bytes target prot opt in out source destination
5129 369K DOCKER all – any any anywhere anywhere ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT 29597 packets, 2338K bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 3772 packets, 288K bytes)
pkts bytes target prot opt in out source destination
309 18988 DOCKER all – any any anywhere !localhost/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT 4013 packets, 303K bytes)
pkts bytes target prot opt in out source destination
265 16212 MASQUERADE all – any !br-83eb5b5157e2 10.100.200.0/24 anywhere
156 10611 MASQUERADE all – any !docker0 172.17.0.0/16 anywhere
0 0 MASQUERADE all – any eth0 anywhere anywhere
0 0 MASQUERADE tcp – any any 10.100.200.7 10.100.200.7 tcp dpt:5000
0 0 MASQUERADE sctp – any any 10.100.200.12 10.100.200.12 sctp dpt:38412
Chain DOCKER (2 references)
pkts bytes target prot opt in out source destination
10 1300 RETURN all – br-83eb5b5157e2 any anywhere anywhere
0 0 RETURN all – docker0 any anywhere anywhere
3 180 DNAT tcp – !br-83eb5b5157e2 any anywhere anywhere tcp dpt:5000 to:10.100.200.7:5000
3 204 DNAT sctp – !br-83eb5b5157e2 any anywhere anywhere sctp dpt:38412 to:10.100.200.12:38412