Cisco网络应用中基于策略路由的配置( 二 )


我们怎样避免这个问题呢?修改路由图使防火墙地址为下一跳 。
Config changed on Cisco_WAN_Router:
!
route-map net-10 permit 10
match ip address 111
set ip next-hop 172.16.39.2
!
修改后,在Internet Router上运行同样的命令:debug ip packet 101 detail 。这时,数据包可以按配置前进 。我们也能看到数据包被防火墙翻译成了172.16.255.1 。192.1.1.1主机的回应:
Results of ping from Cisco_1 to 192.1.1.1/internet taken from Internet_Router:
2d15h: IP: s=172.16.255.1 (Ethernet1), d=192.1.1.1 (Serial0), g=192.1.1.1, len 100, forward
2d15h: ICMP type=8, code=0
2d15h:
2d15h: IP: s=192.1.1.1 (Serial0), d=172.16.255.1 (Ethernet1), g=172.16.20.2, len 100, forward
2d15h: ICMP type=0, code=0
2d15h:
在Cisco WAN路由器上执行debug ip policy命令后,我们可以看到数据包被传递到了防火墙,172.16.39.2:
Debug commands run from Cisco_WAN_Router:
"debug ip policy"
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1, len 100, policy match
2d15h: IP: route map net-10, item 20, permit
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1 (Ethernet0/1), len 100, policy routed
【Cisco网络应用中基于策略路由的配置】2d15h: IP: Ethernet3/0 to Ethernet0/1 172.16.39.2

推荐阅读