EIGRP负载均衡实验

  • 格式:docx
  • 大小:44.66 KB
  • 文档页数:10

EIGRP 负载均衡实验

R1:

iinterface Serial2/0

ip address 12.1.1.1 255.255.255.0

serial restart-delay 0

clock rate 64000

!

interface Serial2/1

ip address 13.1.1.1 255.255.255.0

serial restart-delay 0

clock rate 64000

router eigrp 100

network 0.0.0.0

no auto-summary R2:

interface FastEthernet0/0

ip address 23.1.1.1 255.255.255.0

duplex auto

speed auto

interface Serial2/0

ip address 12.1.1.2 255.255.255.0

serial restart-delay 0

router eigrp 100

network 0.0.0.0

no auto-summary

R3:

interface FastEthernet0/0

ip address 23.1.1.2 255.255.255.0

duplex auto

speed auto

interface Serial2/1

ip address 13.1.1.2 255.255.255.0

serial restart-delay 0

router eigrp 100

network 0.0.0.0

no auto-summary R3路由表:

R3#show ip rou

Gateway of last resort is not set

23.0.0.0/24 is subnetted, 1 subnets

C 23.1.1.0 is directly connected, FastEthernet0/0

12.0.0.0/24 is subnetted, 1 subnets

D 12.1.1.0 [90/2172416] via 23.1.1.1, 00:01:06, FastEthernet0/0 //去12.1.1.0网段via f0/0

13.0.0.0/24 is subnetted, 1 subnets

C 13.1.1.0 is directly connected, Serial2/1

R3#show ip eigrp to

IP-EIGRP Topology Table for AS(100)/ID(23.1.1.2)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

r - reply Status, s - sia Status

P 12.1.1.0/24, 1 successors, FD is 2172416

via 23.1.1.1 (2172416/2169856), FastEthernet0/0

via 13.1.1.1 (2681856/2169856), Serial2/1

P 13.1.1.0/24, 1 successors, FD is 2169856

via Connected, Serial2/1

P 23.1.1.0/24, 1 successors, FD is 28160

via Connected, FastEthernet0/0 //拓扑表中有两条可以到12.1.1.0网段的路径,F0/0和S1/1,经过s1/1那条路径的AD小于正在使用路由条目的FD2172416,所以被选为FS放在拓扑表中.

要想实验负载均衡,可以用的办法:

等价负载均衡(1):使得metric值相同

1.改带宽(不推荐,因为改带宽要用107 去除,会得到小数,)

2.改延迟,在R3上改f0/0 或s1/1其中的一个

R3#show inter f0/0

FastEthernet0/0 is up, line protocol is up

Hardware is AmdFE, address is cc02.07fc.0000 (bia cc02.07fc.0000)

Internet address is 23.1.1.2/24

MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,

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

R3#show int s2/1

Serial2/1 is up, line protocol is up

Hardware is M4T

Internet address is 13.1.1.2/24

MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,

先改s2/1

R3(config-if)#delay ?

<1-16777215> Throughput delay (tens of microseconds) 延迟路由器会自动乘以10所以这里要改成和f0/0 的DLY一样只需

R3(config-if)#delay 10

R3#clear ip eigrp neighbors

邻居关系重新建立

R3#show ip eigrp to

IP-EIGRP Topology Table for AS(100)/ID(23.1.1.2)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

r - reply Status, s - sia Status

P 12.1.1.0/24, 2 successors, FD is 2172416

via 13.1.1.1 (2172416/2169856), Serial2/1

via 23.1.1.1 (2172416/2169856), FastEthernet0/0

P 13.1.1.0/24, 1 successors, FD is 1660416

via Connected, Serial2/1

P 23.1.1.0/24, 1 successors, FD is 28160

via Connected, FastEthernet0/0

R3#show ip route

Gateway of last resort is not set

23.0.0.0/24 is subnetted, 1 subnets

C 23.1.1.0 is directly connected, FastEthernet0/0

12.0.0.0/24 is subnetted, 1 subnets

D 12.1.1.0 [90/2172416] via 23.1.1.1, 00:01:08, FastEthernet0/0

[90/2172416] via 13.1.1.1, 00:01:08, Serial2/1 13.0.0.0/24 is subnetted, 1 subnets

C 13.1.1.0 is directly connected, Serial2/1

metric值已经相同,路由表中有两条路由,负载均衡成功!

当然也可以修改f0/0

R3(config)#int f0/0

R3(config-if)#delay 2000 一样可能达到负载均衡的效果

等价负载均衡(2): offset-list

P 12.1.1.0/24, 1 successors, FD is 2172416

via 23.1.1.1 (2172416/2169856), FastEthernet0/0

via 13.1.1.1 (2681856/2169856), Serial2/1

R3(config)#access-list 1 permit 12.1.1.0

R3(config)#router eigrp 100

R3(config-router)#offset-list 1 in 509440 f0/0

在这里只能改小的,大的减小的即为偏移的值,其中有个参数”in”,如果对自己产生影响用”in”如果对外面产生影响用”out”,509440是偏移值,后面还有个接口,是说,在这个接口上加上偏移值,如果不定义接口,默认在所有接口加偏移值.

R3#show ip rout

Gateway of last resort is not set

23.0.0.0/24 is subnetted, 1 subnets C 23.1.1.0 is directly connected, FastEthernet0/0

12.0.0.0/24 is subnetted, 1 subnets

D 12.1.1.0 [90/2681856] via 23.1.1.1, 00:00:04, FastEthernet0/0

[90/2681856] via 13.1.1.1, 00:00:04, Serial2/1

13.0.0.0/24 is subnetted, 1 subnets

C 13.1.1.0 is directly connected, Serial2/1

不等价负载均衡:variance

P 12.1.1.0/24, 1 successors, FD is 2172416

via 23.1.1.1 (2172416/2169856), FastEthernet0/0

via 13.1.1.1 (2681856/2169856), Serial2/1

R3(config)#router eigrp 100

R3(config-router)#var

R3(config-router)#variance ?

<1-128> Metric variance multiplier

R3(config-router)#variance 2

R3#show ip rou

Gateway of last resort is not set

23.0.0.0/24 is subnetted, 1 subnets

C 23.1.1.0 is directly connected, FastEthernet0/0

12.0.0.0/24 is subnetted, 1 subnets

D 12.1.1.0 [90/2172416] via 23.1.1.1, 00:00:45, FastEthernet0/0