DAY02(05):如何配置静态路由?

5.1 问题

按照图-5拓扑结构配置接口ip地址并通过静态路由实现全网互通

DAY02(05):如何配置静态路由?_第1张图片
图-5

5.2 步骤

步骤一:配置ip地址,添加静态路由

1)R1配置

system-view

[Huawei]interface GigabitEthernet 0/0/0

[Huawei-GigabitEthernet0/0/1]ip address 192.168.1.254 24

[Huawei-GigabitEthernet0/0/1]quit

[Huawei]interface GigabitEthernet 0/0/1

[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.1 24

[Huawei]ip route-static 192.168.3.0 24 192.168.2.2

[Huawei]ip route-static 192.168.4.0 24 192.168.2.2

2)R2配置

system-view

[Huawei]interface GigabitEthernet 0/0/0

[Huawei-GigabitEthernet0/0/1]ip address 192.168.3.254 24

[Huawei-GigabitEthernet0/0/1]quit

[Huawei]interface GigabitEthernet 0/0/1

[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.2 24

[Huawei-GigabitEthernet0/0/1]quit

[Huawei]interface GigabitEthernet 0/0/2

[Huawei-GigabitEthernet0/0/1]ip address 192.168.4.254 24

[Huawei]ip route-static 192.168.1.0 24 192.168.2.1

————————————————

版权声明:本文为CSDN博主「Pseudo、lover」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/weixin_45843450/article/details/104523909

你可能感兴趣的:(DAY02(05):如何配置静态路由?)