广州啄木鸟计算机服务有限公司之广州电脑包月维护中.总结如下:Cisco IOS 策略路由配置中几个命令的使用和区别
set ip next-hop 与 set ip default next-hop
set interface 与 set default interface
不含"default" 的语句是不查询路由表就直接转发数据包到下一跳IP或接口,而含有"default" 的语句是先查询路由表,在找不到精确匹配的路由条目时才转发数据包到"default" 语句指定的下一跳 IP 或接口。
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.
set ip next-hop ip-address…… (have an explicit route to the destination)
set ip default next-hop ip-address…… (have no explicit route to the destination)
Default 实际上代表 default route table .IOS 默认优先使用策略路由,然后使用 default route,但是通过 default 命令可以改变这个行为。