实验目的
实验思路
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
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;
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
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