静态路由实验

静态路由实验

如果没有serial线接口
在路由器上右键→设置把接口拖到路由器上就可以了

在这里插入图片描述

配置各路由器接口IP,并 在R1和R3的路由上需要分别配置两个LoopBack,如图所示

拓扑图

R1 接口IP配置

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.1.12.1 24
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 10.1.21.1 24
[R1-GigabitEthernet0/0/1]int lo0
[R1-LoopBack0]ip add 10.0.1.1 24

R2接口IP配置

[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 10.0.12.2 24
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 10.0.21.2 24
[R2]int s4/0/0
[R2-Serial4/0/0]ip add 10.0.23.2 24

R3 接口IP配置

[R3]int s4/0/0
[R3-Serial4/0/0]ip add 10.0.23.3 24
[R3-Serial4/0/0]int lo0
[R3-LoopBack0]ip add 10.0.3.3 24

要求:为3个路由器设置静态路由,使得R1可以访问10.0.23.0/24以及10.0.3.3/24,
R3可以访问10.0.1.1/24 10.0.12.0/24 10.0.21.0/24,
R2可以访问10.0.1.0/24 10.0.3.3/24。
R1 静态路由配置

ip route-static 10.0.3.0 255.255.255.0 10.0.12.2
ip route-static 10.0.23.0 255.255.255.0 10.0.12.2

R2 静态路由配置

ip route-static 10.0.1.0 255.255.255.0 10.0.12.1
ip route-static 10.0.3.0 255.255.255.0 10.0.23.3

R3 静态路由配置

ip route-static 10.0.1.0 255.255.255.0 10.0.23.2
ip route-static 10.0.12.0 255.255.255.0 10.0.23.2
ip route-static 10.0.21.0 255.255.255.0 10.0.23.2

注意:能否访问成功需要借助ping命令查看;
R1可以访问10.0.23.0/24以及10.0.3.3/24,

[R1]ping 10.0.23.3
  PING 10.0.23.3: 56  data bytes, press CTRL_C to break
    Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=254 time=50 ms
    Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=254 time=40 ms
    Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=254 time=20 ms
    Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=254 time=20 ms

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

[R1]ping 10.0.3.3
  PING 10.0.3.3: 56  data bytes, press CTRL_C to break
    Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=254 time=40 ms
    Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 10.0.3.3: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 10.0.3.3: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=254 time=30 ms

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

R3可以访问10.0.1.1/24 10.0.12.0/24 10.0.21.0/24,

<R3>ping 10.0.1.1
  PING 10.0.1.1: 56  data bytes, press CTRL_C to break
    Reply from 10.0.1.1: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 10.0.1.1: bytes=56 Sequence=2 ttl=254 time=20 ms
    Reply from 10.0.1.1: bytes=56 Sequence=3 ttl=254 time=20 ms
    Reply from 10.0.1.1: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 10.0.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms

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

<R3>ping 10.0.12.1
  PING 10.0.12.1: 56  data bytes, press CTRL_C to break
    Reply from 10.0.12.1: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=254 time=20 ms
    Reply from 10.0.12.1: bytes=56 Sequence=3 ttl=254 time=20 ms
    Reply from 10.0.12.1: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 10.0.12.1: bytes=56 Sequence=5 ttl=254 time=30 ms

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

[R3]ping 10.0.21.1
  PING 10.0.21.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 10.0.21.1: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 10.0.21.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 10.0.21.1: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 10.0.21.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 10.0.21.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 20/27/30 ms

R2可以访问10.0.1.0/24 10.0.3.3/24。

<R2>ping 10.0.1.1
  PING 10.0.1.1: 56  data bytes, press CTRL_C to break
    Reply from 10.0.1.1: bytes=56 Sequence=1 ttl=255 time=40 ms
    Reply from 10.0.1.1: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 10.0.1.1: bytes=56 Sequence=3 ttl=255 time=10 ms
    Reply from 10.0.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 10.0.1.1: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 10.0.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/22/40 ms

<R2>ping 10.0.3.3
  PING 10.0.3.3: 56  data bytes, press CTRL_C to break
    Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=255 time=20 ms
    Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 10.0.3.3: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 10.0.3.3: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 10.0.3.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/18/20 ms
  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值