
スイッチから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