- 积分
- 330
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 最后登录
- 1970-1-1
- 阅读权限
- 30
- 听众
- 收听
初级工程师
  
|
3鸿鹄币
配置用的是PBR
基本配置:IOU1(config)#ip route 0.0.0.0 0.0.0.0 74.1.1.4
IOU1(config)#ip route 0.0.0.0 0.0.0.0 75.1.1.5
IOU1(config)#ip route 172.16.2.0 255.255.255.0 172.16.2.4
IOU1(config)#ip route 172.16.1.0 255.255.255.0 172.16.1.4
IOU1(config)#access-list 1permit 172.16.1.0 0.0.0.255
IOU1(config)#access-list 2 permit 172.16.2.0 0.0.0.255
IOU2配置: IOU2(config)#router ospf 100
net 0.0.0.0 255.255.255.255 a 0
IOU3配置: IOU3(config)#router ospf 100
net 0.0.0.0 255.255.255.255 a 0
IOU4配置: IOU4(config)#router ospf 100
net 0.0.0.0 255.255.255.255 a 0
其他接口略。。。。。
配置PBR:
IOU1(config)#route-map B permit 10
match ip address 1
set ip netx-hop 74.1.1.4
IOU1(config)#route-map B permit 20
match ip address 2
set ip netx-hop 75.1.1.5
c1(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.4
c2(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.4
配置完了后IOU1上打开debug ip policy
用c1#ping 6.6.6.6 (IOU4上的环回接口) 就不通了。IOU1显示的如下
--More--
*Oct 23 14:22:45.606: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, FIB policy match
*Oct 23 14:22:45.606: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, PBR Counted
*Oct 23 14:22:45.606: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, g=74.1.1.4, len 100, FIB policy routed
--More--
*Oct 23 14:22:47.610: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, FIB policy match
*Oct 23 14:22:47.610: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, PBR Counted
*Oct 23 14:22:47.610: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, g=74.1.1.4, len 100, FIB policy routed
--More--
*Oct 23 14:22:49.612: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, FIB policy match
*Oct 23 14:22:49.612: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, PBR Counted
*Oct 23 14:22:49.612: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, g=74.1.1.4, len 100, FIB policy routed
--More--
*Oct 23 14:22:51.616: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, FIB policy match
*Oct 23 14:22:51.616: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, PBR Counted
*Oct 23 14:22:51.616: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, g=74.1.1.4, len 100, FIB policy routed
--More--
*Oct 23 14:22:53.616: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, FIB policy match
*Oct 23 14:22:53.616: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, len 100, PBR Counted
*Oct 23 14:22:53.616: IP: s=172.16.2.3 (Ethernet0/1), d=6.6.6.6, g=74.1.1.4, len 100, FIB policy routed
请教一下大家我哪里做错了。谢谢了
|
-
最佳答案
查看完整内容
感觉应该是NAT的配置有问题,你贴出来一下,我个人的话动态的双出口NAT会这么配置
对PNAT的动态切换接口
ip nat inside source route-map E1/0 interface E1/0 overload
ip nat inside source route-map E1/1 interface E1/1 overload
-------------------------一个ACL或者route-map只能匹配一个NAT接口
匹配路由图
route-map E1/0 permit 10
match ip address 1 2
match interface E1/0
route-map E1/1 permi ...
|