【正文】
Router(configroutemap) set interface type number ? Router(configroutemap)set ip nexthop ipaddress ?路由器先檢查策略路由,后檢查路由表 Router(configroutemap) set ip nexthop ipaddress [...ipaddress] 定義發(fā)出的數(shù)據(jù)包的下一跳地址 Router(configroutemap) set interface type number [...type number] 定義發(fā)出的數(shù)據(jù)包的出口 19 特殊下一跳 路由器先檢查路由表,后檢查策略路由 Router(configroutemap) set ip default nexthop ipaddress [...ipaddress] 定義到達(dá)目的網(wǎng)絡(luò)時(shí)無(wú)顯式路由時(shí)的隱含下一跳地址 20 配置策略路由 ?set ip nexthop ipadd和 set ip default nexthop 21 應(yīng)用到端口 Router(configif) ip policy routemap maptag 在入口上應(yīng)用策略路由 Router(configif) ip routecache policy 開(kāi)啟快速交換策略路由 22 策略路由示例 ? ISP A. ? ISP B. 23 策略路由示例 RouterA(config) accesslist 1 permit ip RouterA(config) accesslist 2 permit ip RouterA(config) routemap access permit 10 RouterA(configroutemap) match ip address 1 RouterA(configroutemap) set ip default nexthop RouterA(configroutemap) routemap access permit 20 RouterA(configroutemap) match ip address 2 RouterA(configroutemap) set ip default nexthop RouterA(configroutemap) routemap access permit 30 RouterA(configroutemap) set default interface null0 RouterA(config) interface ether 0 RouterA(configif) ip address RouterA(configif) ip policy routemap access RouterA(config) interface serial 0 RouterA(configif) ip address RouterA(config) interface serial 1 RouterA(configif) ip address 24 策略路由的驗(yàn)證調(diào)試 ?顯示 IP策略應(yīng)用情況 routershow ip policy Interface Route map FastEther2 test ?Debug ip policy IP: s= (FastEther 1/1), d=(NULL), len=60, precedence=0, policy match RouteMap test, item = 10, permit IP: s= (FastEther 1/1), d=(FastEther 1/0), len=60, precedence=0, policy routed 25 顯示策略路由的配置 server_r1show routemap word routemap test, permit, sequence 10