多路径路由控制(因双向重分布产生次优路由其解决办法)

1、网络拓扑图

多路径路由控制(双向重分布产生次优路由其解决办法)_解决办法

IOU设备接口连接说明:

r1 e0/0 r2 e0/0

r2 s1/0 r3 s1/0

r2 s1/1 r5 s1/1

r3 s1/1 r4 s1/1

r5 s1/0 r4 s1/0

 

1:0/0 2:0/0 rip

2:1/0 3:1/0 rip

2:1/1 5:1/1 rip

3:1/1 4:1/1 ospf

5:1/0 4:1/0 ospf

 

2、设备基本配置信息

r1#

interface Loopback0

 ipaddress 1.1.1.1 255.255.255.255

!

interface Loopback1

 ipaddress 11.11.11.11 255.255.255.255

!

interface Ethernet0/0

 ipaddress 192.168.12.1 255.255.255.0

router rip

 version 2

 passive-interface default

 nopassive-interface Ethernet0/0

 network 1.0.0.0

 network 11.0.0.0

 network 192.168.12.0

 noauto-summary

 

r2#

interface Ethernet0/0

 ipaddress 192.168.12.2 255.255.255.0

interface Serial1/0

 ipaddress 192.168.23.2 255.255.255.0

 serial restart-delay 0

!

interface Serial1/1

 ipaddress 192.168.25.2 255.255.255.0

 serial restart-delay 0

router rip

 version 2

 passive-interface default

 nopassive-interface Ethernet0/0

 nopassive-interface Serial1/0

 nopassive-interface Serial1/1

 network 192.168.12.0

 network 192.168.23.0

 network 192.168.25.0

 noauto-summary

 

r3#

interface Loopback0

 ipaddress 3.3.3.3 255.255.255.255

interface Serial1/0

 ipaddress 192.168.23.3 255.255.255.0

 nofair-queue

 serial restart-delay 0

!

interface Serial1/1

 ipaddress 192.168.34.3 255.255.255.0

 serial restart-delay 0

!

router ospf 100

 router-id 3.3.3.3

 log-adjacency-changes

 redistribute rip metric 1000 metric-type 1subnets tag 3

 passive-interface default

 nopassive-interface Serial1/1

 network 3.3.3.30.0.0.0 area 0

 network 192.168.34.0 0.0.0.255area 0

 distribute-list route-map 5 in

!

router rip

 version 2

 redistribute ospf 100 metric 10

 passive-interface default

 nopassive-interface Serial1/0

 network 192.168.23.0

 noauto-summary

route-map 5 deny 10

 match tag 5

!

route-map 5 permit 20

r4#

interface Loopback0

 ip address4.4.4.4 255.255.255.255

interface Serial1/0

 ipaddress 192.168.45.4 255.255.255.0

 nofair-queue

 serial restart-delay 0

!

interface Serial1/1

 ipaddress 192.168.34.4 255.255.255.0

 serial restart-delay 0

router ospf 100

 router-id 4.4.4.4

 log-adjacency-changes

 passive-interface default

 nopassive-interface Serial1/0

 nopassive-interface Serial1/1

 network 4.4.4.40.0.0.0 area 0

 network 192.168.34.0 0.0.0.255area 0

 network 192.168.45.0 0.0.0.255area 0

 

r5#

interface Loopback0

 ipaddress 5.5.5.5 255.255.255.255

interface Serial1/0

 ipaddress 192.168.45.5 255.255.255.0

 nofair-queue

 serial restart-delay 0

!

interface Serial1/1

 ipaddress 192.168.25.5 255.255.255.0

 serial restart-delay 0

router ospf 100

 router-id 5.5.5.5

 log-adjacency-changes

 redistribute rip metric 1000 metric-type 1subnets tag 5

 passive-interface default

 nopassive-interface Serial1/0

 network 5.5.5.50.0.0.0 area 0

 network 192.168.45.0 0.0.0.255area 0

 distribute-list route-map 3 in

!

router rip

 version 2

 redistributeospf 100 metric 10

 passive-interface default

 nopassive-interface Serial1/1

 network 192.168.25.0

 noauto-summary

 

