策略路由中set ip default next-hop和set ip next-hop的区别
热8已有 69 次阅读 2011-03-17 14:14Introduction
This document provides a sample configuration for policy-based routing (PBR) using the set ip default next-hop and set ip next-hop commands.
The set ip default next-hop command verifies the existence of the destination IP address in the routing table, and…
-
if the destination IP address exists, the command does not policy route the packet, but forwards the packet based on the routing table.
-
if the destination IP address does not exist, the command policy routes the packet by sending it to the specified next hop.
The set ip next-hop command verifies the existence of the next hop specified, and…
-
if the next hop exists in the routing table, then the command policy routes the packet to the next hop.
-
if the next hop does not exist in the routing table, the command uses the normal routing table to forward the packet.
-
参考文档Cisco Document ID: 47121
-
http://www.cisco.com/en/US/tech/tk364/technologies_configuration_example09186a00801f3b54.shtml








发表评论 评论 (5 个评论)
如果不加default,会先查询策略路由的下一条,然后查询直连路由,也就是策略路由比直连路由还要优先
如果加上default
会先查询直连路由,然后查询策略路由
在核心交换机上做策略路由,这个参数很重要,不然会导致,直连网段的通信都指到了策略路由的下一条,所以这个参数必须加了,才能先查询直连路由,再查询策略路由,呵呵~
所以建议在适当的网络环境中使用default参数,呵呵。。。
如果不加default,会先查询策略路由的下一条,然后查询直连路由,也就是策略路由比直连路由还要优先
如果加上default
会先查
acl deny 该vlan的网段 其他vlan的汇聚网段
acl permit 该vlan的网段 any
这样只是到外部的流量才会被丢到策略路由的下一条
这样效果和使用default参数相同
要是其他品牌的网络设备没有defalut参数的特性就只能用上面的方法排除开了。。。
还是喜欢思科的东东,功能强大,哈哈~