静态路由综合实验

实验目的439b8c9560c44dc09dc812514d25c58c.png

 

实验思路

1. 该网络拓扑图中拥有六个广播域,所以我们基于192.168.1.0/24划分出六个网段,分别对GE口进行分配IP地址,对AR5进行环回地址配置。

AR1-AR2为192.168.1.0/24

AR2-AR4为192.168.2.0/24

AR4-AR3为192.168.3.0/24

AR4-AR1为192.168.4.0/24

AR4-AR5上方G0/0/2-G0/0/0为192.168.5.0/24

AR4-AR5下方G4/0/0-G0/0/1为192.168.6.0/24

a0ef3a44557f48f68827c05ed0c50436.png

 
2. AR1-AR5每个路由器配置两个环回接口,我们从192.168.7.0/24到192.168.14.0/24进行分配。

3. 通过利用缺省路由(默认路由),让数据包从0.0.0.0/0地址访问5.5.5.0/24。

4. AR4与AR5之间运用浮动静态路由完成题目要求。

实践过程

1.打开ENSP,搭建好网络拓扑图,开启设备,网线接口为绿色时则启动成功。

2.打开所有路由器的配置界面,

sys---进入系统视图

sysname r1---进行改名 依次重复以上操作实现各个路由器名字分别为为r1,r2,r3,r4,r5

interface GigabitEthernet 0/0/0---进入接口视图

ip address 192.168.1.1 255.255.255.0---配置ip地址

interface LoopBack---配置环回地址

配置完成后可以用display this查看当前视图下的配置

r1—r5;

f509f0366a88451cb68559281e08f16e.png

2793edbb4ae04ff4aa0170bfcca8abd0.png 

9e28d7b34cca41f9a7447b8077cf2381.png 

94a707b36d66492db6e4bcf2ac40d9e9.png 

443a878cf5e54cd5840d5e0684ca7f71.png 

 3.通过利用缺省路由实现低保,即使不用编写静态路由依然可以访问5.5.5.0/24网段。

[r1]ip route-static 0.0.0.0 0 就近原则

每个路由器之间需要进行互相访问需要通过[r1]ip route-static---命令来写入路由表,使数据包访问时知道下一跳的地址与路由条目。

为避免环路出现,使用空接口路由,NULL0 — 空接口 — 虚拟接口 — 如果一条路由条目,出接口为空接口,则如果匹配到这条路由条目,则将直接丢弃该数据包。

[r1]ip route-static 地址 NULL 0

31763b6cd4af4e2e96a33dd5b910a211.png

 

4. 浮动静态路由 — 通过修改默认的优先级,实现静态路由的备份效果。

[r5]ip route-static 192.168.2.0 24 192.168.5.1 preference 70 — 手动修改静态路由的优先级

[r5]display ip routing-table protocol static — 过滤静态路由

[r5-GigabitEthernet0/0/0]shutdown — 手动关闭接口

5.实验结果:全网可达,在这个网络中去使用任何一台设备去ping任何一台设备都是可以通的

例如:

[r1]ping -a 192.168.7.1 192.168.9.1
PING 192.168.9.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.9.1: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 192.168.9.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.9.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 192.168.9.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.9.1: bytes=56 Sequence=5 ttl=255 time=20 ms

— 192.168.9.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/26/40 ms

[r2]ping -a 192.168.9.1 192.168.13.1
PING 192.168.13.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.13.1: bytes=56 Sequence=1 ttl=253 time=20 ms
Reply from 192.168.13.1: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 192.168.13.1: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 192.168.13.1: bytes=56 Sequence=4 ttl=253 time=30 ms
Reply from 192.168.13.1: bytes=56 Sequence=5 ttl=253 time=30 ms

— 192.168.13.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/28/30 ms

[r3]ping -a 192.168.11.1 5.5.5.1
PING 5.5.5.1: 56 data bytes, press CTRL_C to break
Reply from 5.5.5.1: bytes=56 Sequence=1 ttl=254 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=2 ttl=254 time=40 ms
Reply from 5.5.5.1: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 5.5.5.1: bytes=56 Sequence=5 ttl=254 time=30 ms

— 5.5.5.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/34/40 ms

 

  • 15
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值