您的位置:首页 > 其它

EIGRP协议的配置

2015-07-16 18:21 381 查看
实验 3 EIGRP、BGP 的配置

EIGRP

实验学时:2学时

一、实验目的 掌握 EIGRP 协议的基本原理; 掌握 EIGRP 协议的配置方法; 掌握 EIGRP 协议路由汇总和负载均衡的配置方法;

二、实验环境(软件、硬件及条件) 2Windows 主机+3 台路由器 或者 1 台 Windows 主机+packet tracer 5.0 以上模拟器

三、实验内容 理解 EIGRP 协议的工作原理,掌握 EIGRP 协议的基本配置方法。

四、实验拓扑



各接口 IP 地址分配如图所示。

五、实验步骤

1、按照拓扑图要求配置各接口的 IP 地址,验证相邻接口的连通性。



2、配置路由器 R1,R2,R3,R4,启用路由协议 EIGRP,进程 ID 为 10

Hostname R1

router eigrp 10

network 10.0.0.0

network 192.168.10.0

network 192.168.20.0

no auto-summary

ip classless

3、验证路由协议配置



4、配置路由器登录密码 enable password cisco line vty 0 4 password class login 六、实验结果 完成本实验,写出详细实验步骤,并给出各路由器的路由表和拓扑表。(由学生自己写在实 验记录中。)

配置命令:

(1)、R1的配置:

R1(config)#inter f0/0

R1(config-if)#ip add 192.168.10.254 255.255.255.0

R1(config-if)#no shut

R1(config)#inter f0/1

R1(config-if)#ip add 192.168.20.1 255.255.255.0

R1(config-if)#no shut

R1(config)#inter s1/0

R1(config-if)#ip add 10.10.10.1 255.255.255.252

R1(config-if)#no shut

R1(config-if)#clock rate 64000

R1(config-if)#no shut

R1(config)#inter s1/1

R1(config-if)#ip add 10.10.10.5 255.255.255.252

R1(config-if)#no shut

R1(config-if)#clock rate 64000

R1(config-if)#no shut

R1(config)#router eigrp 10

R1(config-router)#network 10.0.0.0

R1(config-router)#network 192.168.10.0

R1(config-router)#network 192.168.20.0

R1(config-router)#no auto-summary

R1的路由表:

Gateway of last resort is not set

10.0.0.0/30 is subnetted, 4 subnets

C 10.10.10.0 is directly connected, Serial1/0

C 10.10.10.4 is directly connected, Serial1/1

D 10.10.10.8 [90/20514560] via 192.168.20.2, 00:02:52, FastEthernet0/1

D 10.10.10.12 [90/21024000] via 10.10.10.6, 00:02:10, Serial1/1

172.30.0.0/24 is subnetted, 1 subnets

D 172.30.10.0 [90/20517120] via 192.168.20.2, 00:00:47, FastEthernet0/1

C 192.168.10.0/24 is directly connected, FastEthernet0/0

C 192.168.20.0/24 is directly connected, FastEthernet0/1

(2)、R2的配置:

R2(config)#inter f0/1

R2(config-if)#ip add 192.168.20.2 255.255.255.0

R2(config-if)#no shut

R2(config)#inter s1/0

R2(config-if)#ip add 10.10.10.2 255.255.255.252

R2(config-if)#no shut

R2(config-if)#exit

R2(config)#inter s1/1

R2(config-if)#ip add 10.10.10.9 255.255.255.252

R2(config-if)#no shut

R2(config)#router eigrp 10

R2(config-router)#network 10.0.0.0

R2(config-router)#network 192.168.20.0

R2(config-router)#no auto-summary

R2的路由表:

Gateway of last resort is not set

10.0.0.0/30 is subnetted, 4 subnets

C 10.10.10.0 is directly connected, Serial1/0

D 10.10.10.4 [90/20514560] via 192.168.20.1, 00:05:22, FastEthernet0/1

C 10.10.10.8 is directly connected, Serial1/1

D 10.10.10.12 [90/21024000] via 10.10.10.10, 00:03:16, Serial1/1

172.30.0.0/24 is subnetted, 1 subnets

D 172.30.10.0 [90/20514560] via 10.10.10.10, 00:03:16, Serial1/1

D 192.168.10.0/24 [90/30720] via 192.168.20.1, 00:05:22, FastEthernet0/1

C 192.168.20.0/24 is directly connected, FastEthernet0/1

(3)、R3的配置:

R3(config)#inter s1/0

