ROUTE A: Version 11.2 No service udp-small-servers No service tcp-small-servers Hostname routerA Interface ethernet0 Ip address 192.1.1.1 255.255.255.0 secondary Ip address 192.1.1.2 255.255.255.0 secondary Ip address 192.1.1.3 255.255.255.0 secondary Ip address 192.1.1.10 255.255.255.0 Ip policy route-map lab1 //策略路由应用于E0口
ip local policy route-map lab1 //使路由器策略路由本地产生报文 no ip classless access-list 1 permit 192.1.1.1 access-list 2 permit 192.1.1.2 route-map lab1 permit 10 //定义策略路由图名称:LAB1,10为序号,用来标明被匹配的路由顺序。 Match ip address 1 //匹配地址为访问列表1 Set interface serial0 //匹配下一跳为S0 Route-map lab1 permit 20 Match ip address 2 Set interface serial1 Line con0 Line aux0 Line vty 0 4 Login End 路由器B为标准配置略。
相关调试命令: show ip policy show router-map debug ip policy