EIGRP路由
实验拓朴图:
现在我们先用EIGRP 将网络打通:
在R1上的配置:
Router>en
Router#conf t
Router(config)#host R1
R1(config)#no ip domain-lo
R1(config)#line con 0
R1(config-line)#exec-t 0 0
R1(config-line)#int s0/1
R1(config-if)#ip add 12.1.1.1 255.255.255.0
R1(config-if)#no shu
R1(config-if)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#router eigrp 100
R1(config-router)#net 1.1.1.0 0.0.0.255
R1(config-router)#net 12.1.1.0 0.0.0.255
在R2上的配置:
Router>en
Router#conf t
Router(config)#host R2
R2(config)#no ip domain-lo
R2(config)#line con 0
R2(config-line)#exec-t 0 0
R2(config)#int s0/0
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R2(config-if)#no shu
R2(config-if)#int s0/1
R2(config-if)#ip add 23.1.1.1 255.255.255.0
R2(config-if)#no shu
R2(config-if)#router eigrp 100
R2(config-router)#net 12.1.1.0
R2(config-router)#net 23.1.1.0
在R3上的配置(从路由表中我们可以看到学来的地址)
Router>en
Router#conf t
Router(config)#host R3
R3(config)#no ip domain-lo
R3(config)#line con 0
R3(config-line)#exec-t 0 0
R3(config-line)#int s0/0
R3(config-if)#ip add 23.1.1.2 255.255.255.0
R3(config-if)#no shu
R3(config-if)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#router eigrp 100
R3(config-router)#net 3.3.3.0
R3(config-router)#net 23.1.1.0
R3(config-router)#do show ip rou
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
D 1.0.0.0/8 [90/2809856] via 23.1.1.1, 00:00:08, Serial0/0
3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 3.3.3.0/24 is directly connected, Loopback0
D 3.0.0.0/8 is a summary, 00:00:09, Null0
23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 23.1.1.0/24 is directly connected, Serial0/0
D 23.0.0.0/8 is a summary, 00:00:09, Null0
D 12.0.0.0/8 [90/2681856] via 23.1.1.1, 00:00:08, Serial0/0
我们不妨测试一下网络的连通性
R3#ping 1.1.1.1 source 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 136/166/192 m