3、次优路径的控制

r3#sh ip route

Codes: L - local, C - connected, S -static, R - RIP, M - mobile, B - BGP

      D - EIGRP, EX - EIGRP external, O - OSPF, IA -OSPF inter area

      N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

      E1 - OSPF external type 1, E2 - OSPF external type 2

      i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

      ia - IS-IS inter area, * - candidate default, U - per-user static route

      o - ODR, P - periodic downloaded static route, + - replicated route

 

Gateway of last resort is not set

 

     1.0.0.0/32 is subnetted, 1 subnets

O E2    1.1.1.1 [110/20] via 192.168.34.4,00:11:48, Serial1/1

     3.0.0.0/32 is subnetted, 1 subnets

C       3.3.3.3 is directly connected,Loopback0

     4.0.0.0/32 is subnetted, 1 subnets

O       4.4.4.4 [110/65] via 192.168.34.4,00:11:56, Serial1/1

     5.0.0.0/32 is subnetted, 1 subnets

O       5.5.5.5 [110/129] via 192.168.34.4,00:11:56, Serial1/1

     11.0.0.0/32 is subnetted, 1 subnets

O E2    11.11.11.11 [110/20] via192.168.34.4, 00:11:48, Serial1/1

O E2 192.168.12.0/24 [110/20] via 192.168.34.4, 00:11:48, Serial1/1

     192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.23.0/24 is directly connected, Serial1/0

L       192.168.23.3/32 is directly connected, Serial1/0

O E2 192.168.25.0/24 [110/20] via 192.168.34.4, 00:11:57, Serial1/1

     192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.34.0/24 is directly connected, Serial1/1

L       192.168.34.3/32 is directly connected, Serial1/1

O    192.168.45.0/24 [110/128] via 192.168.34.4, 00:11:57, Serial1/1

r3#traceroute 11.11.11.11

 

Type escape sequence to abort.

Tracing the route to 11.11.11.11

 

  1192.168.34.4 8 msec 8 msec 12 msec

  2192.168.45.5 16 msec 20 msec 16 msec

  3192.168.25.2 20 msec 16 msec 16 msec

  4192.168.12.1 20 msec *  20 msec

产生了次优路径!

多路径路由控制(双向重分布产生次优路由其解决办法)_解决办法_02

解决方法(1)通过修改管理距离AD:优选此方法!!!

distance ospf external 170

/ospf进程中修改外部路由的管理距离

 

r3#sh ip route

Codes: L - local, C - connected, S -static, R - RIP, M - mobile, B - BGP

      D - EIGRP, EX - EIGRP external, O - OSPF, IA -OSPF inter area

      N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

      E1 - OSPF external type 1, E2 - OSPF external type 2

      i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

      ia - IS-IS inter area, * - candidate default, U - per-user static route

      o - ODR, P - periodic downloaded static route, + - replicated route

 

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

R       1.1.1.1 [120/2] via 192.168.23.2,00:00:17, Serial1/0

     3.0.0.0/32 is subnetted, 1 subnets

C       3.3.3.3 is directly connected,Loopback0

     4.0.0.0/32 is subnetted, 1 subnets

O       4.4.4.4 [110/65] via 192.168.34.4,00:11:49, Serial1/1

     5.0.0.0/32 is subnetted, 1 subnets

O       5.5.5.5 [110/129] via 192.168.34.4,00:11:49, Serial1/1

     11.0.0.0/32 is subnetted, 1 subnets

R       11.11.11.11 [120/2] via 192.168.23.2,00:00:17, Serial1/0

R    192.168.12.0/24 [120/1] via 192.168.23.2, 00:00:17, Serial1/0

     192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.23.0/24 is directly connected, Serial1/0

L       192.168.23.3/32 is directly connected, Serial1/0

R    192.168.25.0/24 [120/1] via 192.168.23.2, 00:00:18, Serial1/0

     192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.34.0/24 is directly connected, Serial1/1

L       192.168.34.3/32 is directly connected, Serial1/1

O    192.168.45.0/24 [110/128] via 192.168.34.4, 00:11:50, Serial1/1

