栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

hcia第二天作业 静态路由

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

hcia第二天作业 静态路由

 r6路由器配置相关命令

The device is running!



sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]int	
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add	
[Huawei-GigabitEthernet0/0/0]ip address 16.1.1.1 24
Jul 21 2022 18:40:30-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g0/0/02
[Huawei-GigabitEthernet0/0/2]ip add	
[Huawei-GigabitEthernet0/0/2]ip address 67.1.1.1 24
Jul 21 2022 18:40:47-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]int g0/0/1 
[Huawei-GigabitEthernet0/0/1]ip add	
[Huawei-GigabitEthernet0/0/1]ip address 

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

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


sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]dhcp en	
[Huawei]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool 1
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-1]netw	
[Huawei-ip-pool-1]network 172.16.1.0 ma	
[Huawei-ip-pool-1]network 172.16.1.0 mask 255.255.255.0
[Huawei-ip-pool-1]gat	
[Huawei-ip-pool-1]gateway-list 172.16.1.1
[Huawei-ip-pool-1]dns	
[Huawei-ip-pool-1]dns-list 8.8.8.8 114.114.114.114
[Huawei-ip-pool-1]q
[Huawei]int	
[Huawei]interface  g0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp se	
[Huawei-GigabitEthernet0/0/1]dhcp select gl	
[Huawei-GigabitEthernet0/0/1]dhcp select global 
[Huawei-GigabitEthernet0/0/1]q
[Huawei]
[Huawei]
[Huawei]
[Huawei]
[Huawei]dhcp emn	
[Huawei]dhcp en	
[Huawei]dhcp enable 
[Huawei]int	
[Huawei]interface g
                    ^
Error:Incomplete command found at '^' position.
[Huawei]sys	
[Huawei]sysname r6
[r6]
[r6]dhcp en	
[r6]dhcp enable 
[r6]ip pool 1
[r6-ip-pool-1]net	
[r6-ip-pool-1]netbios-type
                           ^
Error:Incomplete command found at '^' position.
[r6-ip-pool-1]netw	
[r6-ip-pool-1]network 172.16.1.0 ma	
[r6-ip-pool-1]network 172.16.1.0 mask 255.255.255.0
Error:Please delete the network section first.
[r6-ip-pool-1]
[r6-ip-pool-1]
[r6-ip-pool-1]undo netw	
[r6-ip-pool-1]undo network 172.16.1.0 m	
[r6-ip-pool-1]undo network 172.16.1.0 mask 255.255.255.0
                           ^
Error:Too many parameters found at '^' position.
[r6-ip-pool-1]q
[r6]undo network 172.16.1.0 mask 255.255.255.0
         ^
Error: Unrecognized command found at '^' position.
[r6]int	
[r6]interface g0/0/1
[r6-GigabitEthernet0/0/1]ip add	
[r6-GigabitEthernet0/0/1]ip address 172.16.1.1 24
Jul 21 2022 19:05:15-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r6-GigabitEthernet0/0/1]q
[r6]dhcp em	
[r6]dhcp en	
[r6]dhcp enable 
[r6]ip pool 1
[r6-ip-pool-1]netw	
[r6-ip-pool-1]network 172.16.1.0 ma	
[r6-ip-pool-1]network 172.16.1.0 mask 255.255.255.0
Error:Please delete the network section first.
[r6-ip-pool-1]gat	
[r6-ip-pool-1]gateway-list 172.16.1.1
Error:Please delete all sections of the pool before modifying the gateway IP add
ress.
[r6-ip-pool-1]dsn	
[r6-ip-pool-1]dns	
[r6-ip-pool-1]dns-list 8.8.8.8 114.114.114.114
Info:Part of the domain-name-server IP has already exist.
[r6-ip-pool-1]q
[r6]int	
[r6]interface g0/0/1
[r6-GigabitEthernet0/0/1]dhcp se	
[r6-GigabitEthernet0/0/1]dhcp select gl	
[r6-GigabitEthernet0/0/1]dhcp select global 
[r6-GigabitEthernet0/0/1]q
[r6]
sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r6]ip s	
[r6]ip sta	
[r6]ip rou	
[r6]ip route-s	
[r6]ip route-static 12.1.1.0 24 16.1.1.2
[r6]ip route-static 21.1.1.0 24 16.1.1.2
[r6]ip route-static 24.1.1.0 24 16.1.1.2
[r6]ip route-static 13.1.1.0 24 16.1.1.2
[r6]ip route-static 34.1.1.0 24 16.1.1.2
[r6]ip route-static 43.1.1.0 24 16.1.1.2
[r6]ip route-static 45.1.1.0 24 16.1.1.2
[r6]ip route-static 192.168.0.0 22 16.1.1.2
[r6]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r6]ip rou	
[r6]ip route-s	
[r6]ip route-static 
                    ^
