静态路由练习题二

一、需求:

R3的测试地址与R4的测试地址连通
在这里插入图片描述

二、思路

  • 首先配置各个端口的IP和R3与R4的测试地址
  • 然后每个路由器手动获取剩余不在路由表例的IP
  • 进行连接性测试

三、命令实例

1.R4

The device is running!

<Huawei>undo ter mo
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]int e0/0/0
[R4-Ethernet0/0/0]ip add 10.1.1.2 24
[R4-Ethernet0/0/0]q	
[R4]int LoopBack 0
[R4-LoopBack0]ip add 192.168.1.10 24
[R4-LoopBack0]q	
[R4]ip route-static 10.1.2.0 24 10.1.1.3	   #手动获取10.1.2.0网段的IP
[R4]ip route-static 172.16.1.0 24 10.1.1.3     #手动获取172.16.1.0网段的IP
Info: The destination address and mask of the configured static route mismatched
, and the static route 172.16.1.0/24 was generated.

2.R2

The device is running!

<Huawei>undo ter mo
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn	
[Huawei]sysname R2
[R2]int e0/0/0
[R2-Ethernet0/0/0]ip add 10.1.1.3 24
[R2-Ethernet0/0/0]int e0/0/1
[R2-Ethernet0/0/1]ip add 10.1.2.3 24
[R2-Ethernet0/0/1]q	
[R2]ip route-static 192.168.1.0 24 10.1.1.2    #手动获取192.168.1.0网段的IP
Info: The destination address and mask of the configured static route mismatched
, and the static route 192.168.1.0/24 was generated.
[R2]ip route-static 172.16.1.0 24 10.1.2.4    #手动获取172.16.1.0网段的IP
Info: The destination address and mask of the configured static route mismatched
, and the static route 172.16.1.0/24 was generated.

R3

The device is running!

<Huawei>undo ter mo
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn R3
[R3]int e0/0/0
[R3-Ethernet0/0/0]ip add 10.1.2.4 24
[R3-Ethernet0/0/0]q
[R3]int loopb 0
[R3-LoopBack0]ip add 172.16.1.10 24
[R3-LoopBack0]q	
[R3]ip route-static 10.1.1.0 24 10.1.2.3        #手动获取10.1.1.0网段的IP
[R3]ip route-static 192.168.1.0 24 10.1.2.3     #手动获取1192.168.1.0网段的IP
Info: The destination address and mask of the configured static route mismatched
, and the static route 192.168.1.0/24 was generated.

四、 连通性能测试

R4测试地址主动连接R3测试地址

[R4]ping -a 192.168.1.10 172.16.1.10
  PING 172.16.1.10: 56  data bytes, press CTRL_C to break
    Reply from 172.16.1.10: bytes=56 Sequence=1 ttl=254 time=60 ms
    Reply from 172.16.1.10: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 172.16.1.10: bytes=56 Sequence=3 ttl=254 time=60 ms
    Reply from 172.16.1.10: bytes=56 Sequence=4 ttl=254 time=50 ms
    Reply from 172.16.1.10: bytes=56 Sequence=5 ttl=254 time=60 ms

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

R3测试地址主动连接R4测试地址

[R3]ping -a 172.16.1.10 192.168.1.10
  PING 192.168.1.10: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.10: bytes=56 Sequence=1 ttl=254 time=100 ms
    Reply from 192.168.1.10: bytes=56 Sequence=2 ttl=254 time=50 ms
    Reply from 192.168.1.10: bytes=56 Sequence=3 ttl=254 time=60 ms
    Reply from 192.168.1.10: bytes=56 Sequence=4 ttl=254 time=60 ms
    Reply from 192.168.1.10: bytes=56 Sequence=5 ttl=254 time=70 ms

  --- 192.168.1.10 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 50/68/100 ms

五、总结

静态路由虽然不难,但是也是重要的知识点之一,需牢记,所以多做实验,熟记于心。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

小白的成功进阶之路

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

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

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

打赏作者

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

抵扣说明:

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

余额充值