1.全网可达
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]st r1
Please input the username:
Please input the username:r1
Error: Unknown host or wrong IP address.
[Huawei]sy r1
[r1]inter
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip ad
[r1-GigabitEthernet0/0/1]ip address 12.1.1.1 24
Nov 13 2022 13:13:21-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]
[r1-GigabitEthernet0/0/1]
<r1>sy
Enter system view, return user view with Ctrl+Z.
[r1]ip ro
[r1]ip route
[r1]ip route-static 23.1
^
Error: Wrong parameter found at '^' position.
[r1]ip route-static 23.1.1.0 24 12.1.1.2
[r1]ip ro
[r1]ip route
[r1]ip route-static 34.1.1.0 24 12.1.1.2
[r1]ip ro
[r1]ip route
[r1]ip route-static 46.1.1.0 24 12.1.1.2
[r1]dis
[r1]display ip ro
[r1]display ip routing-table
[r1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Direct 0 0 D 12.1.1.1 GigabitEthernet
0/0/1
12.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
12.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/1
34.1.1.0/24 Static 60 0 RD 12.1.1.2 GigabitEthernet
0/0/1
46.1.1.0/24 Static 60 0 RD 12.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
[r2]ip ro
[r2]ip route
[r2]ip route-static 34.1.1.0 24 23.1.1.2
[r2]ip ro
[r2]ip route
[r2]ip route-static 34.1.1.0 24 32.1.1.1
[r2]ip ro
[r2]ip route
[r2]ip route-static 46.1.1.0 24 23.1.1.2
[r2]ip ro
[r2]ip route
[r2]ip route-static 46.1.1.0 24 32.1.1.1
[r2]dis
[r2]display ip ro
[r2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 17
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Direct 0 0 D 12.1.1.2 GigabitEthernet
0/0/0
12.1.1.2/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
23.1.1.0/24 Direct 0 0 D 23.1.1.1 GigabitEthernet
0/0/1
23.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
32.1.1.0/24 Direct 0 0 D 32.1.1.2 GigabitEthernet
0/0/2
32.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
32.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
34.1.1.0/24 Static 60 0 RD 23.1.1.2 GigabitEthernet
0/0/1
Static 60 0 RD 32.1.1.1 GigabitEthernet
0/0/2
46.1.1.0/24 Static 60 0 RD 23.1.1.2 GigabitEthernet
0/0/1
Static 60 0 RD 32.1.1.1 GigabitEthernet
0/0/2
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
[r3]ip ro
[r3]ip route
[r3]ip route-static 12.1.1.0 24 23.1.1.1
[r3]ip ro
[r3]ip route
[r3]ip route-static 12.1.1.0 24 32.1.1.2
[r3]ip ro
[r3]ip route
[r3]ip route-static 46.1.1.0 24 34.1.1.2
[r3]dis
[r3]display ip ro
[r3]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 Static 60 0 RD 23.1.1.1 GigabitEthernet
0/0/0
Static 60 0 RD 32.1.1.2 GigabitEthernet
0/0/1
23.1.1.0/24 Direct 0 0 D 23.1.1.2 GigabitEthernet
0/0/0
23.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
23.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
32.1.1.0/24 Direct 0 0 D 32.1.1.1 GigabitEthernet
0/0/1
32.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
32.1.1.255/32 Direct 0 0 D 127.0.0.1 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
[r4]ip ro
[r4]ip route
[r4]ip route-static 23.1.1.0 24 34.1.1.1
[r4]ip ro
[r4]ip route
[r4]ip route-static 32.1.1.0 24 34.1.1.1
[r4]ip ro
[r4]ip route
[r4]ip route-static 12.1.1.0 24 34.1.1.1
[r4]dis
[r4]display ip
[r4]display ip ro
[r4]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Static 60 0 RD 34.1.1.1 GigabitEthernet
0/0/0
23.1.1.0/24 Static 60 0 RD 34.1.1.1 GigabitEthernet
0/0/0
32.1.1.0/24 Static 60 0 RD 34.1.1.1 GigabitEthernet
0/0/0
34.1.1.0/24 Direct 0 0 D 34.1.1.2 GigabitEthernet
0/0/0
34.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
34.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
46.1.1.0/24 Direct 0 0 D 46.1.1.1 GigabitEthernet
0/0/2
46.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
46.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
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
[r6]ip ro
[r6]ip route
[r6]ip route-static 34.1.1.0 24 46.1.1.1
[r6]ip ro
[r6]ip route
[r6]ip route-static23.1.1.0 24 46.1.1.1
^
Error: Unrecognized command found at '^' position.
[r6]ip route-static 23.1.1.0 24 46.1.1.1
[r6]ip ro
[r6]ip route
[r6]ip route-static 32.1.1.0 24 46.1.1.1
[r6]ip ro
[r6]ip route
[r6]ip route-static 12.1.1.0 24 46.1.1.1
[r6]dsi
[r6]dis
[r6]display ip ro
[r6]display ip routing-table
[r6]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Static 60 0 RD 46.1.1.1 GigabitEthernet
0/0/0
23.1.1.0/24 Static 60 0 RD 46.1.1.1 GigabitEthernet
0/0/0
32.1.1.0/24 Static 60 0 RD 46.1.1.1 GigabitEthernet
0/0/0
34.1.1.0/24 Static 60 0 RD 46.1.1.1 GigabitEthernet
0/0/0
46.1.1.0/24 Direct 0 0 D 46.1.1.2 GigabitEthernet
0/0/0
46.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
46.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
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
2.pc1pc2获取指定ip
[r1]sy dhcp
[dhcp]dhcp en
[dhcp]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[dhcp]ip po
[dhcp]ip policy-based-route
[dhcp]ip pool 1
Info: It's successful to create an IP address pool.
[dhcp-ip-pool-1]netqu
^
Error: Unrecognized command found at '^' position.
[dhcp-ip-pool-1]qu
[dhcp]inter
[dhcp]interface g0/0/0
[dhcp-GigabitEthernet0/0/0]ip ads
[dhcp-GigabitEthernet0/0/0]ip ad
[dhcp-GigabitEthernet0/0/0]ip address 172.16.1.1 24
Nov 13 2022 13:44:01-08:00 dhcp %%01IFNET/4/LINK_STATE(l)[0]:The line protocol I
P on the interface GigabitEthernet0/0/0 has entered the UP state.
[dhcp-GigabitEthernet0/0/0]qu
[dhcp]ip po
[dhcp]ip policy-based-route
[dhcp]ip pool 1
[dhcp-ip-pool-1]net
[dhcp-ip-pool-1]netbios-type
[dhcp-ip-pool-1]network 172.16.1.0 ms
[dhcp-ip-pool-1]network 172.16.1.0 ma
[dhcp-ip-pool-1]network 172.16.1.0 mask 24
[dhcp-ip-pool-1]ga
[dhcp-ip-pool-1]gateway-list 172.16.1.1
[dhcp-ip-pool-1]dns
[dhcp-ip-pool-1]dns-list 8.8.8.8 114.114.114.114
[dhcp-ip-pool-1]st
[dhcp-ip-pool-1]static-bind ip
[dhcp-ip-pool-1]static-bind ip-address 172.16.1.11 mac
[dhcp-ip-pool-1]static-bind ip-address 172.16.1.11 mac-address 5489-9817-0CD5
[dhcp-ip-pool-1]st
[dhcp-ip-pool-1]static-bind ip
[dhcp-ip-pool-1]static-bind ip-address 172.16.1.13 mac
[dhcp-ip-pool-1]static-bind ip-address 172.16.1.13 mac-address 5489-9877-178B
3.pc3 pc4 不能获取250到254的地址
[r6]dhcp en
[r6]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r6]ip po
[r6]ip policy-based-route
[r6]ip pool 6
Info: It's successful to create an IP address pool.
[r6-ip-pool-6]net
[r6-ip-pool-6]netbios-type
[r6-ip-pool-6]network 192.168.1.0 ma
[r6-ip-pool-6]network 192.168.1.0 mask 24
[r6-ip-pool-6]gat
[r6-ip-pool-6]gateway-list
[r6-ip-pool-6]gateway-list 192.168.1.1
[r6-ip-pool-6]dns
[r6-ip-pool-6]dns-list 8.8.8.8 114.114.114.114
[r6-ip-pool-6]qu
[r6]inter
[r6]interface g0/0/1
[r6-GigabitEthernet0/0/1]ip ad
[r6-GigabitEthernet0/0/1]ip address 192.168.1.1 24
[r6-GigabitEthernet0/0/1]
Nov 13 2022 13:55:09-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]qu
[r6]ip po
[r6]ip policy-based-route
[r6]ip pool6
^
Error: Unrecognized command found at '^' position.
[r6]ip pool 6
[r6-ip-pool-6]ex
^
Error:Incomplete command found at '^' position.
[r6-ip-pool-6]ex
[r6-ip-pool-6]excluded-ip-address 192.168.1.250 192.168.1.254
[r6-ip-pool-6]qu
[r6]inter
[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
4.32.1.1.0为备份路径
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Direct 0 0 D 12.1.1.2 GigabitEthernet
0/0/0
12.1.1.2/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
23.1.1.0/24 Direct 0 0 D 23.1.1.1 GigabitEthernet
0/0/1
23.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
32.1.1.0/24 Direct 0 0 D 32.1.1.2 GigabitEthernet
0/0/2
32.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
32.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
34.1.1.0/24 Static 60 0 RD 23.1.1.2 GigabitEthernet
0/0/1
Static 60 0 RD 32.1.1.1 GigabitEthernet
0/0/2
46.1.1.0/24 Static 60 0 RD 23.1.1.2 GigabitEthernet
0/0/1
Static 60 0 RD 32.1.1.1 GigabitEthernet
0/0/2
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
12.1.1.0/24 Static 60 0 RD 23.1.1.1 GigabitEthernet
0/0/0
Static 60 0 RD 32.1.1.2 GigabitEthernet
0/0/1
23.1.1.0/24 Direct 0 0 D 23.1.1.2 GigabitEthernet
0/0/0
23.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
23.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
32.1.1.0/24 Direct 0 0 D 32.1.1.1 GigabitEthernet
0/0/1
32.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
32.1.1.255/32 Direct 0 0 D 127.0.0.1 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
estination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Direct 0 0 D 12.1.1.1 GigabitEthernet
0/0/1
12.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
12.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/1
34.1.1.0/24 Static 60 0 RD 12.1.1.2 GigabitEthernet
0/0/1
46.1.1.0/24 Static 60 0 RD 12.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
12.1.1.0/24 Static 60 0 RD 34.1.1.1 GigabitEthernet
0/0/0
23.1.1.0/24 Static 60 0 RD 34.1.1.1 GigabitEthernet
0/0/0
32.1.1.0/24 Static 60 0 RD 34.1.1.1 GigabitEthernet
0/0/0
34.1.1.0/24 Direct 0 0 D 34.1.1.2 GigabitEthernet
0/0/0
34.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
34.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
46.1.1.0/24 Direct 0 0 D 46.1.1.1 GigabitEthernet
0/0/2
46.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
46.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
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
12.1.1.0/24 Static 60 0 RD 46.1.1.1 GigabitEthernet
0/0/0
23.1.1.0/24 Static 60 0 RD 46.1.1.1 GigabitEthernet
0/0/0
32.1.1.0/24 Static 60 0 RD 46.1.1.1 GigabitEthernet
0/0/0
34.1.1.0/24 Static 60 0 RD 46.1.1.1 GigabitEthernet
0/0/0
46.1.1.0/24 Direct 0 0 D 46.1.1.2 GigabitEthernet
0/0/0
46.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
46.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
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
5.pc1访问pc3456