R3(config-if)#ip add 10.10.10.6 255.255.255.252

R3(config-if)#no shut

R3(config)#inter s1/1

R3(config-if)#ip add 10.10.10.13 255.255.255.252

R3(config-if)#no shut

R3(config)#router eigrp 10

R3(config-router)#network 10.0.0.0

R3(config-router)#no auto-summary

R3的路由表:

Gateway of last resort is not set

10.0.0.0/30 is subnetted, 4 subnets

D 10.10.10.0 [90/21024000] via 10.10.10.5, 00:06:00, Serial1/0

C 10.10.10.4 is directly connected, Serial1/0

D 10.10.10.8 [90/21024000] via 10.10.10.14, 00:04:37, Serial1/1

C 10.10.10.12 is directly connected, Serial1/1

172.30.0.0/24 is subnetted, 1 subnets

D 172.30.10.0 [90/20514560] via 10.10.10.14, 00:04:37, Serial1/1

D 192.168.10.0/24 [90/20514560] via 10.10.10.5, 00:06:00, Serial1/0

D 192.168.20.0/24 [90/20514560] via 10.10.10.5, 00:06:00, Serial1/0

(4)、R4的配置:

R4(config)#inter f0/0

R4(config-if)#ip add 172.30.10.254 255.255.255.0

R4(config-if)#no shut

R4(config)#inter s1/0

R4(config-if)#ip add 10.10.10.10 255.255.255.252

R4(config-if)#no shut

R4(config-if)#clock rate 64000

R4(config)#inter s1/1

R4(config-if)#ip add 10.10.10.14 255.255.255.252

R4(config-if)#no shut

R4(config-if)#clock rate 64000

R4(config)#router eigrp 10

R4(config-router)#network 172.30.10.0

R4(config-router)#network 10.0.0.0

R4(config-router)#no auto-summary

R4的路由表:

Gateway of last resort is not set

10.0.0.0/30 is subnetted, 4 subnets

D 10.10.10.0 [90/21024000] via 10.10.10.9, 00:05:09, Serial1/0

D 10.10.10.4 [90/21024000] via 10.10.10.13, 00:05:09, Serial1/1

C 10.10.10.8 is directly connected, Serial1/0

C 10.10.10.12 is directly connected, Serial1/1

172.30.0.0/24 is subnetted, 1 subnets

C 172.30.10.0 is directly connected, FastEthernet0/0

D 192.168.10.0/24 [90/20517120] via 10.10.10.9, 00:05:09, Serial1/0

D 192.168.20.0/24 [90/20514560] via 10.10.10.9, 00:05:09, Serial1/0

(5)、实验结果:

PC>ping 172.30.10.1

Pinging 172.30.10.1 with 32 bytes of data:

Reply from 172.30.10.1: bytes=32 time=46ms TTL=125

Reply from 172.30.10.1: bytes=32 time=47ms TTL=125

Reply from 172.30.10.1: bytes=32 time=31ms TTL=125

Reply from 172.30.10.1: bytes=32 time=31ms TTL=125

Ping statistics for 172.30.10.1:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 31ms, Maximum = 47ms, Average = 38ms

BGP

实验学时:2

学时 一、实验目的 掌握路由协议的原理;掌握 BGP 协议的工作原理;掌握 BGP 协议的基本配置方法;

二、实验环境(软件、硬件及条件) 3Windows 主机+4 台路由器 或者 1 台 Windows 主机+packet tracer 6.0 模拟器

三、实验内容 理解 BGP 协议的工作原理,并通过 BGP 路由协议实现不同网络互通。

四、实验拓扑



实验中各个网段与路由器接口 IP 地址分配如上图所示(图中,Loopback 接口也 可以用 PC 机替换)

五、实验步骤

1、配置路由器各个接口的 IP 地址等参数,R4 接口状态如下:

2、在 AS100 中配置 IGP 协议 EIGRP,R1 上的配置如下(R2 类似,R2 的 s0/2/1 接口不应该在 EIGRP 中发布):

router eigrp 1

network 12.12.12.0 0.0.0.255

network 1.1.1.1 0.0.0.0

auto-summary

配置完成后 R1 的路由表如下:

R1#show ip rou

Gateway of last resort is not set

1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 1.0.0.0/8 is a summary, 00:38:19, Null0

C 1.1.1.1/32 is directly connected, Loopback0

D 2.0.0.0/8 [90/20640000] via 12.12.12.2, 00:37:17, Serial1/0

