VM1 (vxlan0 id 42 10.30.40.3/24) eth0 172.16.0.186/24 <-----> 172.16.0.187/24 eth0 (10.30.40.4/24 vxlan0 id 42) VM2
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.16.0.186 netmask 255.255.255.0 broadcast 172.16.0.255vxlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1355 inet 10.20.40.3 netmask 255.255.255.0 broadcast 10.20.40.255 vxlan id 42 remote 172.16.0.187 local 172.16.0.186 dev eth0 srcport 0 0 dstport 4789
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.16.0.187 netmask 255.255.255.0 broadcast 172.16.0.255vxlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1355 inet 10.20.40.4 netmask 255.255.255.0 broadcast 10.20.40.255 vxlan id 42 remote 172.16.0.186 local 172.16.0.187 dev eth0 srcport 0 0 dstport 4789
VM1 (vxlan0 id 42 10.30.40.3/24) eth0 172.16.0.186/24 <-----> 172.16.0.254/24 eth0 (10.30.40.1/24 vxlan0 id 42) OPNsense
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.16.0.186 netmask 255.255.255.0 broadcast 172.16.0.255vxlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1355 inet 10.20.40.3 netmask 255.255.255.0 broadcast 10.20.40.3 vxlan id 42 remote 172.16.0.254 local 172.16.0.186 dev eth0 srcport 0 0 dstport 4789
hn6: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 description: hn6_LAN (lan) options=180018<VLAN_MTU,VLAN_HWTAGGING,LINKSTATE,NETMAP> ether 00:15:5d:00:c9:52 inet 172.16.0.254 netmask 0xffffff00 broadcast 172.16.0.255 media: Ethernet autoselect (10Gbase-T <full-duplex>) status: active nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>vxlan2: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1355 description: vxlan2 (opt6) options=80020<JUMBO_MTU,LINKSTATE> ether 58:9c:fc:00:62:52 inet6 fe80::5a9c:fcff:fe00:6252%vxlan2 prefixlen 64 tentative scopeid 0x13 inet 10.20.40.1 netmask 0xffffff00 broadcast 10.20.40.255 groups: vxlan vxlan vni 42 local 172.16.0.254:4789 remote 172.16.0.186:4789 media: Ethernet autoselect (autoselect <full-duplex>) status: active nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
root@opn01:~ # pfctl -s rules | grep -i vxlanscrub on vxlan2 all fragment reassembleblock drop in log on vxlan2 inet6 from fe80::5a9c:fcff:fe00:6252 to anyblock drop in log on ! vxlan2 inet from 10.20.40.0/24 to anypass in log quick on hn6 inet proto udp from any to any port = vxlan keep state label "6937e3837a1e6539757d540ce21cbb7f"pass in quick on vxlan2 inet all flags S/SA keep state label "33f3a4eb4db2eb24493d44990290c399"
root@vm1: tcpdump -i any proto ICMP -ntcpdump: data link type LINUX_SLL2tcpdump: verbose output suppressed, use -v[v]... for full protocol decodelistening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes19:53:51.654332 lo In IP 10.20.40.3 > 10.20.40.3: ICMP host 10.20.40.1 unreachable, length 92
root@opn01:~ # tcpdump -i hn6 port 4789 -ntcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on hn6, link-type EN10MB (Ethernet), capture size 262144 bytes21:51:58.795397 IP 172.16.0.186.53062 > 172.16.0.254.4789: VXLAN, flags [I] (0x08), vni 42ARP, Request who-has 10.20.40.1 tell 10.20.40.3, length 28
root@opn01:~ # tcpdump -i vxlan2tcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on vxlan2, link-type EN10MB (Ethernet), capture size 262144 bytes... NOTHING
root@opn01:~ # ping -S 10.20.40.1 10.20.40.3PING 10.20.40.3 (10.20.40.3) from 10.20.40.1: 56 data bytesping: sendto: No route to host
root@opn01:~ # netstat -rnRouting tablesInternet:Destination Gateway Flags Netif Expire10.20.40.0/24 link#19 U vxlan210.20.40.1 link#19 UHS lo0
root@opn01:~ # arp -a? (10.20.40.1) at 58:9c:fc:00:62:52 on vxlan2 permanent [ethernet]opn01 (172.16.0.254) at 00:15:5d:00:c9:52 on hn6 permanent [ethernet]? (172.16.0.186) at 00:15:5d:00:c9:76 on hn6 expires in 962 seconds [ethernet]
root@vm1:# arp -a? (10.20.40.1) at <incomplete> on vxlan0opn01 (172.16.0.254) at 00:15:5d:00:c9:52 [ether] on eth0
root@vm1:# sudo arp -s 10.20.40.1 58:9c:fc:00:62:52? (10.20.40.1) at 58:9c:fc:00:62:52 [ether] PERM on vxlan0
root@opn01:~ # sudo arp -s 10.20.40.3 d6:c6:72:fa:cb:5b arp: writing to routing socket: Cannot allocate memory
root@opn01:~ # tcpdump -i hn6 -n port 4789tcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on hn6, link-type EN10MB (Ethernet), capture size 262144 bytes08:16:42.161162 IP 172.16.0.186.43134 > 172.16.0.254.4789: VXLAN, flags [I] (0x08), vni 42IP 10.20.40.3 > 10.20.40.1: ICMP echo request, id 51, seq 1, length 64
vxlan2: cannot initialize interface: can only specify interface with a group addressvxlan2: promiscuous mode enabled
vxlan0: Ethernet address: 58:9c:fc:10:b1:43vxlan0: changing name to 'vxlan2'vxlan2: link state changed to UP
root@opn01:~ # sudo arp -s 10.20.40.3 d6:c6:72:fa:cb:5broot@opn01:~ # arp -a? (10.20.40.3) at d6:c6:72:fa:cb:5b on vxlan2 permanent [ethernet]? (10.20.40.1) at 58:9c:fc:10:b1:43 on vxlan2 permanent [ethernet]
vxlan2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1355 description: vxlan2 (opt6) options=80020<JUMBO_MTU,LINKSTATE> ether 58:9c:fc:10:b1:43 inet6 fe80::5a9c:fcff:fe10:b143%vxlan2 prefixlen 64 scopeid 0x12 inet 10.20.40.1 netmask 0xffffff00 broadcast 10.20.40.255 groups: vxlan vxlan vni 42 local 172.16.0.254:4789 group 239.0.0.1:4789 media: Ethernet autoselect (autoselect <full-duplex>) status: active nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
vxlan vni 42 local 172.16.0.254:4789 group 239.0.0.1:4789
vxlan vni 42 local 172.16.0.254:4789 remote 172.16.0.186:4789
root@vm1: ping 10.20.40.1PING 10.20.40.1 (10.20.40.1) 56(84) bytes of data.^C--- 10.20.40.1 ping statistics ---2 packets transmitted, 0 received, 100% packet loss, time 1000msroot@vm1:~$ tcpdump -i any proto ICMP -ntcpdump: data link type LINUX_SLL2tcpdump: verbose output suppressed, use -v[v]... for full protocol decodelistening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes08:30:27.806017 vxlan0 Out IP 10.20.40.3 > 10.20.40.1: ICMP echo request, id 61, seq 1, length 6408:30:28.806352 vxlan0 Out IP 10.20.40.3 > 10.20.40.1: ICMP echo request, id 61, seq 2, length 64root@opn01:~ # tcpdump -i hn6 proto UDP and port 4789tcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on hn6, link-type EN10MB (Ethernet), capture size 262144 bytes10:30:27.808498 IP 172.16.0.186.43134 > opn01.vxlan: VXLAN, flags [I] (0x08), vni 42IP 10.20.40.3 > 10.20.40.1: ICMP echo request, id 61, seq 1, length 6410:30:28.808904 IP 172.16.0.186.43134 > opn01.vxlan: VXLAN, flags [I] (0x08), vni 42IP 10.20.40.3 > 10.20.40.1: ICMP echo request, id 61, seq 2, length 64root@opn01:~ # tcpdump -i vxlan2tcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on vxlan2, link-type EN10MB (Ethernet), capture size 262144 bytes10:30:27.808532 IP 10.20.40.3 > 10.20.40.1: ICMP echo request, id 61, seq 1, length 6410:30:28.808943 IP 10.20.40.3 > 10.20.40.1: ICMP echo request, id 61, seq 2, length 64