r3#traceroute 11.11.11.11

Type escape sequence to abort.

Tracing the route to 11.11.11.11

 

  1192.168.23.2 8 msec 8 msec 12 msec

  2192.168.12.1 8 msec *  8 msec

解决方法(2)通过分发列表distribute-list过滤:

r3#

router ospf 100

redistribute rip metric1000 metric-type 1 subnets tag 3

distribute-list route-map5 in

route-map 5 deny 10

 match tag 5

route-map 5 permit 20

/过滤掉从r5重分发进来并打了标签tag5的路由信息

r3#sh ip route

Codes: L - local, C - connected, S -static, R - RIP, M - mobile, B - BGP

      D - EIGRP, EX - EIGRP external, O - OSPF, IA -OSPF inter area

      N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

      E1 - OSPF external type 1, E2 - OSPF external type 2

      i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

      ia - IS-IS inter area, * - candidate default, U - per-user static route

      o - ODR, P - periodic downloaded static route, + - replicated route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

R       1.1.1.1 [120/2] via 192.168.23.2,00:00:18, Serial1/0

     3.0.0.0/32 is subnetted, 1 subnets

C       3.3.3.3 is directly connected,Loopback0

     4.0.0.0/32 is subnetted, 1 subnets

O       4.4.4.4 [110/65] via 192.168.34.4,00:01:32, Serial1/1

     5.0.0.0/32 is subnetted, 1 subnets

O       5.5.5.5 [110/129] via 192.168.34.4,00:01:32, Serial1/1

     11.0.0.0/32 is subnetted, 1 subnets

R       11.11.11.11 [120/2] via 192.168.23.2,00:00:18, Serial1/0

R    192.168.12.0/24 [120/1] via 192.168.23.2, 00:00:18, Serial1/0

     192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.23.0/24 is directly connected, Serial1/0

L       192.168.23.3/32 is directly connected, Serial1/0

R    192.168.25.0/24 [120/1] via 192.168.23.2, 00:00:19, Serial1/0

     192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.34.0/24 is directly connected, Serial1/1

L       192.168.34.3/32 is directly connected, Serial1/1

O    192.168.45.0/24 [110/128] via 192.168.34.4, 00:01:33, Serial1/1

r3#traceroute 11.11.11.11

Type escape sequence to abort.

Tracing the route to 11.11.11.11

 

  1192.168.23.2 8 msec 8 msec 8 msec

  2192.168.12.1 8 msec *  4 msec

----------------------------------------------------------------------------------------------

r5#

redistribute rip metric1000 metric-type 1 subnets tag 5

distribute-list route-map3 in

route-map 3 deny 10

 match tag 3

route-map 3 permit 20

/过滤掉从r3重分发进来并打了标签tag3的路由信息!

r5#sh ip route

Codes: L - local, C - connected, S -static, R - RIP, M - mobile, B - BGP

      D - EIGRP, EX - EIGRP external, O - OSPF, IA -OSPF inter area

      N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

      E1 - OSPF external type 1, E2 - OSPF external type 2

      i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

      ia - IS-IS inter area, * - candidate default, U - per-user static route

      o - ODR, P - periodic downloaded static route, + - replicated route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

R       1.1.1.1 [120/2] via 192.168.25.2,00:00:11, Serial1/1

     3.0.0.0/32 is subnetted, 1 subnets

O       3.3.3.3 [110/129] via 192.168.45.4,00:05:16, Serial1/0

     4.0.0.0/32 is subnetted, 1 subnets

O       4.4.4.4 [110/65] via 192.168.45.4,00:05:16, Serial1/0

     5.0.0.0/32 is subnetted, 1 subnets

C       5.5.5.5 is directly connected,Loopback0

     11.0.0.0/32 is subnetted, 1 subnets

R       11.11.11.11 [120/2] via 192.168.25.2,00:00:11, Serial1/1

R    192.168.12.0/24 [120/1] via 192.168.25.2, 00:00:11, Serial1/1

R    192.168.23.0/24 [120/1] via 192.168.25.2, 00:00:11, Serial1/1

     192.168.25.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.25.0/24 is directly connected, Serial1/1

