静态路由实验

静态路由实验

路由器静态路由实验:实现R1、R2、 R3三者之间互相ping通。

image

工具准备

  • 华为 eNSP

路由器静态路由实验:实现R1、R2、R3三者之间互相ping通。

  • 第一步:首先配置各接口P地址。

  • 第二步:配置静态路由命令。

  • 第三步:再ping验证或display ip routing。

第一步:首先配置 各接口IP地址。

第二步:配置静态路由命令。

...image

第一步:首先配置各接口P地址。

AR1:

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]
[Huawei]sysname AR1
[AR1]
[AR1]
[AR1]int giga	
[AR1]int GigabitEthernet 0/0/1
[AR1-GigabitEthernet0/0/1]   
[AR1-GigabitEthernet0/0/1]
[AR1-GigabitEthernet0/0/1]
[AR1-GigabitEthernet0/0/1]
[AR1-GigabitEthernet0/0/1]ip add	
[AR1-GigabitEthernet0/0/1]ip address 10.1.1.1 24 
Jun 21 2022 16:04:15-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR1-GigabitEthernet0/0/1]
[AR1-GigabitEthernet0/0/1]
[AR1-GigabitEthernet0/0/1]
[AR1-GigabitEthernet0/0/1]un in en
                             ^
Error: Unrecognized command found at '^' position.
[AR1-GigabitEthernet0/0/1]
[AR1-GigabitEthernet0/0/1]quit
[AR1]
[AR1]
[AR1]un in en
Info: Information center is disabled.
[AR1]
[AR1]
[AR1]int giga     	
[AR1]int GigabitEthernet 0/0/2
[AR1-GigabitEthernet0/0/2]
[AR1-GigabitEthernet0/0/2]
[AR1-GigabitEthernet0/0/2]
[AR1-GigabitEthernet0/0/2]ip add	
[AR1-GigabitEthernet0/0/2]ip address 
                                     ^
Error:Incomplete command found at '^' position.
[AR1-GigabitEthernet0/0/2]
[AR1-GigabitEthernet0/0/2]ip address 10.1.4.1 30 
[AR1-GigabitEthernet0/0/2]
[AR1-GigabitEthernet0/0/2]
[AR1-GigabitEthernet0/0/2]
[AR1-GigabitEthernet0/0/2]ip rou	
[AR1-GigabitEthernet0/0/2]ip route-s	
[AR1-GigabitEthernet0/0/2]ip route-sta	
[AR1-GigabitEthernet0/0/2]return
<AR1>sys
Enter system view, return user view with Ctrl+Z.
[AR1]ip sta	
[AR1]ip static	
[AR1]ip rou	
[AR1]ip route-s	
[AR1]ip route-static 10.1.2.0 255.255.255.0 10.1.4.2
[AR1]
[AR1]
[AR1]
[AR1]ip route-sta	
[AR1]ip route-static 10.1.3.0 255.255.255.0 10.1.4.2
[AR1]
[AR1]
[AR1]
[AR1]

AR2:

...

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]
[Huawei]sysname AR2
[AR2]
[AR2]
[AR2]
[AR2]int giga	
[AR2]int GigabitEthernet 0/0/2
[AR2-GigabitEthernet0/0/2]
[AR2-GigabitEthernet0/0/2]
[AR2-GigabitEthernet0/0/2]
[AR2-GigabitEthernet0/0/2]ip add 10.1.4.2 30 
Jun 21 2022 16:18:30-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/2 has entered the UP state. 
[AR2-GigabitEthernet0/0/2]
[AR2-GigabitEthernet0/0/2]
[AR2-GigabitEthernet0/0/2]
[AR2-GigabitEthernet0/0/2]int giga	
[AR2-GigabitEthernet0/0/2]quit
[AR2]int giga	
[AR2]int GigabitEthernet 0/0/1
[AR2-GigabitEthernet0/0/1]ip add 10.1.2.1 24 
Jun 21 2022 16:19:43-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR2-GigabitEthernet0/0/1]
[AR2-GigabitEthernet0/0/1]
[AR2-GigabitEthernet0/0/1]quit
[AR2]
[AR2]
[AR2]
[AR2]un in en
Info: Information center is disabled.
[AR2]
[AR2]
[AR2]
[AR2]int giga	
[AR2]int GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]
[AR2-GigabitEthernet0/0/0]
[AR2-GigabitEthernet0/0/0]
[AR2-GigabitEthernet0/0/0]
[AR2-GigabitEthernet0/0/0]ip add 10.1.5.1 30
[AR2-GigabitEthernet0/0/0]
[AR2-GigabitEthernet0/0/0]
[AR2-GigabitEthernet0/0/0]
[AR2-GigabitEthernet0/0/0]quit
[AR2]
[AR2]
[AR2]
[AR2]
[AR2]
[AR2]
[AR2]ip rou	
[AR2]ip route-st	
[AR2]ip route-static 10.1.1.0 255.255.255.0
                                            ^