Error:Incomplete command found at '^' position.
[r6]ip route-static 0.0.0.0 0 67.
                              ^
Error: Wrong parameter found at '^' position.
[r6]ip route-static 0.0.0.0 0 67.1.1.2
[r6]

r5路由配置命令

[r5]int g0/0/2
[r5-GigabitEthernet0/0/2]ip add	
[r5-GigabitEthernet0/0/2]ip address 192.168.2.0 24
Error: The specified IP address is invalid.
[r5-GigabitEthernet0/0/2]ip address 172.168.2.0 24
Error: The specified IP address is invalid.
[r5-GigabitEthernet0/0/2]ip address 183.168.2.0 24
Error: The specified IP address is invalid.
[r5-GigabitEthernet0/0/2]ip address 183.168.2.0 255.255.255.0
Error: The specified IP address is invalid.
[r5-GigabitEthernet0/0/2]q+
                         ^
Error: Unrecognized command found at '^' position.
[r5-GigabitEthernet0/0/2]q
[r5]dis	
[r5]display int	
[r5]display interface br	
[r5]display interface brief 
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors
GigabitEthernet0/0/0        up    up          0%     0%          0          0
GigabitEthernet0/0/1        up    up          0%     0%          0          0
GigabitEthernet0/0/2        up    down        0%     0%          0          0
NULL0                       up    up(s)       0%     0%          0          0
[r5]int	
[r5]interface g0/0/2
[r5-GigabitEthernet0/0/2]shut	
[r5-GigabitEthernet0/0/2]shutdown 
Jul 21 2022 19:24:49-08:00 r5 %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEthern
et0/0/2 has turned into DOWN state.
[r5-GigabitEthernet0/0/2]
[r5-GigabitEthernet0/0/2]un	
[r5-GigabitEthernet0/0/2]undo shu	
[r5-GigabitEthernet0/0/2]undo shutdown 
[r5-GigabitEthernet0/0/2]
Jul 21 2022 19:25:06-08:00 r5 %%01IFPDT/4/IF_STATE(l)[1]:Interface GigabitEthern
et0/0/2 has turned into UP state.
[r5-GigabitEthernet0/0/2]dsi	
[r5-GigabitEthernet0/0/2]dis	
[r5-GigabitEthernet0/0/2]discq
                         ^
Error: Unrecognized command found at '^' position.
[r5-GigabitEthernet0/0/2]dis	
[r5-GigabitEthernet0/0/2]display this	
[r5-GigabitEthernet0/0/2]display this 
[V200R003C00]
#
interface GigabitEthernet0/0/2
 dhcp select global
#
return
[r5-GigabitEthernet0/0/2]q
[r5]q
sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r5]dis	
[r5]display int	
[r5]display interface br	
[r5]display interface brief 
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors
GigabitEthernet0/0/0        up    up          0%     0%          0          0
GigabitEthernet0/0/1        up    up          0%     0%          0          0
GigabitEthernet0/0/2        up    down        0%     0%          0          0
NULL0                       up    up(s)       0%     0%          0          0
[r5]undo ip add	
[r5]int	
[r5]interface g0/0/2
[r5-GigabitEthernet0/0/2]undo ip add	
[r5-GigabitEthernet0/0/2]undo ip address 192.168.2.0 24
Error: The specified IP address is invalid.
[r5-GigabitEthernet0/0/2]ip add	
[r5-GigabitEthernet0/0/2]ip address 192.168.2.0 24
Error: The specified IP address is invalid.
[r5-GigabitEthernet0/0/2]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r5]ip rou	
[r5]ip route-s	
[r5]ip route-static 172.16.1.0 24 45.1.1.1
[r5]ip route-static 16.1.1.0 24 45.1.1.1
[r5]ip route-static 12.1.1.0 24 45.1.1.1
[r5]ip route-static 21.1.1.0 24 45.1.1.1
[r5]ip route-static 24.1.1.0 24 45.1.1.1
[r5]ip route-static 13.1.1.0 24 45.1.1.1
[r5]ip route-static 34.1.1.0 24 45.1.1.1
[r5]ip route-static 43.1.1.0 24 45.1.1.1
[r5]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r5]ip rou	
[r5]ip route-s	
[r5]ip route-static 0.0.0.0 0 45.1.1.1
[r5]
syys	
sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r5]int	
[r5]interface g0/0/2
[r5-GigabitEthernet0/0/2]ip add	
[r5-GigabitEthernet0/0/2]ip address 192.168.2.0 24
Error: The specified IP address is invalid.
[r5-GigabitEthernet0/0/2]ip address 192.168.2.1 24
Jul 21 2022 20:02:02-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r5-GigabitEthernet0/0/2]q

