策略路由故障问题

一、处理经过

[idctest@guangzhou_1 ~]$ sudo /sbin/ip rule list [sudo] password for idctest: Sorry, try again. [idctest@guangzhou_1 ~]$ sudo /sbin/ip rule list [sudo] password for idctest: Sorry, try again. [sudo] password for idctest: 0: from all lookup 255 32758: from 163.177.181.110 lookup uni 32759: from 120.31.132.223 lookup tel 32760: from 163.177.181.110 lookup uni 32761: from 120.31.132.223 lookup tel 32762: from 163.177.181.110 lookup uni 32763: from 120.31.132.223 lookup tel 32764: from 163.177.181.110 lookup uni 32765: from 120.31.132.223 lookup tel 32766: from all lookup main 32767: from all lookup default

[idctest@guangzhou_1 ~]$ sudo /sbin/route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

120.31.132.128 0.0.0.0 255.255.255.128 U 0 0 0 eth0

163.177.181.0 0.0.0.0 255.255.255.128 U 0 0 0 eth1

192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2

192.168.6.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3

169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3

0.0.0.0 120.31.132.129 0.0.0.0 UG 0 0 0 eth0

[idctest@guangzhou_1 etc]$ sudo /sbin/service network restart Shutting down interface eth0:  [  OK  ] Shutting down interface eth1:  [  OK  ] Shutting down interface eth2:  [  OK  ] Shutting down interface eth3:  [  OK  ] Shutting down loopback interface:  [  OK  ] Disabling IPv4 packet forwarding:  net.ipv4.ip_forward = 0 [  OK  ] Bringing up loopback interface:  [  OK  ] Bringing up interface eth0:  [  OK  ] Bringing up interface eth1:  [  OK  ] Bringing up interface eth2:  [  OK  ] Bringing up interface eth3:  [  OK  ] [idctest@guangzhou_1 etc]$ sudo  echo 1 >/proc/sys/net/ipv4/ip_forward   -bash: /proc/sys/net/ipv4/ip_forward: Permission denied 

左边正常双网卡双ip,单网关策略路由,不同vlan 右边一条上联口,vlan1是客户的交换机,双网卡双ip,单网关策略路由,相同vlan 输入图片说明 右边网络不刷策略路由不刷路由表,可以通 正常所有都走电信网关

当刷策略路由或者刷路由表的时候,不能通 因为eth1网卡不能转发ipv4数据,所以不能从联通的ip走联通网关出去 [idctest@guangzhou_1 ~]$ sudo /sbin/service network restart Shutting down interface eth0:  [  OK  ] Shutting down interface eth1:  [  OK  ] Shutting down interface eth2:  [  OK  ] Shutting down interface eth3:  [  OK  ] Shutting down loopback interface:  [  OK  ] Disabling IPv4 packet forwarding:  net.ipv4.ip_forward = 0 [  OK  ] Bringing up loopback interface:  [  OK  ] Bringing up interface eth0:  [  OK  ] Bringing up interface eth1:  [  OK  ] Bringing up interface eth2:  [  OK  ] Bringing up interface eth3:  [  OK  ] [idctest@guangzhou_1 ~]$ sudo /sbin/ip route add default via 163.177.181.1 dev eth1 src 163.177.181.110 table uni [idctest@guangzhou_1 ~]$ sudo /sbin/ip rule add from 163.177.181.110 table uni

[idctest@guangzhou_1 ~]$ sudo /sbin/route -n Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 120.31.132.128  0.0.0.0         255.255.255.128 U     0      0        0 eth0 163.177.181.0   0.0.0.0         255.255.255.128 U     0      0        0 eth1 192.168.7.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2 192.168.6.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3 0.0.0.0         120.31.132.129  0.0.0.0         UG    0      0        0 eth0

由睿江云运维人员提供,想了解更多,请登陆www.eflycloud.com

转载于:https://my.oschina.net/u/3363053/blog/891330

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值