如下拓扑:

EIGRP metric 计算_metric

在R1上:

Router>enable

Router#config t

Router(config)#hostname R1

R1(config)#int s1/1

R1(config-if)#ip add 192.168.1.1 255.255.255.0

R1(config-if)#no shut

R1(config-if)#exit

R1(config)#router eigrp 100

R1(config-router)#network 192.168.1.0 0.0.0.255

R1(config-router)#end

R1#

在R2上:

Router>

Router>en

Router#config t

Router(config)#hostname R2

R2(config)#int s1/0

R2(config-if)#clock rate 56000

R2(config-if)#ip add 192.168.1.2 255.255.255.0

R2(config-if)#no shut

R2(config-if)#int lo1

R2(config-if)#ip add 192.168.2.1 255.255.255.0

R2(config-if)#no shut

R2(config-if)#exit

R2(config)#router eigrp 100

R2(config-router)#network 192.16

R2(config-router)#network 192.168.1.0 0.0.0.255

R2(config-router)#network 192.168.2.0 0.0.0.255

R2(config-router)#end

R2#

在R1上:

R1#show ip route

Codes: 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

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Serial1/1

D 192.168.2.0/24 [90/2297856] via 192.168.1.2, 00:00:08, Serial1/1

Metric: 2297856

带宽+延迟=最小带宽+总和延迟=[10的7次方/1544+(20000+5000)/10]*256=(6476+2500)*256=

R1#show int s1/1

Serial1/1 is up, line protocol is up

Hardware is M4T

Internet address is 192.168.1.1/24

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

reliability 255/255, txload 1/255, rxload 1/255

Encapsulation HDLC, crc 16, loopback not set

Keepalive set (10 sec)

Restart-Delay is 0 secs

Last input 00:00:01, output 00:00:01, output hang never

Last clearing of "show interface" counters never

Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0

Queueing strategy: weighted fair

Output queue: 0/1000/64/0 (size/max total/threshold/drops)

Conversations 0/1/256 (active/max active/max total)

Reserved Conversations 0/0 (allocated/max allocated)

Available Bandwidth 1158 kilobits/sec

5 minute input rate 0 bits/sec, 0 packets/sec

5 minute output rate 0 bits/sec, 0 packets/sec

14 packets input, 1549 bytes, 0 no buffer

Received 5 broadcasts, 0 runts, 0 giants, 0 throttles

0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort

19 packets output, 1741 bytes, 0 underruns

0 output errors, 0 collisions, 1 interface resets

0 output buffer failures, 0 output buffers swapped out

2 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up

R1#

EIGRP metric 计算_EIGRP_02

EIGRP metric 计算_EIGRP_03

下面修改R1的S1/1的接口带宽:

R1(config)#int s1/1

R1(config-if)#bandwitch

R1(config-if)#bandwidth 300

R1(config-if)#

开始计算:

EIGRP metric 计算_职场_04

取值:33333

(33333+2500)*256=

EIGRP metric 计算_EIGRP_05

查看R1的路由表:

R1#show ip route

Codes: 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

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Serial1/1

D 192.168.2.0/24 [90/9173248] via 192.168.1.2, 00:00:07, Serial1/1

试验完成。