L       192.168.25.5/32 is directly connected, Serial1/1

O    192.168.34.0/24 [110/128] via 192.168.45.4, 00:05:16, Serial1/0

     192.168.45.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.45.0/24 is directly connected, Serial1/0

L       192.168.45.5/32 is directly connected, Serial1/0

r5#traceroute 11.11.11.11

Type escape sequence to abort.

Tracing the route to 11.11.11.11

  1192.168.25.2 12 msec 8 msec 8 msec

  2192.168.12.1 8 msec *  12 msec

 

r4#sh ip route

Codes: L - local, C - connected, S -static, R - RIP, M - mobile, B - BGP

      D - EIGRP, EX - EIGRP external, O - OSPF, IA -OSPF inter area

      N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

      E1 - OSPF external type 1, E2 - OSPF external type 2

      i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

      ia - IS-IS inter area, * - candidate default, U - per-user static route

      o - ODR, P - periodic downloaded static route, + - replicated route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

O E1    1.1.1.1 [110/1064] via 192.168.45.5,00:08:10, Serial1/0

                 [110/1064] via 192.168.34.3,00:08:10, Serial1/1

      3.0.0.0/32 issubnetted, 1 subnets

O       3.3.3.3 [110/65] via 192.168.34.3,00:58:16, Serial1/1

     4.0.0.0/32 is subnetted, 1 subnets

C       4.4.4.4 is directly connected,Loopback0

     5.0.0.0/32 is subnetted, 1 subnets

O       5.5.5.5 [110/65] via 192.168.45.5,00:58:26, Serial1/0

     11.0.0.0/32 is subnetted, 1 subnets

O E1    11.11.11.11 [110/1064] via192.168.45.5, 00:08:10, Serial1/0

                     [110/1064] via192.168.34.3, 00:08:10, Serial1/1

O E1 192.168.12.0/24 [110/1064] via 192.168.45.5, 00:08:10, Serial1/0

                      [110/1064] via192.168.34.3, 00:08:10, Serial1/1

O E1 192.168.23.0/24 [110/1064] via 192.168.45.5, 00:08:11, Serial1/0

                      [110/1064] via192.168.34.3, 00:08:11, Serial1/1

O E1 192.168.25.0/24 [110/1064] via 192.168.45.5, 00:13:03, Serial1/0

                      [110/1064] via192.168.34.3, 00:10:53, Serial1/1

     192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.34.0/24 is directly connected, Serial1/1

L       192.168.34.4/32 is directly connected, Serial1/1

     192.168.45.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.45.0/24 is directly connected, Serial1/0

L       192.168.45.4/32 is directly connected, Serial1/0

/实现了到RIP路由的负载均衡功能!

 

解决方法(3)通过策略路由route-map配合ACL实现过滤

r3(config)#router ospf 100

r3(config-router)#no distribute-listroute-map 5 in

r3(config-router)#redistributeospf 100 metric 1

r3(config-router)#end

r3#sh ip route

Codes: L - local, C - connected, S - static,R - RIP, M - mobile, B - BGP

      D - EIGRP, EX - EIGRP external, O - OSPF, IA -OSPF inter area

      N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

      E1 - OSPF external type 1, E2 - OSPF external type 2

      i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

      ia - IS-IS inter area, * - candidate default, U - per-user static route

      o - ODR, P - periodic downloaded static route, + - replicated route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

O E1    1.1.1.1 [110/1128] via 192.168.34.4,00:02:12, Serial1/1

     3.0.0.0/32 is subnetted, 1 subnets

C       3.3.3.3 is directly connected, Loopback0

     4.0.0.0/32 is subnetted, 1 subnets

O       4.4.4.4 [110/65] via 192.168.34.4,00:02:12, Serial1/1

     5.0.0.0/32 is subnetted, 1 subnets

O       5.5.5.5 [110/129] via 192.168.34.4,00:02:12, Serial1/1

     11.0.0.0/32 is subnetted, 1 subnets

O E1    11.11.11.11 [110/1128] via 192.168.34.4,00:02:12, Serial1/1

