linux multiple network cards set up the same network segment, causing the problem server has two network ports, two network port IP are the same network segment network Port 1:172.16.18.102/16, to the corporate LAN network Port 2:172.16.18.13/ 16, directly connected to a NAS server, NAS and the above two IP also for the same network segment NAS server: 172.16.16.20/16 problem performance: According to the above connection, the server accesses any machine to make it impossible to access the NAS Server principle: Routing table decision, [[ email protected] ~]# route -nkernel ip routing tabledestination Gateway Genmask Flags Metric Ref Use Iface172.16.0.0 0.0.0.0 255.255.0.0 U 100 0 0 enp2s0f0172.16.0.0 0.0.0.0 255.255.0.0 U 101 0 &Nbsp; 0 enp2s0f1[[email protected] ~] #可以看到, All data is at 00:1f via ENP2S0F0 network Port [[email protected] ~]# arp -an? (172.16.66.22): c6:9c:a2:11 [ether] on enp2s0f0? (172.16.66.234) at f4:4d:30:0b:53:95 [ ether] on enp2s0f0? (172.16.20.243) at 08:9e:01:24:7d:bd [ether] on enp2s0f0[[email protected] ~]# workaround, manually specify a route to access through the ENP2S0F1 network Port 172.16.16.20 route add  -HOST 172.16.16.20 DEV ENP2S0F1 Test:[[email protected] ~]# ping 172.16.16.20ping 172.16.16.20 (172.16.16.20) 56 (+) bytes of data.64 bytes from 172.16.16.20: icmp_seq=1 ttl=64 time=0.062 ms64 bytes from 172.16.16.20: icmp_seq=2 ttl=64 time=0.059 ms^c--- 172.16.16.20 ping statistics ---2 PACKETS TRANSMITTED,&Nbsp;2 received, 0% packet loss, time 999msrtt min/avg/max/mdev = 0.059/0.060/0.062/0.007 ms[[email protected] ~]# Problem Solving!
This article is from the "Li Chunli" blog, make sure to keep this source http://990487026.blog.51cto.com/10133282/1969827
Linux Multi-NIC sets the same network segment, causing problems