配置静态路由 2.0

在R1配置默认路由,R2,R3配置静态路由,使得内网1.0和2.0网段可以访问server。
在这里插入图片描述
配置PC1和PC2以及服务器server的IP地址和子网掩码
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
设置R1的默认路由
ip route-static 0.0.0.0 0 192.168.10.2

[Huawei]sysname R1

[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
Apr  5 2021 17:00:18-08:00 R1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 

[R1-GigabitEthernet0/0/0]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.2.1 24
Apr  5 2021 17:00:51-08:00 R1 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 

[R1-GigabitEthernet0/0/1]interface g0/0/2
[R1-GigabitEthernet0/0/2]ip address 192.168.10.1 24
[R1-GigabitEthernet0/0/2]
Apr  5 2021 17:01:27-08:00 R1 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 

[R1-GigabitEthernet0/0/2]quit
[R1]ip route-static 0.0.0.0 0 192.168.10.2

[R1]quit

配置R2 的静态路由

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2

[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.10.2 24
Apr  5 2021 17:06:21-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 

[R2-GigabitEthernet0/0/0]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.20.1 24
Apr  5 2021 17:06:47-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state.
 
[R2-GigabitEthernet0/0/1]quit
[R2]ip route-static 10.0.0.0 8 192.168.20.2
[R2]ip route-static 192.168.1.0 24 192.168.10.1
[R2]ip route-static 192.168.2.0 24 192.168.10.1

配置R3的静态路由

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3

[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.20.2 24
Apr  5 2021 17:15:19-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state.
 
[R3-GigabitEthernet0/0/0]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.0.0.1 8
Apr  5 2021 17:16:03-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 

[R3-GigabitEthernet0/0/1]quit
[R3]ip route-static 192.168.1.0 24 192.168.20.1
[R3]ip route-static 192.168.2.0 24 192.168.20.1

在这里插入图片描述
在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值