Error:Incomplete command found at '^' position.
[AR2]ip route-static 10.1.1.0 255.255.255.0 10.1.4.1
[AR2]
[AR2]
[AR2]
[AR2]
[AR2]ip route-static 10.1.3.0 255.255.255.0 10.1.5.2
[AR2]
[AR2]
[AR2]
[AR2]
[AR2]

AR3:

...

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]
[Huawei]
[Huawei]
[Huawei]sysname AR3
[AR3]
[AR3]
[AR3]
[AR3]
[AR3]int giga	
[AR3]int GigabitEthernet 0/0/1
[AR3-GigabitEthernet0/0/1]
[AR3-GigabitEthernet0/0/1]
[AR3-GigabitEthernet0/0/1]ip add 10.1.3.1 24
Jun 21 2022 17:16:43-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR3-GigabitEthernet0/0/1]
[AR3-GigabitEthernet0/0/1]
[AR3-GigabitEthernet0/0/1]
[AR3-GigabitEthernet0/0/1]quit
[AR3]un in en
Info: Information center is disabled.
[AR3]
[AR3]
[AR3]
[AR3]int giga	
[AR3]int GigabitEthernet 0/0/2
[AR3-GigabitEthernet0/0/2]
[AR3-GigabitEthernet0/0/2]
[AR3-GigabitEthernet0/0/2]
[AR3-GigabitEthernet0/0/2]ip add 10.1.5.2 30
[AR3-GigabitEthernet0/0/2]
[AR3-GigabitEthernet0/0/2]
[AR3-GigabitEthernet0/0/2]
[AR3-GigabitEthernet0/0/2]quit
[AR3]
[AR3]
[AR3]
[AR3]ip rou	
[AR3]ip route-s	
[AR3]ip route-static 10.1.2.0 255.255.255
                              ^
Error: Wrong parameter found at '^' position.
[AR3]ip route-static 10.1.2.0 255.255.255.0 10.1.5.1
[AR3]
[AR3]
[AR3]
[AR3]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<AR3>
<AR3>
<AR3>
<AR3>
<AR3>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[n]:y
  It will take several minutes to save configuration file, please wait.......
  Configuration file had been saved successfully
  Note: The configuration file will take effect after being activated
<AR3>sys
Enter system view, return user view with Ctrl+Z.
[AR3]
[AR3]
[AR3]ip rou	
[AR3]ip route-s	
[AR3]ip route-static 10.1.1.0 255.255.255.0 10.1.5.1 
[AR3]
[AR3]
[AR3]
[AR3]
[AR3]
[AR3]quit
<AR3>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[n]:y
  It will take several minutes to save configuration file, please wait.......
  Configuration file had been saved successfully
  Note: The configuration file will take effect after being activated
<AR3>

PC1:

...image

PC2:

...image

PC3:

image

第三步:再ping验证或display ip routing。

PC1 ping PC3

image

PC1 ping PC2

image

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

lvhanghmm

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

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

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

打赏作者

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

抵扣说明:

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

余额充值