设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 1134|回复: 0
收起左侧

CCNP课堂—PBR+SLA配置实例

[复制链接]
发表于 2015-1-12 17:15:03 | 显示全部楼层 |阅读模式
思科培训:CCNP课堂—PBR+SLA配置实例

[tr][/tr]
本文主要描述思科培训通过策略路由PBR和IP服务水平协议SLA来实现数据包的分流。
假设:Outside上设置默认路由到192.168.1.0/24,下一条指向R6:ip route 0.0.0.0 255.255.255.0 1.1.56.6
要求:但是从源IP:5.5.5.5/32出来的数据包必须走R4:并且保证链路的畅通性:

R5基本配置:
interface Loopback0
ip address 5.5.5.5 255.255.255.255

interface FastEthernet1/0
ip address 1.1.56.5 255.255.255.0

interface FastEthernet1/1
ip address 1.1.45.5 255.255.255.0
ip policy route-map AAA

ip local policy route-map AAA
ip route 0.0.0.0 0.0.0.0 1.1.56.6
route-map AAA permit 10
match interface Loopback0
set ip next-hop 1.1.45.4

R5#debug ip policy
R5#ping 4.4.4.4 sou lo0 :这里注意:如果是本地产生的流量,route-map默认是不匹配的,需要启用:[ip local policy route-map AAA]:才能让本地流量匹配AAA:

*Dec  3 18:48:32.823: IP: s=5.5.5.5 (local), d=4.4.4.4, len 100, policy match
*Dec  3 18:48:32.823: IP: route map AAA, item 10, permit
*Dec  3 18:48:32.827: IP: s=5.5.5.5 (local), d=4.4.4.4 (FastEthernet1/1), len 100, policy routed
*Dec  3 18:48:32.827: IP: local to FastEthernet1/1 1.1.45.4

此时如果关闭R4的F1/1接口:此时R5再pingR4:链路是否正常?
【不通】:解释:route-map无法区分下一跳是否可达。但是可以结合SLA来实现:

ip sla monitor 1
type echo protocol ipIcmpEcho 1.1.45.4
frequency 10
ip sla monitor schedule 1 life forever start-time now

track 2 rtr 1
route-map AAA permit 10
match interface Loopback0
set ip next-hop verify-availability 1.1.45.4 1 track 2

R5#ping 4.4.4.4 sou lo0 :思科培训这里注意:此时如果你关闭R4的F1/1,即使流量匹配了route-map,但是策略还是不会被执行,走正常的路由表:详细见以下debug信息
Wan30#debug ip policy
*Dec  3 18:49:42.115: IP: s=5.5.5.5 (local), d=4.4.4.4, len 100, policy match
*Dec  3 18:49:42.115: IP: route map AAA, item 10, permit
*Dec  3 18:49:42.115: IP: s=5.5.5.5 (local), d=4.4.4.4, len 100, policy rejected -- normal forwarding

通过以上配置实验,数据包分流实现。


您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-1-23 11:25 , Processed in 0.085397 second(s), 13 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表