HCNA配置浮动静态路由
1、拓扑图
2、配置IP
R1
1 Please press enter to start cmd line! 2 ############ 3 <Huawei> 4 Dec 10 2017 14:59:09-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEt 5 hernet0/0/0 has turned into UP state. 6 <Huawei> 7 Dec 10 2017 14:59:12-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[1]:Interface Serial2/0 8 /0 has turned into UP state. 9 <Huawei> 10 Dec 10 2017 14:59:15-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol 11 PPP on the interface Serial2/0/0 has entered the UP state. 12 <Huawei>sys 13 Enter system view, return user view with Ctrl+Z. 14 [Huawei]sysname R1 15 [R1]int g0/0/0 16 [R1-GigabitEthernet0/0/0]ip add 12.1.1.1 24 17 Dec 10 2017 15:00:43-08:00 R1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 18 on the interface GigabitEthernet0/0/0 has entered the UP state. 19 [R1-GigabitEthernet0/0/0]q 20 [R1]int s 21 [R1]int Serial 1 22 [R1]int Serial 1 23 ^ 24 Error: Wrong parameter found at '^' position. 25 [R1]int Serial 26 [R1]int Serial ? 27 <2-2> Serial interface slot number 28 [R1]int Serial 2 29 ^ 30 Error: Wrong parameter found at '^' position. 31 [R1]int Serial 2/0/0 32 [R1-Serial2/0/0]ip add 11.1.1.1 24 33 [R1-Serial2/0/0]q 34 [R1] 35 Dec 10 2017 15:03:52-08:00 R1 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol PPP 36 IPCP on the interface Serial2/0/0 has entered the UP state. 37 [R1]dis ip int 38 [R1]dis ip interface bri 39 *down: administratively down 40 ^down: standby 41 (l): loopback 42 (s): spoofing 43 The number of interface that is UP in Physical is 3 44 The number of interface that is DOWN in Physical is 2 45 The number of interface that is UP in Protocol is 3 46 The number of interface that is DOWN in Protocol is 2 47 48 Interface IP Address/Mask Physical Protocol 49 GigabitEthernet0/0/0 12.1.1.1/24 up up 50 GigabitEthernet0/0/1 unassigned down down 51 NULL0 unassigned up up(s) 52 Serial2/0/0 11.1.1.1/24 up up 53 Serial2/0/1 unassigned down down 54 [R1]
R2
1 Please press enter to start cmd line! 2 #### 3 <Huawei> 4 Dec 10 2017 14:59:07-08:00 Huawei %%01IFNET/4/BOARD_ENABLE(l)[0]:Board 1 has bee 5 n available. 6 <Huawei> 7 Dec 10 2017 14:59:07-08:00 Huawei %%01IFNET/4/IF_ENABLE(l)[1]:Interface GigabitE 8 thernet1/0/0 has been available. 9 <Huawei> 10 Dec 10 2017 14:59:08-08:00 Huawei %%01DEV/4/ENTUP(l)[2]:2SA board[2] register su 11 ccess. 12 <Huawei> 13 Dec 10 2017 14:59:08-08:00 Huawei %%01IFNET/4/BOARD_ENABLE(l)[3]:Board 2 has bee 14 n available. 15 <Huawei> 16 Dec 10 2017 14:59:08-08:00 Huawei %%01IFNET/4/IF_ENABLE(l)[4]:Interface Serial2/ 17 0/0 has been available. 18 <Huawei> 19 Dec 10 2017 14:59:08-08:00 Huawei %%01IFNET/4/IF_ENABLE(l)[5]:Interface Serial2/ 20 0/1 has been available. 21 <Huawei> 22 Dec 10 2017 14:59:10-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[6]:Interface GigabitEt 23 hernet0/0/0 has turned into UP state. 24 <Huawei> 25 Dec 10 2017 14:59:10-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[7]:Interface GigabitEt 26 hernet0/0/1 has turned into UP state. 27 <Huawei> 28 Dec 10 2017 14:59:12-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[8]:Interface Serial2/0 29 /0 has turned into UP state. 30 <Huawei> 31 Dec 10 2017 14:59:15-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[9]:The line protocol 32 PPP on the interface Serial2/0/0 has entered the UP state. 33 <Huawei>sys 34 Enter system view, return user view with Ctrl+Z. 35 [Huawei]sysname R2 36 [R2]int 37 [R2]interface g0/0/0 38 [R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24 39 Dec 10 2017 15:03:19-08:00 R2 %%01IFNET/4/LINK_STATE(l)[10]:The line protocol IP 40 on the interface GigabitEthernet0/0/0 has entered the UP state. 41 [R2-GigabitEthernet0/0/0]q 42 [R2]int s2/0/0/ 43 ^ 44 Error: Wrong parameter found at '^' position. 45 [R2]int s 46 [R2]int Serial 2/0/0 47 [R2-Serial2/0/0]ip add 11.1.1.2 24 48 [R2-Serial2/0/0] 49 Dec 10 2017 15:03:52-08:00 R2 %%01IFNET/4/LINK_STATE(l)[11]:The line protocol PP 50 P IPCP on the interface Serial2/0/0 has entered the UP state. 51 [R2-Serial2/0/0]q 52 [R2]int 53 [R2]interface g0/0/1 54 [R2-GigabitEthernet0/0/1]ip add 10.1.1.1 24 55 Dec 10 2017 15:04:49-08:00 R2 %%01IFNET/4/LINK_STATE(l)[12]:The line protocol IP 56 on the interface GigabitEthernet0/0/1 has entered the UP state. 57 [R2-GigabitEthernet0/0/1]q 58 [R2]interface g0/0/1 59 [R2-GigabitEthernet0/0/1]ip add 10.1.1.2 24 60 [R2-GigabitEthernet0/0/1]q 61 [R2]dis ip int 62 [R2]dis ip interface br 63 [R2]dis ip interface brief 64 *down: administratively down 65 ^down: standby 66 (l): loopback 67 (s): spoofing 68 The number of interface that is UP in Physical is 4 69 The number of interface that is DOWN in Physical is 2 70 The number of interface that is UP in Protocol is 4 71 The number of interface that is DOWN in Protocol is 2 72 73 Interface IP Address/Mask Physical Protocol 74 GigabitEthernet0/0/0 12.1.1.2/24 up up 75 GigabitEthernet0/0/1 10.1.1.2/24 up up 76 GigabitEthernet1/0/0 unassigned down down 77 NULL0 unassigned up up(s) 78 Serial2/0/0 11.1.1.2/24 up up 79 Serial2/0/1 unassigned down down 80 [R2]
R3
1 The device is running! 2 3 <Huawei> 4 Dec 10 2017 14:59:09-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEt 5 hernet0/0/1 has turned into UP state. 6 <Huawei>sys 7 Enter system view, return user view with Ctrl+Z. 8 [Huawei]sysname R3 9 [R3]int g0/0/1 10 [R3-GigabitEthernet0/0/1]ip add 10.1.1.3 24 11 [R3-GigabitEthernet0/0/1] 12 Dec 10 2017 15:06:03-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 13 on the interface GigabitEthernet0/0/1 has entered the UP state. 14 [R3-GigabitEthernet0/0/1]q 15 [R3]dis ip int bri 16 *down: administratively down 17 ^down: standby 18 (l): loopback 19 (s): spoofing 20 The number of interface that is UP in Physical is 2 21 The number of interface that is DOWN in Physical is 6 22 The number of interface that is UP in Protocol is 2 23 The number of interface that is DOWN in Protocol is 6 24 25 Interface IP Address/Mask Physical Protocol 26 GigabitEthernet0/0/0 unassigned down down 27 GigabitEthernet0/0/1 10.1.1.3/24 up up 28 GigabitEthernet0/0/2 unassigned down down 29 GigabitEthernet2/0/0 unassigned down down 30 GigabitEthernet2/0/1 unassigned down down 31 GigabitEthernet2/0/2 unassigned down down 32 GigabitEthernet2/0/3 unassigned down down 33 NULL0 unassigned up up(s) 34 [R3]
3、R1配置浮动静态路由
[R1]ip rou
[R1]ip route-s
[R1]ip route-static 10.1.1.0 24 g0/0/0 12.1.1.2
[R1]ip rou
[R1]ip route-st
[R1]ip route-static 10.1.1.0 24 se
[R1]ip route-static 10.1.1.0 24 Serial 2/0/0 11.1.1.2
[R1]dis ip rou
[R1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Static 60 0 D 12.1.1.2 GigabitEthernet
0/0/0
Static 60 0 D 11.1.1.2 Serial2/0/0
11.1.1.0/24 Direct 0 0 D 11.1.1.1 Serial2/0/0
11.1.1.1/32 Direct 0 0 D 127.0.0.1 Serial2/0/0
11.1.1.2/32 Direct 0 0 D 11.1.1.2 Serial2/0/0
11.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0
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
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
[R1]ip route-static 10.1.1.0 24 Serial 2/0/0 11.1.1.2 pri
[R1]ip route-static 10.1.1.0 24 Serial 2/0/0 11.1.1.2 pr
[R1]ip route-static 10.1.1.0 24 Serial 2/0/0 11.1.1.2 preference ?
INTEGER<1-255> Preference value range
[R1]ip route-static 10.1.1.0 24 Serial 2/0/0 11.1.1.2 preference 66
Info: Succeeded in modifying route.
[R1]dis ip ro
[R1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Static 60 0 D 12.1.1.2 GigabitEthernet
0/0/0
11.1.1.0/24 Direct 0 0 D 11.1.1.1 Serial2/0/0
11.1.1.1/32 Direct 0 0 D 127.0.0.1 Serial2/0/0
11.1.1.2/32 Direct 0 0 D 11.1.1.2 Serial2/0/0
11.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0
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
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
[R1]int
[R1]interface g
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]shut
[R1-GigabitEthernet0/0/0]shutdown
Dec 10 2017 15:13:51-08:00 R1 %%01IFPDT/4/IF_STATE(l)[5]:Interface GigabitEthern
et0/0/0 has turned into DOWN state.
[R1-GigabitEthernet0/0/0]
[R1-GigabitEthernet0/0/0]
Dec 10 2017 15:13:51-08:00 R1 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the DOWN state.
[R1-GigabitEthernet0/0/0]dis ip ro
[R1-GigabitEthernet0/0/0]dis ip rou
[R1-GigabitEthernet0/0/0]dis ip rout
[R1-GigabitEthernet0/0/0]q
[R1]dis ip rou
[R1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Static 66 0 D 11.1.1.2 Serial2/0/0
11.1.1.0/24 Direct 0 0 D 11.1.1.1 Serial2/0/0
11.1.1.1/32 Direct 0 0 D 127.0.0.1 Serial2/0/0
11.1.1.2/32 Direct 0 0 D 11.1.1.2 Serial2/0/0
11.1.1.255/32 Direct 0 0 D 127.0.0.1 Serial2/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
[R1]