23
第23篇:EIGRP基础实验
上一节我们学习了EIGRP Stuck In Active,今天我们开始学习EIGRP基础实验,跟着我一起往下看吧。
配置EIGRP实验
说明:实验配置共包含:
EIGRP基础实验
EIGRP非等价负载均衡
EIGRP Stub
EIGRP手工汇总
EIGRP认证
EIGRP默认路由
我们逐个往下看,本节先讲EIGRP基础实验。
1.配置网络基础环境
(1)配置R1:
r1(config)#int f0/0
r1(config-if)#ip address 13.1.1.1 255.255.255.0
r1(config-if)#no sh
r1(config)#int f0/1
r1(config-if)#ip add 12.1.1.1 255.255.255.0
r1(config-if)#no sh
r1(config)#router eigrp 1
r1(config-router)#no auto-summary
r1(config-router)#network 13.1.1.1 0.0.0.0
r1(config-router)#network 12.1.1.1 0.0.0.0
说明:在R1上配置12.1.1.0/24,13.1.1.0/24,并放入EIGRP进程中。
(2)配置R2:
r2(config)#int f0/0
r2(config-if)#ip address 24.1.1.2 255.255.255.0
r2(config-if)#no sh
r2(config)#int f0/1
r2(config-if)#ip address 12.1.1.2 255.255.255.0
r2(config-if)#no sh
r2(config)#router eigrp 1
r2(config-router)#no auto-summary
r2(config-router)#network 12.1.1.2 0.0.0.0
r2(config-router)#network 24.1.1.2 0.0.0.0
说明:在R2上配置12.1.1.0/24,24.1.1.0/24,并放入EIGRP进程中。
(3)配置R3:
r3(config)#int f0/0
r3(config-if)#ip address 13.1.1.3 255.255.255.0
r3(config-if)#no sh
r3(config)#int s1/0
r3(config-if)#encapsulation frame-relay
r3(config-if)#no frame-relay inverse-arp
r3(config-if)#no arp frame-relay
r3(config-if)#ip address 34.1.1.3 255.255.255.0
r3(config-if)#no shutdown
r3(config-if)#frame-relay map ip 34.1.1.4 304 broadcast
r3(config)#router eigrp 1
r3(config-router)#no auto-summary
r3(config-router)#network 13.1.1.3 0.0.0.0
r3(config-router)#network 34.1.1.3 0.0.0.0
说明:在R3上配置13.1.1.0/24,34.1.1.0/24,并放入EIGRP进程中,其中连接R4的链路为Frame-Relay环境。
(4)配置R4:
r4(config)#int f0/0
r4(config-if)#ip add 24.1.1.4 255.255.255.0
r4(config-if)#no sh
r4(config)#int s1/0
r4(config-if)#encapsulation frame-relay
r4(config-if)#no frame-relay inverse-arp
r4(config-if)#no arp frame-relay
r4(config-if)#ip address 34.1.1.4 255.255.255.0
r4(config-if)#no shutdown
r4(config-if)#frame-relay map ip 34.1.1.3 403 broadcast
r4(config)#int loopback 0
r4(config-if)#ip address 4.4.4.4 255.255.255.0
r4(config)#router eigrp 1
r4(config-router)#no auto-summary
r4(config-router)#network 24.1.1.4 0.0.0.0
r4(config-router)#network 34.1.1.4 0.0.0.0
r4(config-router)#network 4.4.4.4 0.0.0.0
说明:在R4上配置24.1.1.0/24,34.1.1.0/24,4.4.4.0/24,并放入EIGRP进程中,其中连接R4的链路为Frame-Relay环境。
2.测试EIGRP邻居
(1)查看R1当前的EIGRP邻居:
r1#show ip eigrp neighbors
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 13.1.1.3 Fa0/0 10 00:04:38 213 1278 0 4
0 12.1.1.2 Fa0/1 10 00:06:32 165 990 0 11
r1#
说明:R1已经与R2和R3建立邻居,因为Hold栏的值在10-15范围内,所以Hello间隔是5秒,Hold-time是15秒。
(2)查看R3当前的5个K值:
r3#sh ip protocols
Routing Protocol is "eigrp 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 1
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
13.1.1.3/32
34.1.1.3/32
Routing Information Sources:
Gateway Distance Last Update
13.1.1.1 90 00:01:45
34.1.1.4 90 00:01:55
Distance: internal 90 external 170
r3#
说明:R3当前的5个K值分别为K1=1, K2=0, K3=1, K4=0, K5=0,与默认值相同。
(3)修改R3的5个K值:
r3(config)#router eigrp 1
r3(config-router)#metric weights 0 1 1 1 0 0
说明:手工将R3的5个K值修改为K1=1, K2=1, K3=1, K4=0, K5=0 ,命令中第一个值为 TOS ,IOS中必须为0 。
(4)查看R3修改后的5个K值:
r3#sh ip protocols
Routing Protocol is "eigrp 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=1, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 1
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
13.1.1.3/32
34.1.1.3/32
Routing Information Sources:
Gateway Distance Last Update
13.1.1.1 90 00:00:17
34.1.1.4 90 00:00:17
Distance: internal 90 external 170
r3#
说明:输入表示R3的5个K值已经被修改为K1=1, K2=1, K3=1, K4=0, K5=0。
(5)再次查看R1的邻居:
r1#show ip eigrp neighbors
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 12.1.1.2 Fa0/1 13 00:11:43 200 1200 0 21
r1#
*Mar 1 00:18:52.287: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 13.1.1.3 (FastEthernet0/0) is down: Interface Goodbye received
r1#
说明:R1已经断开与R3的邻居关系,正是因为双方K值不同,因为R1为默认值,而R3为改而的值。
★最后将R3的值恢复默认,并建立正常邻居关系。
3.测试EIGRP带宽计算
(1)查看R2到目标4.4.4.4的出口F0/0的带宽与延迟:
r2#sh int f0/0
FastEthernet0/0 is up, line protocol is up
Hardware is Gt96k FE, address is c000.0a34.0000 (bia c000.0a34.0000)
Internet address is 24.1.1.2/24
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
说明:R2到目标4.4.4.4的出口F0/0的带宽为100000 Kbit,延迟100 usec
(2)查看R4到目标4.4.4.4的出口loopback 0的带宽与延迟:
r4#sh interfaces loopback 0
Loopback0 is up, line protocol is up
Hardware is Loopback
Internet address is 4.4.4.4/24
MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,
说明:R4到目标4.4.4.4的出口loopback 0的带宽为8000000 Kbit,延迟5000 usec。
(3)使用公式计算R2到目标4.4.4.4的Metric值:
公式为:
R2到4.4.4.4链路中的最小带宽为100 000 Kbit,延迟之和为100 usec+5000 usec=5100 usec
应用到公式中为:
(1000 0000/100 000+5100/10)×256
↓
(100+510)×256
↓
610×256=156160
说明:所以R2到目标4.4.4.4的Metric值为156160。
(4)查看R2到目标4.4.4.4的Metric值:
r2#sh 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
34.0.0.0/24 is subnetted, 1 subnets
D 34.1.1.0 [90/2172416] via 24.1.1.4, 00:10:50, FastEthernet0/0
4.0.0.0/24 is subnetted, 1 subnets
D 4.4.4.0 [90/156160] via 24.1.1.4, 00:14:27, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
C 24.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, FastEthernet0/1
13.0.0.0/24 is subnetted, 1 subnets
D 13.1.1.0 [90/2174976] via 24.1.1.4, 00:06:14, FastEthernet0/0
r2#
说明:R2到4.4.4.4的Metric值确实为156160。
(5)修改R2到目标4.4.4.4的最小带宽,影响最终Metric:
r2(config)#int f0/0
r2(config-if)#bandwidth 50000
说明:之前R2的出口F0/0的带宽为100000 Kbit,现在改为50000 Kbit,该值将影响最终到目标4.4.4.4的Metric值。
(6)查看R2修改最小带宽后到目标4.4.4.4的Metric:
r2#sh 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
34.0.0.0/24 is subnetted, 1 subnets
D 34.1.1.0 [90/2172416] via 24.1.1.4, 00:00:18, FastEthernet0/0
4.0.0.0/24 is subnetted, 1 subnets
D 4.4.4.0 [90/181760] via 24.1.1.4, 00:00:07, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
C 24.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, FastEthernet0/1
13.0.0.0/24 is subnetted, 1 subnets
D 13.1.1.0 [90/30720] via 12.1.1.1, 00:02:14, FastEthernet0/1
r2#
说明:R2修改最小带宽后到目标4.4.4.4的Metric为181760,大于之前的156160,因为带宽越小,性能越差,Metric就越大;修改接口的带宽会影响到EIGRP对接口真实带宽的认知,并自动调整与带宽有关的所有参数,但须注意,Hello包的间隔不会因此改变。
(7)调整EIGRP在接口上的最大使用率:
说明:默认EIGRP认为自己的流量可占用接口带宽的50%,而修改接口的带宽会影响到EIGRP对接口真实带宽的认知,并自动调整EIGRP可使用该接口的最大带宽,所以在修改接口带宽之后,调整EIGRP流量使用率到相应值,注意,在没有手工修改接口带宽的情况下,也可以随意调整EIGRP在接口上的使用率。
r2(config)#int f0/0
r2(config-if)#ip bandwidth-percent eigrp 1 150
说明:调整EIGRP在接口上F0/0上的最大使用率为150%,也就是50Mbit/s×150%=75 Mbit/s。
好了,今天这15分钟也完成了,建议线下动手做下实验,下一节我们将学习EIGRP非等价负载均衡
领取专属 10元无门槛券
私享最新 技术干货