O E1 192.168.12.0/24 [110/1128] via 192.168.34.4, 00:02:12, Serial1/1

     192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.23.0/24 is directly connected, Serial1/0

L       192.168.23.3/32 is directly connected, Serial1/0

O E1 192.168.25.0/24 [110/1128] via 192.168.34.4, 00:02:13, Serial1/1

     192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.34.0/24 is directly connected, Serial1/1

L       192.168.34.3/32 is directly connected, Serial1/1

O    192.168.45.0/24 [110/128] via 192.168.34.4, 00:02:13, Serial1/1

r3#traceroute 11.11.11.11

 

Type escape sequence to abort.

Tracing the route to 11.11.11.11

 

  1    192.168.34.4 8 msec 12 msec 8 msec

  2    192.168.45.5 16 msec 20 msec 16 msec

  3    192.168.25.2 20 msec 16 msec 16 msec

  4    192.168.23.3 28 msec 24 msec 28 msec

  5    192.168.34.4 28 msec 28 msec 24 msec

  6    192.168.45.5 36 msec 36 msec 32 msec

  7    192.168.25.2 36 msec 36 msec 36 msec

  8    192.168.23.3 44 msec 36 msec 48 msec

  9    192.168.34.4 40 msec 44 msec 40 msec

 10    192.168.45.5 56 msec 52 msec 48 msec

 11    192.168.25.2 52 msec 48 msec 56 msec

 12    192.168.23.3 60 msec 56 msec 64 msec

 13    192.168.34.4 56 msec 64 msec 60 msec

 14    192.168.45.5 68 msec 72 msec 72 msec

 15    192.168.25.2 72 msec 64 msec 72 msec

 16    192.168.23.380 msec 76 msec 80 msec

 17    192.168.34.4 76 msec 80 msec 80 msec

 18    192.168.45.5 92 msec 84 msec 84 msec

 19    192.168.25.2 92 msec 88 msec 84 msec

 20    192.168.23.3 96 msec 100 msec 100 msec

 21    192.168.34.4 92 msec 100 msec 100 msec

 22    192.168.45.5 108 msec 108 msec 104 msec

 23    192.168.25.2 108 msec 104 msec 104 msec

 24    192.168.23.3 116 msec 112 msec 116 msec

 25    192.168.34.4 108 msec 120 msec 112 msec

 26    192.168.45.5 128 msec 120 msec 124 msec

 27    192.168.25.2 124 msec 124 msec 124 msec

 28    192.168.23.3 132 msec 124 msec 132 msec

 29    192.168.34.4 132 msec 132 msec 136 msec

 30    192.168.45.5 140 msec 140 msec 132 msec

产生环路!

r2#sh ip route

Codes: L - local, C - connected, S -static, R - RIP, M - mobile, B - BGP

      D - EIGRP, EX - EIGRP external, O - OSPF, IA -OSPF inter area

      N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

      E1 - OSPF external type 1, E2 - OSPF external type 2

      i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

      ia - IS-IS inter area, * - candidate default, U - per-user static route

      o - ODR, P - periodic downloaded static route, + - replicated route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

R       1.1.1.1 [120/1] via 192.168.23.3, 00:00:27,Serial1/0

                 [120/1] via 192.168.12.1,00:00:24, Ethernet0/0

     3.0.0.0/32 is subnetted, 1 subnets

R       3.3.3.3 [120/1] via 192.168.23.3, 00:00:27,Serial1/0

     4.0.0.0/32 is subnetted, 1 subnets

R       4.4.4.4 [120/1] via 192.168.23.3, 00:00:27,Serial1/0

     5.0.0.0/32 is subnetted, 1 subnets

R       5.5.5.5 [120/1] via 192.168.25.5, 00:00:21,Serial1/1

                 [120/1] via 192.168.23.3,00:00:27, Serial1/0

     11.0.0.0/32 is subnetted, 1 subnets

R        11.11.11.11[120/1] via 192.168.23.3, 00:00:27, Serial1/0

                     [120/1] via 192.168.12.1,00:00:24, Ethernet0/0

     192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.12.0/24 is directly connected, Ethernet0/0

