Linux 多网卡设置同一网段,引发的问题
2017-09-29 19:58
477 查看
Linux 多网卡设置同一网段,引发的问题 Server有两个网口,两个网口IP均为同一个网段 网口1:172.16.18.102/16,通往公司局域网 网口2:172.16.18.13/16,直接连接一个NAS服务器,NAS与上述两个IP也为同一个网段 NAS服务器:172.16.16.20/16 问题表现: 按照上述连接,Server访问任何机器都好使,就是无法访问NAS服务器 原理: 路由表决策, [root@localhost ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.16.0.0 0.0.0.0 255.255.0.0 U 100 0 0 enp2s0f0 172.16.0.0 0.0.0.0 255.255.0.0 U 101 0 0 enp2s0f1 [root@localhost ~]# 可以看到,所有数据都是通过enp2s0f0网口 [root@localhost ~]# arp -an ? (172.16.66.22) at 00:1f: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 [root@localhost ~]# 解决办法,手动指定一条路由 通过enp2s0f1网口访问172.16.16.20 route add -host 172.16.16.20 dev enp2s0f1 测试: [root@localhost ~]# ping 172.16.16.20 PING 172.16.16.20 (172.16.16.20) 56(84) bytes of data. 64 bytes from 172.16.16.20: icmp_seq=1 ttl=64 time=0.062 ms 64 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, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.059/0.060/0.062/0.007 ms [root@localhost ~]# 问题解决!
相关文章推荐
- linux 设置默认网关与网卡ip不同网段
- Linux双网卡设置IP属于同一网段的问题
- Linux双网卡设置IP属于同一网段的问题
- Linux 网卡设置问题(VM虚拟机不能正常连接网络)
- Linux双网卡设置IP属于同一网段的问题
- 双网卡设置同一网段IP地址的问题(2)
- Linux多网卡同网段问题
- linux下多网卡绑定设置问题
- linux双网卡同网段路由问题解决方法
- Linux双网卡设置IP属于同一网段的问题
- Linux双网卡设置IP属于同一网段的问题
- linux下多网卡配置同网段IP的问题以及解决方法
- Linux下多个jdk引发的问题
- LINUX与XP双系统共存直接删除LIUNX引发的问题
- linux设置crontab时遇到的两个问题
- linux 网卡模式设置 mii-tool 和ethtool
- Linux下Opera中文输入问题及中文字体设置解决方案
- [编程实例]linux 设置网卡为混杂模式
- vmware linux双网卡设置
- Linux/Unix命令之Ethtool (设置千兆网卡速度及模式)