扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
R1:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line con 0
Router(config-line)#logg sy
Router(config-line)#exec-t 0 0
Router(config-line)#exi
Router(config)#no ip domain-lo
Router(config)#host R1
R1(config)#int s 1
R1(config-if)#ip add 10.10.10.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#clo ra 64000
R1(config-if)#exi
R1(config)#
*Mar 1 00:23:29.347: %LINK-3-UPDOWN: Interface Serial1, changed state to up
R1(config)#
*Mar 1 00:23:30.351: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to up
R1(config)#
R2:
R2#en
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int s 1
R2(config-if)#ip add 10.10.10.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int s 0
R2(config-if)#ip add 20.20.20.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#clo ra 64000
R2(config-if)#exi
R2(config)#
R3:
R3>en
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int s 1
R3(config-if)#ip add 20.20.20.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exi
R3(config)#
以上的配置已经可以完成由R2分别与R1和R3的通信,测试结果如下:
R2#ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/34/36 ms
R2#ping 20.20.20.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/34/36 ms
R2#
回R1启动EIGRP协议。
R1(config)#router eigrp ?
<1-65535>Autonomous system number ←实则为EIGRP的进程号,也可被用来用自治系统号进行分配。
R1(config)#router eigrp 1
R1(config-router)#net 10.10.10.0 ? ←宣告网络
A.B.C.D EIGRP wild card bits ←EIGRP支持VLSM,可以在这里输入通配符掩码进行精确匹配。
R2、R3同时都需要运行EIGRP使R1可以与R3相互交换信息,R2、R3的配置如下:
R2:
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router eigrp 1
R2(config-router)#net 10.10.10.0
*Mar 1 01:10:21.591: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.10.10.1 (Serial1) is up: new adjacency ←与邻居10.10.10.1建立邻接关系成功,如何建立的细节请参阅IT傻博士课程。
R2(config-router)#net 20.20.20.0
R2(config-router)#exi
R2(config)#
*Mar 1 01:10:37.699: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 20.20.20.2 (Serial0) is up: new adjacency ←与邻居20.20.20.2建立邻接关系。
R2(config)#
R3:
R3(config)#
R3(config)#router eigrp 1
R3(config-router)#net 20.20.20.0
R3(config-router)#exi
R3(config)#
*Mar 1 01:09:13.887: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 20.20.20.1 (Serial1) is up: new adjacency ←与邻居20.20.20.1建立邻接关系。
R3(config)#
我们接着在R3上查看路由表可以看见到达R1的路由已经出现,如下。
R3#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
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, Serial1
D 10.0.0.0/8 [90/2681856] via 20.20.20.1, 00:39:05, Serial1
R3#
首先我们来分解看一下本条通过EIGRP学习到的路由条目。
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。