rajabu@cloud-console:~$ kubectl exec -it upf-free5gc-upf-upf-594bc9f4c6-n4wqv -n free5gc -- ip route show table all
Defaulted container "upf" out of: upf, init-sysctl (init)
default via 169.254.1.1 dev eth0
169.254.1.1 dev eth0 scope link
172.16.0.0/16 dev upfgtp proto static
192.168.3.0/24 dev net1 proto kernel scope link src 192.168.3.2
192.168.4.0/24 dev net2 proto kernel scope link src 192.168.4.2
local 10.1.104.55 dev eth0 table local proto kernel scope host src 10.1.104.55
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.3.0 dev net1 table local proto kernel scope link src 192.168.3.2
local 192.168.3.2 dev net1 table local proto kernel scope host src 192.168.3.2
broadcast 192.168.3.255 dev net1 table local proto kernel scope link src 192.168.3.2
broadcast 192.168.4.0 dev net2 table local proto kernel scope link src 192.168.4.2
local 192.168.4.2 dev net2 table local proto kernel scope host src 192.168.4.2
broadcast 192.168.4.255 dev net2 table local proto kernel scope link src 192.168.4.2
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev net1 proto kernel metric 256 pref medium
fe80::/64 dev net2 proto kernel metric 256 pref medium
fe80::/64 dev upfgtp proto kernel metric 256 pref medium
local ::1 dev lo table local proto kernel metric 0 pref medium
local fe80::215:5dff:fe56:dc0e dev net2 table local proto kernel metric 0 pref medium
local fe80::215:5dff:fe56:dc0f dev net1 table local proto kernel metric 0 pref medium
local fe80::a163:bd4c:b957:658c dev upfgtp table local proto kernel metric 0 pref medium
local fe80::c0c1:60ff:fe24:7230 dev eth0 table local proto kernel metric 0 pref medium
multicast ff00::/8 dev eth0 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev net1 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev net2 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev upfgtp table local proto kernel metric 256 pref medium
rajabu@cloud-console:~$
rajabu@cloud-console:~$
rajabu@cloud-console:~$
rajabu@cloud-console:~$
rajabu@cloud-console:~$ kubectl exec -it upf-free5gc-upf-upf-594bc9f4c6-n4wqv -n free5gc -- iptables -t nat -L -n -v
Defaulted container "upf" out of: upf, init-sysctl (init)
Chain PREROUTING (policy ACCEPT 9 packets, 1310 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 6 packets, 1058 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 19 packets, 1405 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
561 47124 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 1195 packets, 64734 bytes)
pkts bytes target prot opt in out source destination
rajabu@cloud-console:~$
rajabu@cloud-console:~$
This is a Microk8s Cluster:
I tried to enable IP on CALICO, looks like this parameter does not exist in config-map:
rajabu@cloud-console:~$ kubectl describe cm calico-config -n kube-system | grep ip_forwarding
rajabu@cloud-console:~$
rajabu@cloud-console:~$
I will appreciate any hints that can lead to a solution
I know this has been discussed previously and closed, but I still need some help.
What I can see is tunnel interface is receiving ping response from internet:
rajabu@cloud-console:~$ kubectl exec -it upf-free5gc-upf-upf-594bc9f4c6-n4wqv -n free5gc -- tcpdump -i upfgtp Defaulted container "upf" out of: upf, init-sysctl (init) tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on upfgtp, link-type RAW (Raw IP), snapshot length 262144 bytes 16:29:17.925241 IP 172.16.0.2 > dns.google: ICMP echo request, id 28, seq 163, length 64 16:29:17.938568 IP dns.google > 172.16.0.2: ICMP echo reply, id 28, seq 163, length 64 16:29:18.949157 IP 172.16.0.2 > dns.google: ICMP echo request, id 28, seq 164, length 64 16:29:18.965977 IP dns.google > 172.16.0.2: ICMP echo reply, id 28, seq 164, length 64 16:29:19.973297 IP 172.16.0.2 > dns.google: ICMP echo request, id 28, seq 165, length 64 16:29:19.986213 IP dns.google > 172.16.0.2: ICMP echo reply, id 28, seq 165, length 64 16:29:20.997108 IP 172.16.0.2 > dns.google: ICMP echo request, id 28, seq 166, length 64 16:29:21.010489 IP dns.google > 172.16.0.2: ICMP echo reply, id 28, seq 166, length 64
And this is happening after enabling IP_FORWARDING:
rajabu@cloud-console:~$ kubectl exec -it upf-free5gc-upf-upf-594bc9f4c6-n4wqv -n free5gc -- sysctl net.ipv4.ip_forward Defaulted container "upf" out of: upf, init-sysctl (init) net.ipv4.ip_forward = 1
or
rajabu@cloud-console:~$ kubectl exec -it upf-free5gc-upf-upf-594bc9f4c6-n4wqv -n free5gc -- cat /proc/sys/net/ipv4/ip_forward Defaulted container "upf" out of: upf, init-sysctl (init) 1 rajabu@cloud-console:~$
Everything else seems to be OK:
rajabu@cloud-console:~$ kubectl exec -it upf-free5gc-upf-upf-594bc9f4c6-n4wqv -n free5gc -- ip route show table all Defaulted container "upf" out of: upf, init-sysctl (init) default via 169.254.1.1 dev eth0 169.254.1.1 dev eth0 scope link 172.16.0.0/16 dev upfgtp proto static 192.168.3.0/24 dev net1 proto kernel scope link src 192.168.3.2 192.168.4.0/24 dev net2 proto kernel scope link src 192.168.4.2 local 10.1.104.55 dev eth0 table local proto kernel scope host src 10.1.104.55 broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1 local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1 local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1 broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1 broadcast 192.168.3.0 dev net1 table local proto kernel scope link src 192.168.3.2 local 192.168.3.2 dev net1 table local proto kernel scope host src 192.168.3.2 broadcast 192.168.3.255 dev net1 table local proto kernel scope link src 192.168.3.2 broadcast 192.168.4.0 dev net2 table local proto kernel scope link src 192.168.4.2 local 192.168.4.2 dev net2 table local proto kernel scope host src 192.168.4.2 broadcast 192.168.4.255 dev net2 table local proto kernel scope link src 192.168.4.2 fe80::/64 dev eth0 proto kernel metric 256 pref medium fe80::/64 dev net1 proto kernel metric 256 pref medium fe80::/64 dev net2 proto kernel metric 256 pref medium fe80::/64 dev upfgtp proto kernel metric 256 pref medium local ::1 dev lo table local proto kernel metric 0 pref medium local fe80::215:5dff:fe56:dc0e dev net2 table local proto kernel metric 0 pref medium local fe80::215:5dff:fe56:dc0f dev net1 table local proto kernel metric 0 pref medium local fe80::a163:bd4c:b957:658c dev upfgtp table local proto kernel metric 0 pref medium local fe80::c0c1:60ff:fe24:7230 dev eth0 table local proto kernel metric 0 pref medium multicast ff00::/8 dev eth0 table local proto kernel metric 256 pref medium multicast ff00::/8 dev net1 table local proto kernel metric 256 pref medium multicast ff00::/8 dev net2 table local proto kernel metric 256 pref medium multicast ff00::/8 dev upfgtp table local proto kernel metric 256 pref medium rajabu@cloud-console:~$ rajabu@cloud-console:~$ rajabu@cloud-console:~$ rajabu@cloud-console:~$ rajabu@cloud-console:~$ kubectl exec -it upf-free5gc-upf-upf-594bc9f4c6-n4wqv -n free5gc -- iptables -t nat -L -n -v Defaulted container "upf" out of: upf, init-sysctl (init) Chain PREROUTING (policy ACCEPT 9 packets, 1310 bytes) pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 6 packets, 1058 bytes) pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 19 packets, 1405 bytes) pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 19 packets, 1405 bytes) pkts bytes target prot opt in out source destination 3 252 MASQUERADE all -- * eth0 172.16.0.0/16 0.0.0.0/0 rajabu@cloud-console:~$ rajabu@cloud-console:~$ rajabu@cloud-console:~$ rajabu@cloud-console:~$ kubectl exec -it upf-free5gc-upf-upf-594bc9f4c6-n4wqv -n free5gc -- iptables -L -n -v Defaulted container "upf" out of: upf, init-sysctl (init) Chain INPUT (policy ACCEPT 1677 packets, 3058K bytes) pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 561 47124 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 1195 packets, 64734 bytes) pkts bytes target prot opt in out source destination rajabu@cloud-console:~$ rajabu@cloud-console:~$
This is a Microk8s Cluster:
I tried to enable IP on CALICO, looks like this parameter does not exist in config-map: rajabu@cloud-console:~$ kubectl describe cm calico-config -n kube-system | grep ip_forwarding rajabu@cloud-console:~$ rajabu@cloud-console:~$
I will appreciate any hints that can lead to a solution
Thank you Raj