1的IP配置
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname 1
[1]interface g0/0/0
[1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
Nov 16 2022 13:34:59-08:00 1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP o
n the interface GigabitEthernet0/0/0 has entered the UP state.
[1-GigabitEthernet0/0/0]quit
[1]interface g0/0/1
[1-GigabitEthernet0/0/1]ip address 21.1.1.1 24
Nov 16 2022 13:38:07-08:00 1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP o
n the interface GigabitEthernet0/0/1 has entered the UP state.
[1-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
2的IP配置
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname 2
[2]interface g0/0/0
[2-GigabitEthernet0/0/0]ip address 21.1.1.2 24
Nov 16 2022 13:38:56-08:00 2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP o
n the interface GigabitEthernet0/0/0 has entered the UP state.
[2-GigabitEthernet0/0/0]quit
[2]interface g0/0/1
[2-GigabitEthernet0/0/1]ip address 21.1.1.2 24
Nov 16 2022 13:40:59-08:00 2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP o
n the interface GigabitEthernet0/0/1 has entered the UP state.
[2-GigabitEthernet0/0/1]quit
[2]interface g0/0/2
[2-GigabitEthernet0/0/2]ip address 23.1.1.1 24
[2-GigabitEthernet0/0/2]
Nov 16 2022 13:41:39-08:00 2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP o
n the interface GigabitEthernet0/0/2 has entered the UP state.
[2-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
3的配置IP
<Huawei>system-view
[Huawei]sysname 3
[3]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
<3>sy
<3>system-view
Enter system view, return user view with Ctrl+Z.
[3]interface g0/0/0
[3-GigabitEthernet0/0/0]ip address 23.1.1.2 24
Nov 16 2022 13:42:39-08:00 3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP o
n the interface GigabitEthernet0/0/0 has entered the UP state.
[3-GigabitEthernet0/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
两个都写就是等开销
[1]ip route-static 23.1.1.0 24 12.1.1.2
[1]ip route-static 23.1.1.0 24 21.1.1.2
查看路由表
[1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Direct 0 0 D 12.1.1.1 GigabitEthernet
0/0/0
12.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
12.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
21.1.1.0/24 Direct 0 0 D 21.1.1.1 GigabitEthernet
0/0/1
21.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
21.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.1.1.0/24 Static 60 0 RD 12.1.1.2 GigabitEthernet
0/0/0
Static 60 0 RD 21.1.1.2 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
开销=有两个下一跳