静态路由实验

这里写自定义目录标题


静态路由实验

在这里插入图片描述
先搭建好如图所示的结构,接着为每台路由器的各个串口配置IP地址和本地环回地址。通过下一跳写法手动配置静态路由。
以R4路由器为例:
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.4.2 24
[R4-GigabitEthernet0/0/0]
Jan 28 2021 22:21:23-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R4-GigabitEthernet0/0/0]interface g0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.3.2 24
Jan 28 2021 22:22:25-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[R4-GigabitEthernet0/0/1]
[R4-GigabitEthernet0/0/1]q
[R4]
[R4]
[R4]ip route-static 192.168.1.0 24 192.168.4.1
[R4]ip route-static 192.168.2.0 24 192.168.3.1
[R4]ip route-static 192.168.5.0 24 192.168.3.1
其他路由器的操作以此类推。

配置完IP地址和路由表后,进行连通性测试,以R5到R1为例:
system-view
Enter system view, return user view with Ctrl+Z.
[R5]ping 192.168.1.1
PING 192.168.1.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=253 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=253 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=253 time=30 ms

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

[R5]

连通性测试成功之后,配置各台路由器的环回地址,以R5为例:
[R5]interface LoopBack 0
[R5-LoopBack0]ip address 5.5.5.1 24
[R5-LoopBack0]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2

Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.5.2/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 5.5.5.1/24 up up(s)
NULL0 unassigned up up(s)
配置完成后,测试能否使用:
[R5]ping 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=255 time=1 ms
Reply from 5.5.5.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 5.5.5.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 5.5.5.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 5.5.5.1: bytes=56 Sequence=5 ttl=255 time=1 ms

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

[R5]
成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值