+广播喇叭+

+自言自语+

+评头论足+

+留言蜚语+

+友情客串+

+博客信息+


pbr路由选路
飞天小雄 发表于 2008-6-29 11:06:21


1)底层配置

R1#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            14.0.0.1        YES manual up                    up        

Serial2/1                  12.0.0.1        YES manual up                    up     

Serial2/2                  15.0.0.1        YES manual up                    up     

  

 

 

R2#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

Serial2/1                  12.0.0.2        YES manual up                    up     

Serial2/2                  23.0.0.2        YES manual up                    up     

 

 

R3#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol  

Serial2/1                  23.0.0.3        YES manual up                    up     

Serial2/2                  34.0.0.3        YES manual up                    up     

 

 

 

R4#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            14.0.0.4        YES manual up                    up        

Serial2/1                  34.0.0.4        YES manual up                    up  

 

 

 

R5#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol 

Serial2/1                  15.0.0.5        YES manual up                    up       

Loopback0                  5.5.5.5         YES manual up                    up     

 

 

 

2)运行eigrp

R1(config)#router ei 10

R1(config-router)#net 12.0.0.0

R1(config-router)#net 15.0.0.0

R1(config-router)#net 14.0.0.0

 

 

R2(config)#router ei 10

R2(config-router)#net 12.0.0.0

R2(config-router)#net 23.0.0.0

 

 

 

R3(config)#router ei 10

R3(config-router)#net 23.0.0.0

R3(config-router)#net 34.0.0.0

 

 

 

R4(config)#router ei 10

R4(config-router)#net 14.0.0.0

R4(config-router)#net 34.0.0.0

 

 

R5(config)#router ei 10 

R5(config-router)#net 15.0.0.0

 

3)确保运行:

R5(config-router)#end

R5#ping

01:06:15: %SYS-5-CONFIG_I: Configured from console by console

R5#ping 3.3.3.3

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 172/293/484 ms

确保能ping3.3.3.3

 

 

 

TracerouteR53.3.3.3的路径:

R5# traceroute 3.3.3.3

 

Type escape sequence to abort.

Tracing the route to 3.3.3.3

 

  1 15.0.0.1 468 msec 400 msec 136 msec

  2 14.0.0.4 488 msec 472 msec 492 msec

  3 34.0.0.3 880 msec 1236 msec 760 msec

路径: R1---R4—R3

 

 

 

R1配置使之走R1--R2—R3而非走R1---R4—R3

R1(config)#access-list 1 permit 15.0.0.5

抓出15.0.0.5的路由

R1(config)#route-map PBR permit 10

命名route-map

R1(config-route-map)#match ip add 1

匹配访问控制列表

R1(config-route-map)#set ip next-hop 12.0.0.2

设置下一跳为12.0.0.2

R1(config-route-map)#exi

R1(config)#int s2/2

R1(config-if)#ip policy route-map PBR

接口匹配策略

 

 

 

 

再次查看R53.3.3.3的路径

R5#traceroute 3.3.3.3

 

Type escape sequence to abort.

Tracing the route to 3.3.3.3

 

  1 15.0.0.1 136 msec 140 msec 108 msec

  2 14.0.0.4 156 msec 312 msec 88 msec

  3 34.0.0.3 248 msec *  352 msec

R5#traceroute 3.3.3.3

 

Type escape sequence to abort.

Tracing the route to 3.3.3.3

 

  1 15.0.0.1 112 msec 108 msec 64 msec


阅读全文 | 回复(0) | 引用通告 | 编辑
 

发表评论:

    昵称:
    密码:
    主页:
    标题:
Powered by Oblog.