L       192.168.12.2/32 is directly connected, Ethernet0/0

     192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.23.0/24 is directly connected,Serial1/0

L       192.168.23.2/32 is directly connected, Serial1/0

     192.168.25.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.25.0/24 is directly connected, Serial1/1

L       192.168.25.2/32 is directly connected, Serial1/1

R    192.168.34.0/24 [120/1] via 192.168.23.3, 00:00:00, Serial1/0

R    192.168.45.0/24 [120/1] via 192.168.25.5, 00:00:21, Serial1/1

                      [120/1] via 192.168.23.3,00:00:00, Serial1/0

去往11.11.11.11优先从r3走,故产生环路!

多路径路由控制(双向重分布产生次优路由其解决办法)_产生_03

修改

r3(config-router)#redistribute ospf 100metric 10

r3#sh ip route

     1.0.0.0/32 is subnetted, 1 subnets

O E1    1.1.1.1 [110/1128] via 192.168.34.4,00:07:25, Serial1/1

     3.0.0.0/32 is subnetted, 1 subnets

C       3.3.3.3 is directly connected, Loopback0

     4.0.0.0/32 is subnetted, 1 subnets

O       4.4.4.4 [110/65] via 192.168.34.4,00:07:25, Serial1/1

     5.0.0.0/32 is subnetted, 1 subnets

O       5.5.5.5 [110/129] via 192.168.34.4,00:07:25, Serial1/1

     11.0.0.0/32 is subnetted, 1 subnets

O E1    11.11.11.11 [110/1128] via 192.168.34.4,00:07:25, Serial1/1

O E1 192.168.12.0/24 [110/1128] via 192.168.34.4, 00:07:25, Serial1/1

     192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.23.0/24 is directly connected, Serial1/0

L       192.168.23.3/32 is directly connected, Serial1/0

O E1 192.168.25.0/24 [110/1128] via 192.168.34.4, 00:07:25, Serial1/1

     192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.34.0/24 is directly connected, Serial1/1

L       192.168.34.3/32 is directly connected, Serial1/1

O    192.168.45.0/24 [110/128] via 192.168.34.4, 00:07:25, Serial1/1

r3# traceroute 11.11.11.11

Tracing the route to 11.11.11.11

  1192.168.34.4 8 msec 12 msec 8 msec

  2 192.168.45.516 msec 20 msec 20 msec

  3192.168.25.2 16 msec 20 msec 16 msec

  4192.168.12.1 16 msec *  20 msec

产生次优路径!

多路径路由控制(双向重分布产生次优路由其解决办法)_解决办法_04

r2#sh ip route

     1.0.0.0/32 is subnetted, 1 subnets

R       1.1.1.1 [120/1] via 192.168.12.1, 00:00:11,Ethernet0/0

     3.0.0.0/32 is subnetted, 1 subnets

R       3.3.3.3 [120/1] via 192.168.23.3, 00:00:10,Serial1/0

     4.0.0.0/32 is subnetted, 1 subnets

R       4.4.4.4 [120/10] via 192.168.25.5,00:00:12, Serial1/1

                 [120/10] via 192.168.23.3,00:00:10, Serial1/0

     5.0.0.0/32 is subnetted, 1 subnets

R       5.5.5.5 [120/1] via 192.168.25.5, 00:00:12,Serial1/1

     11.0.0.0/32 is subnetted, 1 subnets

R        11.11.11.11[120/1] via 192.168.12.1, 00:00:11, Ethernet0/0

     192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.12.0/24 is directly connected, Ethernet0/0

L       192.168.12.2/32 is directly connected, Ethernet0/0

     192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.23.0/24 is directly connected, Serial1/0

L       192.168.23.2/32 is directly connected, Serial1/0

     192.168.25.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.25.0/24 is directly connected, Serial1/1

L       192.168.25.2/32 is directly connected, Serial1/1

R     192.168.34.0/24 [120/1] via 192.168.23.3,00:00:11, Serial1/0

R    192.168.45.0/24 [120/1] via 192.168.25.5, 00:00:13, Serial1/1

基于上述几种次优路径办法解决!