스위치에서 192.168.1.200으로 ping을 해보니 ICMP 요청 패킷의 IP 헤더에 있는 소스 IP가 1.1.1.2인데 L2 헤더에 있는 소스 MAC이 MAC2이고 패킷이 Port2를 통해 Eth1로 전송되는 것을 볼 수 있습니다. . 이 경우 CentOS에는 ICMP 응답이 없습니다. 그러나 ICMP 요청의 IP와 MAC가 모두 Port2용인 경우(ping 명령의 옵션을 사용하여 지정) CentOS는 올바르게 응답합니다.
첫 번째 경우에는 커널이 몇 가지 확인 작업을 수행했고 불일치로 인해 패킷이 삭제된 것 같습니다. 하지만 증거를 찾을 수 없습니다. 이거 아는 사람 있나요? 이런 경우 가능하다면 해당 소스루틴을 지적해 주시기 바랍니다. 감사합니다!
CentOS의 커널 버전은 3.10.0입니다.
network settings as following:
============================Cent7.x============================
[root@CentOS ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 1.1.1.1 netmask 255.255.255.0 broadcast 1.1.1.255
inet6 fe80::201:edff:fefc:56fa prefixlen 64 scopeid 0x20<link>
ether 00:01:ed:fc:56:fa txqueuelen 1000 (Ethernet)
RX packets 139 bytes 16868 (16.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 5324 (5.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 2.2.2.1 netmask 255.255.255.0 broadcast 2.2.2.255
inet6 fe80::201:edff:fefc:56fb prefixlen 64 scopeid 0x20<link>
ether 00:01:ed:fc:56:fb txqueuelen 1000 (Ethernet)
RX packets 250 bytes 31688 (30.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 68 bytes 7524 (7.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.202 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::201:edff:fefc:56fc prefixlen 64 scopeid 0x20<link>
ether 00:01:ed:fc:56:fc txqueuelen 1000 (Ethernet)
RX packets 3000 bytes 500249 (488.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9054 bytes 12030772 (11.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@CentOS ~]# ip route
1.1.1.0/24 dev eth0 proto kernel scope link src 1.1.1.1 metric 100
2.2.2.0/24 dev eth1 proto kernel scope link src 2.2.2.1 metric 101
192.168.1.0/24 dev eth2 proto kernel scope link src 192.168.1.202 metric 102
[root@CentOS ~]#
[root@CentOS ~]# arp
Address HWtype HWaddress Flags Mask Iface
1.1.1.2 ether 12:31:23:12:31:2f C eth0
2.2.2.2 ether 12:31:23:12:31:41 C eth1
192.168.1.150 ether a0:36:9f:a0:d9:6e C eth2
============================Switch============================
[lsw]ip routing-table:
Destinations : 17 Routes : 18
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.0/24 Direct 0 0 1.1.1.2 Vlan2
1.1.1.0/32 Direct 0 0 1.1.1.2 Vlan2
1.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.255/32 Direct 0 0 1.1.1.2 Vlan2
2.2.2.0/24 Direct 0 0 2.2.2.2 Vlan20
2.2.2.0/32 Direct 0 0 2.2.2.2 Vlan20
2.2.2.2/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.255/32 Direct 0 0 2.2.2.2 Vlan20
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.202/32 Static 50 0 1.1.1.1 Vlan2
2.2.2.1 Vlan20
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[lsw]arp
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
1.1.1.1 0001-edfc-56fa 2 XGE1/1/1 293 D
2.2.2.1 0001-edfc-56fb 20 XGE1/1/2 724 D