r4路由配置 命令





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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]int	
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip ad	
[Huawei-GigabitEthernet0/0/0]ip address 24.1.1.2 24
[Huawei-GigabitEthernet0/0/0]
Jul 21 2022 18:49:45-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add	
[Huawei-GigabitEthernet0/0/1]ip address 34.1.1.2 24
Jul 21 2022 18:50:00-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int g4/0/0/
                                 ^
Error: Unrecognized command found at '^' position.
[Huawei-GigabitEthernet0/0/1]int g4/0/0
[Huawei-GigabitEthernet4/0/0]ip add	
[Huawei-GigabitEthernet4/0/0]ip address 43.1.1.2 24
[Huawei-GigabitEthernet4/0/0]
Jul 21 2022 18:50:23-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet4/0/0 has entered the UP state. 
[Huawei-GigabitEthernet4/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add	
[Huawei-GigabitEthernet0/0/2]ip address 45.1.1.1 24
[Huawei-GigabitEthernet0/0/2]
Jul 21 2022 18:50:39-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[3]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]q
[Huawei]q
sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]sys	
[Huawei]sysname r4
[r4]


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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r4]dis	
[r4]display int	
[r4]display interface br
                      ^
Error: Wrong parameter found at '^' position.
[r4]display interface br	
[r4]display interface brief 
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors
GigabitEthernet0/0/0        up    up          0%     0%          0          0
GigabitEthernet0/0/1        up    up          0%     0%          0          0
GigabitEthernet0/0/2        up    up          0%     0%          0          0
GigabitEthernet4/0/0        up    up          0%     0%          0          0
NULL0                       up    up(s)       0%     0%          0          0
[r4]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r4]ip rou-s	
[r4]ip rou	
[r4]ip route-s	
[r4]ip route-static 192.168.0.0 22 45.1.1.2
[r4]ip route-static 172.16.1.0 24 24.1.1.1
[r4]ip route-static 16.1.1.0 24 24.1.1.1
[r4]ip route-static 12.1.1.0 24 24.1.1.1
[r4]ip route-static 21.1.1.0 24 24.1.1.1
[r4]ip route-static 13.1.1.0 24 34.1.1.1
[r4]ip route-static 13.1.1.0 24 43.1.1.1
[r4]ip route-static 13.1.1.0 24 43.1.1.1

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

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

r3路由配置命令

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]int	
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip ad	
[Huawei-GigabitEthernet0/0/0]ip address 13.1.1.2 24
Jul 21 2022 18:48:03-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int	
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add	
[Huawei-GigabitEthernet0/0/1]ip address 34.1.1.1 24
[Huawei-GigabitEthernet0/0/1]
Jul 21 2022 18:48:22-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int g0/0/2 
[Huawei-GigabitEthernet0/0/2]ip add	
[Huawei-GigabitEthernet0/0/2]ip address 43.1.1.1 24
[Huawei-GigabitEthernet0/0/2]
Jul 21 2022 18:48:38-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]q
[Huawei]sys	
[Huawei]sysname r3
[r3]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r3]ip rou	
[r3]ip route-w	
[r3]ip route-s	
[r3]ip route-static 
                    ^
Error:Incomplete command found at '^' position.
[r3]ip route-static 172.16.1.0 24 13.1.1.1
[r3]ip route-static 16.1.1.0 24 13.1.1.1
[r3]ip route-static 45.1.1.0 24 34.1.1.2
[r3]ip route-static 45.1.1.0 24 43.1.1.2
[r3]ip route-static 192.168.0.0 22 43.1.1.2
[r3]ip route-static 12.1.1.0 24 13.1.1.1
[r3]ip route-static 21.1.1.0 24 13.1.1.1
[r3]ip route-static 24.1.1.0 24 34.1.1.2 
[r3]ip route-static 24.1.1.0 24 43.1.1.2
[r3]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r3]ip rou	
[r3]ip route-s	
[r3]ip route-static 0.0.0.0 0 13.1.1.1 
[r3]ip route-static 0.0.0.0 0 24.1.1.1
[r3]undo ip route-static 0.0.0.0 0 24.1.1.1
Jul 21 2022 19:54:48-08:00 r3 %%01RM/4/IPV4_DEFT_RT_CHG(l)[0]:IPV4 default Route
 is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=GigabitEt
hernet0/0/1, Nexthop=24.1.1.1, Neighbour=0.0.0.0, Preference=1006632960, Label=N
ULL, Metric=0) 
[r3]
[r3]
sa	
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


r2路由配置命令


sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]int	
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add	
[Huawei-GigabitEthernet0/0/0]ip address 12.1.1.2 24
Jul 21 2022 18:45:30-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int	
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add	
[Huawei-GigabitEthernet0/0/2]ip address 21.1.1.2 24
Jul 21 2022 18:45:55-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]int	
[Huawei-GigabitEthernet0/0/2]int 0/0/1
                                 ^
