CCNA-静态路由实验

实验要求:

 1、根据实验要求,我们首先在Cisco packet tracer模拟器中搭建此网络拓扑图

2、然后我们就要开始做很重要的一步,就是地址规划。

R1-R4各需要4个环回,然后路由器的每一个接口需要一个网段,则一共需要14个网段。

常规思路:

将172.16.0.0/16借4位然后进行子网划分,从划分出来的16个子网中拿14进行使用。

但是这样会出现一种弊端,在实际的配置过程当中,进行手工汇总的时候就会出现好多掩码不同的子网,当路由器查表按照最长匹配原则查表的时候可能导致出环的现象发生。

正确的常用地址规划思路:

因为实际上在具体配置的时候,R1-R4这几个路由器上每两个环回路由都将被手工汇总为掩码相同的子网,才可以让每一个路由器都想通,所以我们可以先给每一个路由器配一个地址,然后再子网划分为两个子网掩码都相同的子网即可;同样,每一条干道(就是两路由器相连的)

地址规划完成:

3、然后就进入到了我们的配置阶段

(1)先从底层开始配起

(2)然后进入到我们的路由配置阶段

 

检验:

 R1向R5ping

r1#ping 172.16.0.18

 

Type escape sequence to abort.

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

.....

Success rate is 0 percent (0/5)

 

r1#ping 172.16.0.18

 

Type escape sequence to abort.

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

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms

 

r1#ping 172.16.0.22

 

Type escape sequence to abort.

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

!!!!!

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

 

r1#

R5ping内网:

r5#ping 172.16.32.1

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#ping 172.16.48.1

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#ping 172.16.64.1

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#ping 172.16.80.1

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#ping 172.16.96.1

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#ping 172.16.112.1

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#ping 172.16.128.1

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#ping 172.16.144.1

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#ping 172.16.0.1

 

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/2 ms

 

r5#ping 172.16.0.5

 

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/2 ms

 

r5#ping 172.16.0.9

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#ping 172.16.0.13

 

Type escape sequence to abort.

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

!!!!!

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

 

r5#

要想上网,与运营商互通,必须配置缺省路由。

r1#ping 1.1.1.1

 

Type escape sequence to abort.

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

!!!!!

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

 

r1#

经检验,全网可达。

(3)然后按照实验要求,我们给R5配置浮动静态路由

(4)最后,我们要考虑到出环现象,所以要配置空接口来防止出环。

给每一个路由器配置自己的空接口防环就OK!

r1(config)#ip route 172.16.32.0 255.255.224.0 null ?

<0-0> Null interface number

r1(config)#ip route 172.16.32.0 255.255.224.0 null 0

r1(config)#


r2>en
r2#conf t
r2(config)#ip route 172.16.64.0 255.255.224.0 null 0
r2(config)#

r3>en

r3#conf t

r3(config)#ip route 172.16.96.0 255.255.224.0 null 0

r3(config)#

r4(config)#ip route 172.16.128.0 255.255.224.0 null 0

r4(config)#

4、减少路由条目,优化

其实我们前面手工配置的静态路由都可以省略,直接配缺省路由就可以通。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

SLASH-YONG

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值