實驗1、配置Eigrp 驗證,彙總
環境:三臺路由器串口相連,其它接口配置如圖
要求:1.配置EIGRP關閉自動路由彙總
2.在R1的三個LOOP口進行EIGRP手工路由彙總
3.R二、R3配置EIGRP接口密文驗證
4.驗證並測試結果
步驟一: 配置三個路由器接口使其連通。
R1的配置
R1(config)# interface Loopback0
R1(config-if)# ip address 30.1.1.1 255.255.255.0
R1(config)# interface Loopback1
R1(config-if)# ip address 30.1.2.1 255.255.255.0
R1(config)# interface Loopback2
R1(config-if)# ip address 30.1.3.1 255.255.255.0
R1(config)# interface s0
R1(config-if)# ip address
10.1.1
.2 255.255.255.0
R1(config-if)#no shutdown
R2的配置
R2(config)# interface s0
R2(config-if)# ip address
10.1.1
.1 255.255.255.0
R2(config-if)#clockrate 64000
R2(config-if)#no shutdown
R2(config)# interface s1
R2(config-if)# ip address
20.1.1
.1 255.255.255.0
R12(config-if)#no shutdown
R3的配置
R3(config)# interface Loopback0
R3(config-if)# ip address 40.1.1.1 255.255.255.0
R3(config)# interface s1
R3(config-if)# ip address
20.1.1
.2 255.255.255.0
R3(config-if)#clockrate 64000
R3(config-if)#no shutdown
步驟二: 配置Eigrp
R1的配置
R1(config)# router eigrp 100 à啓用eigrp,自治號爲100,三臺路由器保持一致
R1(config-router)# network
10.1.1
.0 0.0.
0.255
à使相關接口參與eigrp
R1(config-router)# network 30.1.1.0
0.0.0
.255
R1(config-router)# network 30.1.2.0
0.0.0
.255
R1(config-router)# network 30.1.3.0
0.0.0
.255
R1(config-router)# no auto-summary à關閉自動彙總
R2的配置
R2(config)# router eigrp 100
R2(config-router)# network
10.1.1
.0 0.0.0.255
R2(config-router)# network
20.1.1
.0
0.0.0
.255
R2(config-router)# no auto-summary
R3的配置
R3(config)# router eigrp 100
R3(config-router)# network
20.1.1
.0 0.0.0.255
R3(config-router)# network 40.1.1.0
0.0.0
.255
R3(config-router)# no auto-summary
步驟三:配置EIGRP手工路由彙總
R1的配置
R1(config)# interface s0
R1(config-if)# ip summary-address eigrp 100 30.1.0.0 255.255.252.0 à手工彙總路由
步驟四:在r2和r3上配置EIGRP 驗證
R2的配置
R2(config)# key chain cisco à定義chain名稱
R2(config-keychain)# key 1 àkey值編號,須一致
R2(config-keychain-key)# key-string aaa à定義密鑰,須一致
R2(config)# interface s1
R2(config-if)# ip authentication mode eigrp 100 md5 à啓用eigrp驗證模式md5
R2(config-if)# ip authentication key-chain eigrp 100 cisco à將chain應用到驗證
R3的配置
R3(config)# key chain cisco
R3(config-keychain)# key 1
R3(config-keychain-key)# key-string aaa
R3(config)# interface s1
R3(config-if)# ip authentication mode eigrp 100 md5
R3(config-if)# ip authentication key-chain eigrp 100 cisco
步驟五:查看路由表
R1#show ip route à顯示路由表,以下圖顯示證實驗證經過D爲eigrp路由
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
20.0.0
.0/24 is subnetted, 1 subnets
D
20.1.1
.0 [90/2681856] vi
a 10.1.1
.1, 00:12:39, Serial0
40.0.0.0/24 is subnetted, 1 subnets
D 40.1.1.0 [90/2809856] vi
a 10.1.1
.1, 00:12:39, Serial0
10.0.0
.0/24 is subnetted, 1 subnets
C
10.1.1
.0 is directly connected, Serial0
30.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 30.1.3.0/24 is directly connected, Loopback2
C 30.1.2.0/24 is directly connected, Loopback1
C 30.1.1.0/24 is directly connected, Loopback0
D 30.1.0.0/22 is a summary, 00:12:47, Null0 à彙總產生的空接口
R2#show ip route
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
20.0.0
.0/24 is subnetted, 1 subnets
C
20.1.1
.0 is directly connected, Serial1
40.0.0.0/24 is subnetted, 1 subnets
D 40.1.1.0 [90/2297856] vi
a 20.1.1
.2, 00:13:13, Serial1
10.0.0
.0/24 is subnetted, 1 subnets
C
10.1.1
.0 is directly connected, Serial0
30.0.0.0/22 is subnetted, 1 subnets
D 30.1.0.0 [90/2297856] vi
a 10.1.1
.2, 00:10:02, Serial0 à學到了彙總的條目
R3#show ip route
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
20.0.0
.0/24 is subnetted, 1 subnets
C
20.1.1
.0 is directly connected, Serial1
40.0.0.0/24 is subnetted, 1 subnets
C 40.1.1.0 is directly connected, Loopback0
10.0.0
.0/24 is subnetted, 1 subnets
D
10.1.1
.0 [90/2681856] vi
a 20.1.1
.1, 00:06:33, Serial1
30.0.0.0/22 is subnetted, 1 subnets
D 30.1.0.0 [90/2809856] vi
a 20.1.1
.1, 00:03:22, Serial1
步驟六:查看鄰居表
R1#show ip eigrp neighbors à顯示鄰居
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
0
10.1.1
.1 Se0 11 00:13:11 28 200 0 35
R2#show ip eigrp neighbors
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
0
10.1.1
.2 Se0 12 00:10:49 670 4020 0 22
1
20.1.1
.2 Se1 13 00:14:04 36 216 0 14
R3#sh ip eigrp neighbors
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
0
20.1.1
.1 Se1 13 00:09:18 252 1512 0 36
步驟七:用ping命令測試
R1#ping 40.1.1.1 à測試連通性,顯示已通
!!!!!
R3#ping 30.1.1.1
!!!!!
步驟八:顯示當前配置信息
R1#sh run
hostname R1
!
interface Loopback0
ip address 30.1.1.1 255.255.255.0
!
interface Loopback1
ip address 30.1.2.1 255.255.255.0
!
interface Loopback2
ip address 30.1.3.1 255.255.255.0
!
interface Serial0
ip address
10.1.1
.2 255.255.255.0
ip summary-address eigrp 100 30.1.0.0 255.255.252.0 5
!
router eigrp 100
network
10.1.1
.0 0.0.0.255
network 30.1.1.0
0.0.0
.255
network 30.1.2.0
0.0.0
.255
network 30.1.3.0
0.0.0
.255
no auto-summary
end
R2#sh run
hostname R2
!
key chain cisco
key 1
key-string aaa
!
interface Serial0
ip address
10.1.1
.1 255.255.255.0
clockrate 64000
!
interface Serial1
ip address
20.1.1
.1 255.255.255.0
ip authentication mode eigrp 100 md5
ip authentication key-chain eigrp 100 cisco
!
router eigrp 100
network
10.1.1
.0 0.0.0.255
network
20.1.1
.0 0.0.0.255
no auto-summary
end
R3#sh run
hostname R3
!
key chain cisco
key 1
key-string aaa
!
interface Loopback0
ip address 40.1.1.1 255.255.255.0
!
interface Serial1
ip address
20.1.1
.2 255.255.255.0
ip authentication mode eigrp 100 md5
ip authentication key-chain eigrp 100 cisco
clockrate 64000
!
router eigrp 100
network
20.1.1
.0 0.0.0.255
network 40.1.1.0
0.0.0
.255
no auto-summary
end