12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 12.0.0.0/8 is a summary, 00:38:19, Null0

C 12.12.12.0/24 is directly connected, Serial1/0

3、在 R3 中配置 BGP 协议(R2 类似)

router bgp 300

bgp log-neighbor-changes

no synchronization

neighbor 23.23.23.1 remote-as 100

neighbor 34.34.34.2 remote-as 200

4、在 R4 中配置 BGP 协议

router bgp 200

bgp log-neighbor-changes

no synchronization

neighbor 34.34.34.1 remote-as 300

network 4.4.1.0 mask 255.255.255.0

network 4.4.2.0 mask 255.255.255.0

network 4.4.3.0 mask 255.255.255.0

5、配置完成,查看 R2 的路由表

R2#show ip rou

Gateway of last resort is not set

D 1.0.0.0/8 [90/2297856] via 12.12.12.1, 00:44:43, Serial0/2/0

2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 2.0.0.0/8 is a summary, 00:44:43, Null0

C 2.2.2.2/32 is directly connected, Loopback0

4.0.0.0/24 is subnetted, 3 subnets

B 4.4.1.0/24 [20/0] via 23.23.23.2, 01:07:06

B 4.4.2.0/24 [20/0] via 23.23.23.2, 01:07:06

B 4.4.3.0/24 [20/0] via 23.23.23.2, 01:07:06

12.0.0.0/8 is variably subnetted, 3 subnets, 3 masks

D 12.0.0.0/8 is a summary, 00:44:43, Null0

C 12.12.12.0/24 is directly connected, Serial0/2/0

L 12.12.12.2/32 is directly connected, Serial0/2/0

23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 23.23.23.0/24 is directly connected, Serial0/2/1

L 23.23.23.1/32 is directly connected, Serial0/2/1

R4 的路由表:

4.0.0.0/24 is subnetted, 4 subnets

C 4.4.1.0 is directly connected, Loopback0

C 4.4.2.0 is directly connected, Loopback1

C 4.4.3.0 is directly connected, Loopback2

C 4.4.4.0 is directly connected, Loopback3

12.0.0.0/24 is subnetted, 1 subnets

B 12.12.12.0 [20/0] via 34.34.34.1, 01:39:22

34.0.0.0/24 is subnetted, 1 subnets

C 34.34.34.0 is directly connected, Serial1/0

6、测试 BGP 配置结果,有 R4 开展 PING

R1:

Router#ping

Protocol [ip]:

Target IP address: 12.12.12.1

Repeat count [5]:

Datagram size [100]:

Timeout in seconds [2]:

Extended commands
: y

Source address or interface: 4.4.1.4

Type of service [0]:

Set DF bit in IP header? [no]:

Validate reply data? [no]:

Data pattern [0xABCD]:

Loose, Strict, Record, Timestamp, Verbose[none]:

Sweep range of sizes
:

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 12.12.12.1, timeout is 2 seconds:

Packet sent with a source address of 4.4.1.4

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/15 ms

配置命令:

R1的配置:

R1(config)#inter loopback 0

R1(config-if)#ip add 1.1.1.1 255.255.255.255

R1(config-if)#no shut

R1(config)#inter s1/0

R1(config-if)#ip add 12.12.12.1 255.255.255.0

R1(config-if)#no shut

R1(config-if)#clock rate 64000

R1(config)#router eigrp 1

R1(config-router)#network 12.12.12.0 0.0.0.255

R1(config-router)#network 1.1.1.1 0.0.0.0

R1(config-router)#auto-summary

R1的路由表:

Gateway of last resort is 12.12.12.2 to network 0.0.0.0

1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 1.0.0.0/8 is a summary, 00:56:43, Null0

C 1.1.1.1/32 is directly connected, Loopback0

D 2.0.0.0/8 [90/20640000] via 12.12.12.2, 00:53:55, Serial1/0

12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 12.0.0.0/8 is a summary, 00:56:43, Null0

C 12.12.12.0/24 is directly connected, Serial1/0

S* 0.0.0.0/0 [1/0] via 12.12.12.2

R2的配置:

R2(config)#inter s1/0

R2(config-if)#ip add 12.12.12.2 255.255.255.0

R2(config-if)#no shut

R2(config)#inter s1/1

R2(config-if)#ip add 23.23.23.1 255.255.255.0

R2(config-if)#no shut

R2(config-if)#clock rate 64000

R2(config)#inter loopback 0

R2(config-if)#ip add 2.2.2.2 255.255.255.255

