<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi there,</div><div>I have following configuration:</div><div>* 2 linux namespaces with GRE tunnels connected and some basic routing<br></div><div>* 2 GRE tunnels towards each namespace from external routers <br></div><div>My intention is to use NAT64 to access same IPv4 spaces from within single applicaton unaware of existing overlapping spaces. <br></div><div><br></div><div>The problem: my following setup works OK (ping, ssh, tcp, et all), EXCEPT SNMP. Some SNMP gets work correctly, while snmpwalk or snmtable rather do not. <br></div><div><br></div><div>My complete setup is as follows (easy to copy on an machine, <br></div><div><br></div><div>ip addr add <a href="http://192.168.1.51/24">192.168.1.51/24</a> dev enp0s3 && ip link set enp0s3 up<br>ip route add <a href="http://0.0.0.0/0">0.0.0.0/0</a> via 192.168.1.1<br># Adding namespaces and interfaces <br>for i in 10 20; do<br>ip netns add dm$i<br>ip link add veth$i type veth peer name br-veth$i<br>ip link set veth$i netns dm$i<br>ip -n dm$i address add 192.168.$i.100/24 dev veth$i<br>ip -n dm$i link set veth$i up<br>ip link set br-veth$i up<br>ip link add name br$i type bridge<br>ip link set br$i up<br>ip link set br-veth$i master br$i<br>ip address add 192.168.$i.1/24 dev br$i<br>ip -n dm$i route add <a href="http://0.0.0.0/0">0.0.0.0/0</a> via 192.168.$i.1<br># Adding same ips to dm10 and dm20<br>ip -n dm$i address add <a href="http://10.0.1.1/24">10.0.1.1/24</a> dev lo<br>done<br># Adding different tunnels<br>ip -n dm10 tunnel add gre10 mode gre remote 192.168.1.61 local 192.168.10.100<br>ip -n dm20 tunnel add gre20 mode gre remote 192.168.1.62 local 192.168.20.100<br>ip -n dm10 tunnel add gre101 mode gre remote 192.168.1.71 local 192.168.10.100<br>ip -n dm20 tunnel add gre201 mode gre remote 192.168.1.72 local 192.168.20.100<br>for i in lo gre10 gre101; do ip -n dm10 link set $i up; done ; for i in lo gre20 gre201; do ip -n dm20 link set $i up; done<br># IPs of tunnels are accessed externally, for lab we need something to route to & from<br>for i in 10 20; do ip -n dm$i route add <a href="http://10.0.0.0/24">10.0.0.0/24</a> dev gre$i; ip -n dm$i route add <a href="http://10.159.146.0/24">10.159.146.0/24</a> dev gre${i}1; done<br>ip addr add <a href="http://1.1.1.2/30">1.1.1.2/30</a> dev br10 && ip addr add <a href="http://1.1.1.6/30">1.1.1.6/30</a> dev br20<br>ip -n dm10 addr add <a href="http://1.1.1.1/30">1.1.1.1/30</a> dev veth10 && ip -n dm20  addr add <a href="http://1.1.1.5/30">1.1.1.5/30</a> dev veth20<br># NAT towards services<br>ip netns exec dm10 iptables -t nat -A POSTROUTING -s <a href="http://10.0.0.0/24">10.0.0.0/24</a> -o veth10 -j NETMAP --to <a href="http://10.7.7.0/24">10.7.7.0/24</a><br>ip netns exec dm20 iptables -t nat -A POSTROUTING -s <a href="http://10.0.0.0/24">10.0.0.0/24</a> -o veth20 -j NETMAP --to <a href="http://10.8.8.0/24">10.8.8.0/24</a><br>ip netns exec dm10 iptables -t nat -A PREROUTING -d <a href="http://10.7.7.0/24">10.7.7.0/24</a> -j NETMAP --to <a href="http://10.0.0.0/24">10.0.0.0/24</a><br>ip netns exec dm20 iptables -t nat -A PREROUTING -d <a href="http://10.8.8.0/24">10.8.8.0/24</a> -j NETMAP --to <a href="http://10.0.0.0/24">10.0.0.0/24</a><br>ip route add <a href="http://10.7.7.0/24">10.7.7.0/24</a> via 1.1.1.1 && ip route add <a href="http://10.8.8.0/24">10.8.8.0/24</a> via 1.1.1.5<br># Statefull NAT64<br>for x in 10 20; do <br>y=$(printf '%x\n' $x)<br>ip addr add 2a01:2e0:$y::2/96 dev br$x<br>ip -n dm$x addr add 2a01:2e0:$y::1/96 dev veth$x<br>#ip -n dm$x link set veth$x mtu 1280 ???????? doesn't help either<br>ip netns exec dm$x jool instance add --netfilter dm$x --pool6 2a01:2e0:d:3:$y::/96<br>ip -6 route add 2a01:2e0:d:3:$y::/96 via 2a01:2e0:$y::1<br>printf "Network 2a01:2e0:d:3:$y::/96 added\n"<br>ip -n dm$x link set veth$x mtu 1476<br>done<br></div><div><br></div><div>Symptom of a failure (executed from host):</div><div>snmpwalk  -v2c -r0 -On -c public 2a01:2e0:d:3:a::10.0.0.1   1.3.6.1.2.1.4.24<br>.1.3.6.1.2.1.4.24.3.0 = Gauge32: 8<br>.1.3.6.1.2.1.4.24.4.1.1.10.0.0.0.255.255.255.0.0.10.0.0.1 = IpAddress: 10.0.0.0<br>Timeout: No Response from 2a01:2e0:d:3:a::10.0.0.1<br></div><div><br></div><div>Dump form the host:</div><div><br>23:06:13.327447 Out 9e:e1:20:11:58:31 ethertype IPv6 (0x86dd), length 125: 2001:db8:a::2.48485 > 2a01:2e0:d:3:a:0:a00:1.161:  GetNextRequest(46)  .1.3.6.1.2.1.4.24.4.1.1.10.0.0.0.255.255.255.0.0.10.0.0.1<br>23:06:13.327506 Out 9e:e1:20:11:58:31 ethertype IPv6 (0x86dd), length 125: 2001:db8:a::2.48485 > 2a01:2e0:d:3:a:0:a00:1.161:  GetNextRequest(46)  .1.3.6.1.2.1.4.24.4.1.1.10.0.0.0.255.255.255.0.0.10.0.0.1<br>23:06:13.328715  In 96:4e:14:f9:c7:60 ethertype IPv6 (0x86dd), length 134: 2a01:2e0:d:3:a:0:a00:1.161 > 2001:db8:a::2.48485:  GetResponse(55)  .1.3.6.1.2.1.4.24.4.1.1.192.168.1.0.255.255.255.128.0.192.168.1.61=192.168.1.0<br>23:06:13.328724  In 96:4e:14:f9:c7:60 ethertype IPv6 (0x86dd), length 134: 2a01:2e0:d:3:a:0:a00:1.161 > 2001:db8:a::2.48485:  GetResponse(55)  .1.3.6.1.2.1.4.24.4.1.1.192.168.1.0.255.255.255.128.0.192.168.1.61=192.168.1.0<br></div><div><br></div><div>Dump from the namespace:</div><div><br>23:06:13.327551  In 9e:e1:20:11:58:31 ethertype IPv6 (0x86dd), length 125: 2001:db8:a::2.48485 > 2a01:2e0:d:3:a:0:a00:1.161:  GetNextRequest(46)  .1.3.6.1.2.1.4.24.4.1.1.10.0.0.0.255.255.255.0.0.10.0.0.1<br>23:06:13.327608 Out ethertype IPv4 (0x0800), length 105: 10.0.1.1.61639 > 10.0.0.1.161:  GetNextRequest(46)  .1.3.6.1.2.1.4.24.4.1.1.10.0.0.0.255.255.255.0.0.10.0.0.1<br>23:06:13.328655  In ethertype IPv4 (0x0800), length 114: 10.0.0.1.161 > 10.0.1.1.61639:  GetResponse(55)  .1.3.6.1.2.1.4.24.4.1.1.192.168.1.0.255.255.255.128.0.192.168.1.61=192.168.1.0<br>23:06:13.328708 Out 96:4e:14:f9:c7:60 ethertype IPv6 (0x86dd), length 134: 2a01:2e0:d:3:a:0:a00:1.161 > 2001:db8:a::2.48485:  GetResponse(55)  .1.3.6.1.2.1.4.24.4.1.1.192.168.1.0.255.255.255.128.0.192.168.1.61=192.168.1.0<br></div><div><br></div><div>(tu my understanding, this means packets are replied and delivered to the requesting IP, but in reality they never reach the snmpwalk back)<br></div><div><br></div><div>Stats from jool (number of unknown_l4_proto grows)<br></div><div><br></div><div>jool -i dm10 stats display          <br>JSTAT_SUCCESS: 912<br>JSTAT_BIB_ENTRIES: 3<br>JSTAT_SESSIONS: 3<br>JSTAT_UNKNOWN_L4_PROTO: 4708<br>JSTAT_UNKNOWN_ICMP6_TYPE: 73<br>JSTAT_POOL6_MISMATCH: 6<br>JSTAT_POOL4_MISMATCH: 46957<br>JSTAT_BIB4_NOT_FOUND: 18<br></div><div><br></div><div>I tried to understand MTU concerns. I tuned MTU of a namespace interface (veth10) to lowest amount expected in the network (1476 as observed in the GRE) but that didn't help. I tried replacing snmpwalk with pysnmp (exactly the same results) and direct IPv6 from namespace to the router on pure IPv6 (the last worked, and it proves the snmpwalk / pysnmp can into IPv6).</div><div><br></div><div>So, all in all, I think I have all alright but SNMP packets are getting lost. <br></div><div><br></div><div>Any more hints? MTU considerations? other setups? some netfilter rules to log a failing rule?</div><div><br></div><div>Thanks.<br></div></div></div></div></div></div></div>