非等价带宽负载均衡 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

实验要求:R2实现到达R1的LO0口的 非等价带宽负载均衡

R1:

Router>en

Router#conf t

Router(config)#no ip domain-lo

Router(config)#line con 0

Router(config-line)#exec-t 0 0

Router(config-line)#host R1

R1(config)#int lo0

R1(config-if)#ip add 1.1.1.1 255.255.255.0

R1(config)#int s1/1

R1(config-if)#ip add 12.1.1.1 255.255.255.0

R1(config-if)#no shut

R1(config-if)#clock rate 64000

R1(config)#int fa0/0

R1(config-if)#ip add 100.1.1.1 255.255.255.0

R1(config-if)#no shut

R1(config-router)#router eigrp 100

R1(config-router)#no auto-summary 

R1(config-router)#net 12.1.1.0 0.0.0.255

R1(config-router)#net 1.1.1.0 0.0.0.255

R1(config-router)#net 100.1.1.0 0.0.0.255

R1(config-router)#exit

R2

Router>en

Router#conf t

Router(config)#no ip domain-lo

Router(config)#line con 0

Router(config-line)#exec-t 0 0

Router(config)#host R2

R2(config-line)#int fa0/0

R2(config-if)#ip add 100.1.1.2 255.255.255.0

R2(config-if)#no shut

R2(config-if)#int s1/0

R2(config-if)#ip add 12.1.1.2 255.255.255.0

R2(config-if)#no shut 

R2(config-if)#clock rate 54000

%Clockrate bestfitted (rounded) to 54120

R2(config-if)#router eigrp 100

R2(config-router)#no auto-summary 

R2(config-router)#net 12.1.1.0 0.0.0.255

R2(config-router)#net 100.1.1.0 0.0.0.255

Router#show ip rou

Codes: C - connected, S - static, I - IGRP, 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, E - EGP

       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

Gateway of last resort is not set

     1.0.0.0/24 is subnetted, 1 subnets

D       1.1.1.0 [90/156160] via 100.1.1.1, 00:00:33, FastEthernet0/0

     100.0.0.0/24 is subnetted, 1 subnets

C       100.1.1.0 is directly connected, FastEthernet0/0

     12.0.0.0/24 is subnetted, 1 subnets

C       12.1.1.0 is directly connected, Serial1/0

我们只需这样:在R2上加上

R2(config)#router eigrp 100

R2(config-router)#variance 15

我们看下效果:

R2#show ip rou

Codes: C - connected, S - static, I - IGRP, 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, E - EGP

       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

Gateway of last resort is not set

     1.0.0.0/24 is subnetted, 1 subnets

D       1.1.1.0 [90/156160] via 100.1.1.1, 00:08:53, FastEthernet0/0

                [90/2297856] via 12.1.1.1, 00:08:53, Serial1/0

     100.0.0.0/24 is subnetted, 1 subnets

C       100.1.1.0 is directly connected, FastEthernet0/0

     12.0.0.0/24 is subnetted, 1 subnets

C       12.1.1.0 is directly connected, Serial1/0