Error: Unrecognized command found at '^' position.
[Huawei-GigabitEthernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add	
[Huawei-GigabitEthernet0/0/1]ip address 24.1.1.1 24
[Huawei-GigabitEthernet0/0/1]
Jul 21 2022 18:46:30-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys	
[Huawei]sysname r2
[r2]
syys	
sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r2]ip rou	
[r2]ip route-s	
[r2]ip route-static 16.1.1.0 24 12.1.1.1
[r2]ip route-static 16.1.1.0 24 21.1.1.1 pr	
[r2]ip route-static 16.1.1.0 24 21.1.1.1 preference 
                                                    ^
Error:Incomplete command found at '^' position.
[r2]ip route-static 16.1.1.0 24 21.1.1.1 preference 61
[r2]ip route-static 172.16.1.0 24 12.1.1.1
[r2]ip route-static 172.16.1.0 24 21.1.1.1 pr	
[r2]ip route-static 172.16.1.0 24 21.1.1.1 preference 61
[r2]ip route-static 45.1.1.0 24 24.1.1.2
[r2]ip route-static 192.168 24.1.1.2
                    ^
Error: Wrong parameter found at '^' position.
[r2]ip route-static 192.168.0.0 22 24.1.1.2
[r2]ip route-static 13.1.1.0 24 12.1.1.1
[r2]ip route-static 13.1.1.0 24 21.1.1.1 pr	
[r2]ip route-static 13.1.1.0 24 21.1.1.1 preference 61
[r2]ip route-static 34.1.1.0 24 24.1.1.2
[r2]ip route-static 43.1.1.0 24 24.1.1.2
[r2]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r2]ip 	
[r2]ip rou	
[r2]ip route-static 0.0.0.0 0 12.1.1.1
[r2]ip route-static 0.0.0.0 0 21.1.1.1 pr	
[r2]ip route-static 0.0.0.0 0 21.1.1.1 preference 61
[r2]
sa	
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

r1路由配置命令

syys	
sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]int	
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add	
[Huawei-GigabitEthernet0/0/0]ip address 16.1.1.2 24
Jul 21 2022 18:42:49-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add	
[Huawei-GigabitEthernet0/0/2]ip address 13.1.1.1 24
[Huawei-GigabitEthernet0/0/2]
Jul 21 2022 18:43:30-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add	
[Huawei-GigabitEthernet0/0/1]ip address 12.1.1.1 24
[Huawei-GigabitEthernet0/0/1]
Jul 21 2022 18:43:47-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int g4/0/0
[Huawei-GigabitEthernet4/0/0]ip add	
[Huawei-GigabitEthernet4/0/0]ip address 21.1.1.1 24
[Huawei-GigabitEthernet4/0/0]
Jul 21 2022 18:44:02-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[3]:The line protocol
 IP on the interface GigabitEthernet4/0/0 has entered the UP state. 
[Huawei-GigabitEthernet4/0/0]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys	
[Huawei]sysname r1
[r1]ping 13.1.1.2
  PING 13.1.1.2: 56  data bytes, press CTRL_C to break
    Reply from 13.1.1.2: bytes=56 Sequence=1 ttl=255 time=90 ms
    Reply from 13.1.1.2: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 13.1.1.2: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 13.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 13.1.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 13.1.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/36/90 ms

[r1]

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r1]ip rou	
[r1]ip route-s	
[r1]ip route-static 172.16.1.0 24 16.1.1.1
[r1]ip route-static 24.1.1.0 24 12.1.1.2
[r1]ip route-static 24.1.1.0 24 12.1.1.2 pr	
[r1]ip route-static 24.1.1.0 24 12.1.1.2 preference 61
Info: Succeeded in modifying route.
[r1]ip route-static 45.1.1.0 24 12.1.1.2
[r1]ip route-static 24.1.1.0 24 21.1.1.2 preference 61
[r1]ip route-static 45.1.1.0 24 21.1.1.2 preference 61
[r1]ip route-static 192.168.0.0 22 21.1.1.2
[r1]ip route-static 192.168.0.0 22 21.1.1.2 pr	
[r1]ip route-static 192.168.0.0 22 21.1.1.2 preference 61
Info: Succeeded in modifying route.
[r1]

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

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

sys	
system-view 
Enter system view, return user view with Ctrl+Z.
[r1]ip 	
[r1]ip rou	
[r1]ip route-static 0.0.0.0 0 16.1.1.1
[r1]
sa	
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

拓扑图

 效果截图

pc7ping 不同网段的pc

 pc1ping 别的网段的pc

 192.168 网段回ping 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1024050.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号