R2(config-if)#no shut

R2(config)#router eigrp 1

R2(config-router)#passive-interface s1/1

R2(config-router)#network 12.12.12.0 0.0.0.255

R2(config-router)#network 2.2.2.2 0.0.0.0

R2(config)#router bgp 100

R2(config-router)#bgp log-neighbor-changes

R2(config-router)#no synchronization

R2(config-router)#neighbor 12.12.12.1 remote-as 100

R2(config-router)#neighbor 23.23.23.2 remote-as 300

R2(config-router)#network 12.12.12.0 mask 255.255.255.0

R2的路由表:

Gateway of last resort is not set

D 1.0.0.0/8 [90/20640000] via 12.12.12.1, 00:55:19, Serial1/0

2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 2.0.0.0/8 is a summary, 00:54:57, Null0

C 2.2.2.2/32 is directly connected, Loopback0

4.0.0.0/24 is subnetted, 3 subnets

B 4.4.1.0 [20/0] via 23.23.23.2, 02:30:24

B 4.4.2.0 [20/0] via 23.23.23.2, 02:30:24

B 4.4.3.0 [20/0] via 23.23.23.2, 02:30:24

12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 12.0.0.0/8 is a summary, 00:54:57, Null0

C 12.12.12.0/24 is directly connected, Serial1/0

23.0.0.0/24 is subnetted, 1 subnets

C 23.23.23.0 is directly connected, Serial1/1

R3(config)#inter s1/0

R3(config-if)#ip add 23.23.23.2 255.255.255.0

R3(config-if)#no shut

R3(config)#inter s1/1

R3(config-if)#ip add 34.34.34.1 255.255.255.0

R3(config-if)#no shut

R3(config-if)#clock rate 64000

R3(config)#inter loop 0

R3(config-if)#ip add 3.3.3.3 255.255.255.255

R3(config-if)#no shut

R3的路由表:

Gateway of last resort is not set

3.0.0.0/32 is subnetted, 1 subnets

C 3.3.3.3 is directly connected, Loopback0

23.0.0.0/24 is subnetted, 1 subnets

C 23.23.23.0 is directly connected, Serial1/0

34.0.0.0/24 is subnetted, 1 subnets

C 34.34.34.0 is directly connected, Serial1/1

R4(config)#inter s1/0

R4(config-if)#ip add 34.34.34.2 255.255.255.0

R4(config-if)#no shut

R3(config)#router bgp 300

R3(config-router)#bgp log-neighbor-changes

R3(config-router)#no synchronization

R3(config-router)#neighbor 23.23.23.1 remote-as 100

R3(config-router)#neighbor 34.34.34.2 remote-as 200

R4的配置:

R4(config)#inter loop 0

R4(config-if)#ip add 4.4.1.4 255.255.255.0

R4(config-if)#no shut

R4(config)#inter loop 1

R4(config-if)#ip add 4.4.2.4 255.255.255.0

R4(config-if)#no shut

R4(config)#inter loop 2

R4(config-if)#ip add 4.4.3.4 255.255.255.0

R4(config-if)#no shut

R4(config)#inter loop 3

R4(config-if)#ip add 4.4.4.4 255.255.255.0

R4(config-if)#no shut

R4(config)#inter s1/0

R4(config-if)#ip add 34.34.34.2 255.255.255.0

R4(config-if)#no shut

R4(config)#router bgp 200

R4(config-router)#bgp log-neighbor-changes

R4(config-router)#no synchronization

R4(config-router)#neighbor 34.34.34.1 remote-as 300

R4(config-router)#network 4.4.1.0 mask 255.255.255.0

R4(config-router)#network 4.4.2.0 mask 255.255.255.0

R4(config-router)#network 4.4.3.0 mask 255.255.255.0

R4的路由表:

Gateway of last resort is not set

4.0.0.0/24 is subnetted, 4 subnets

C 4.4.1.0 is directly connected, Loopback0

C 4.4.2.0 is directly connected, Loopback1

C 4.4.3.0 is directly connected, Loopback2

C 4.4.4.0 is directly connected, Loopback3

12.0.0.0/24 is subnetted, 1 subnets

B 12.12.12.0 [20/0] via 34.34.34.1, 02:34:12

34.0.0.0/24 is subnetted, 1 subnets

C 34.34.34.0 is directly connected, Serial1/0

实验结果:

R1#ping 4.4.1.4

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 4.4.1.4, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 93/93/94 ms
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: