Environmental summary
kubernetes version: v1.15.0
Operating system: centos7
192.168.1.70-master node-flannel subnet 10.244.0.0/24
192.168.1.71-node node-flannel subnet 10.244.1.0/24
Scenario 1: Send an ICMP packet on the master node to the pod on the node node
Monitor the external network card ens32 on the master node
#8472 is the port monitored by the flannel process
#10.244.0.0 is the IP of the source VTEP device
#10.244.1.9 is the IP of the destination Pod
[root@master ~]# tcpdump udp -i ens32 -nn
14:42:43.792927 IP 192.168.1.70.44197 > 192.168.1.71.8472: OTV, flags [I] (0x08), overlay 0, instance 1
IP 10.244.0.0 > 10.244.1.9: ICMP echo request, id 48129, seq 441, length 64
14:42:43.793258 IP 192.168.1.71.41132 > 192.168.1.70.8472: OTV, flags [I] (0x08), overlay 0, instance 1
IP 10.244.1.9 > 10.244.0.0: ICMP echo reply, id 48129, seq 441, length 64
Found: The outer IP of the data packet is the host IP of both parties, and the inner IP is the IP of the flannel.1 network card and the IP of the target pod
Monitor the flannel.1 device and cni0 device on the node1 node
Monitor flannel.1 device
Monitor cni0 device
Scenario 2: Ping the Pod on node1 in the master's Pod
Enter the pod to ping the pod on another node
Monitor the external network card ens32 on the master node
#8472 is the port monitored by the flannel process
#10.244.0.5 is the IP of the source Pod #10.244.1.9 is the IP
of the destination Pod
[root@master ~]# tcpdump udp -i ens32 -nn
15:11:18.245905 IP 192.168.1.70. 59468> 192.168.1.71.8472: OTV, flags [I] (0x08), overlay 0, instance 1
IP 10.244.0.5> 10.244.1.9: ICMP echo request, id 4352, seq 0, length 64
15:11:18.246494 IP 192.168.1.71.60179> 192.168.1.70.8472: OTV, flags [I] (0x08), overlay 0, instance 1
IP 10.244.1.9> 10.244.0.5: ICMP echo reply, id 4352, seq 0, length 64
Found: The outer IP of the packet is the IP of both hosts, and the inner IP is the IP of the two pods