JohnLyu的blog

橙汁事务所艾欧泽亚分部

0%

Enhanced Interior Gateway Routing Protocol

实验记录

网络初始构造

网络初始构造类似上文静态路由, 新增一个路由器

初始化

使用ripv2协议完成配置, 方法同rip实验, 测试pc0到pc1的通信:

1
2
3
4
5
6
7
8
9
10
11
12
13
C:\>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Reply from 192.168.2.2: bytes=32 time=22ms TTL=125
Reply from 192.168.2.2: bytes=32 time=23ms TTL=125
Reply from 192.168.2.2: bytes=32 time=1ms TTL=125
Reply from 192.168.2.2: bytes=32 time=23ms TTL=125

Ping statistics for 192.168.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 23ms, Average = 17ms

正常

配置eigrp

以配置r3为例

1
2
3
4
5
6
7
8
9
10
Router>enable
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router eigrp 100
Router(config-router)#network 192.168.4.0 255.255.255.0
Router(config-router)#
%DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 192.168.4.1 (GigabitEthernet0/0) is up: new adjacency

Router(config-router)#network 192.168.2.0 255.255.255.0

配置r2:

1
2
3
4
5
6
7
Router>enable
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router eigrp 100
Router(config-router)#network 192.168.4.0 255.255.255.0
Router(config-router)#network 192.168.3.0 255.255.255.0

配置r1:

1
2
3
4
5
6
7
Router>enable
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router eigrp 100
Router(config-router)#network 192.168.1.0 255.255.255.0
Router(config-router)#network 192.168.3.0 255.255.255.0

查看与测试

在r0上执行

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Router#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, 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, FastEthernet0/0
D 192.168.2.0/24 [90/20517120] via 192.168.3.2, 00:00:55, Serial2/0
C 192.168.3.0/24 is directly connected, Serial2/0
D 192.168.4.0/24 [90/20514560] via 192.168.3.2, 00:02:39, Serial2/0

Router#ping 192.168.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/10/32 ms

小结

Q: router eigrp 100里的100是什么意思?

ref cisco doc

1
2
Router(config)#route eigrp ?
<1-65535> Autonomous system number

这是自治域的编号...实际上在Cisco的文档中一般写着router eigrp name1, 相邻的路由器的eigrp协议默认是自治域编号相同才能通信.

Q: 实验材料里的掩码为什么是反着的? 正常写可以吗

ref When I configure EIGRP, how can I configure a network statement with a mask?

The optional network-mask argument was first added to the network statement in Cisco IOS Software Release 12.0(4)T. The mask argument can be configured in any format (such as in a network mask or in wild card bits). For example, you can use network 10.10.10.0 255.255.255.252 or network 10.10.10.0 0.0.0.3.

因此, 掩码可以是标准形式的255.255.255.0

Q: 实验材料中的no auto-summary的作用是?

ref eigrp-automatic-manual-summarization

作用是把A,B,C类地址的掩码自动配置到遮掩整个地址段. 但是默认情况下就是no auto-summary, 因此这个语句是不必要的.

Q: 听说EIGRP 那样可以根据优先级不同,自动匹配流量。

实验里没有看到, 并不是很理解