© 2003, Cisco Systems, Inc. All rights reserved.
路由策略基础
策略路由配置命令
1. 定义route-map
route-map xxx per 10
match ip add 1 匹配列表1的内容
set int s1 e0 匹配上面则去s1口,s1有问题时用e0
route-map xxx per 20
match ip add 2
set int e0 s1
2. 定义ACL
access 1 per
access 2 per
3. 应用到接口
int s0
ip police route-map xxx 设置路由策略
注意:路由策略是基于源的
4. 查看命令
sh ip policy
sh route-map
策略路由深入
route-map pbr
match ip address 101
set ip next-hop {}
Set intface vlan 10
route-map pbr
match ip address 101
set ip default next-hop {设定101列表定义的路由的缺省下一跳}
Set default intface vlan 10
策略使用原则
路由表的查找顺序:
1、pbr的set ip next-hop 是发生在查表之前
2、明细路由
3、主类路由
4、pbr的set ip default next-hop 发生在查找缺省之前;即应用在没有详细路由时)
5、缺省路由
一般PBR只针对IN的流量,对于自己产生的流量不起作用,在cisco全局模式下利用命令
ip local polical route-map xxx 针对发生在一个路由器上的
PBR案例
P教程之PBR 来自淘豆网www.taodocs.com转载请标明出处.