廣州啄木鳥計算機服務有限公司之廣州電腦包月維護中.總結如下: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 命令可以改變這個行為。