HCNA配置浮动静态路由

时间:2023-03-10 05:43:29
HCNA配置浮动静态路由

1、拓扑图

HCNA配置浮动静态路由

2、配置IP

R1

 Please press enter to start cmd line!
############
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface GigabitEt
hernet0// has turned into UP state.
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface Serial2/
/ has turned into UP state.
<Huawei>
Dec ::-: Huawei %%01IFNET//LINK_STATE(l)[]:The line protocol
PPP on the interface Serial2// has entered the UP state.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]int g0//
[R1-GigabitEthernet0//]ip add 12.1.1.1
Dec ::-: R1 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R1-GigabitEthernet0//]q
[R1]int s
[R1]int Serial
[R1]int Serial
^
Error: Wrong parameter found at '^' position.
[R1]int Serial
[R1]int Serial ?
<-> Serial interface slot number
[R1]int Serial
^
Error: Wrong parameter found at '^' position.
[R1]int Serial //
[R1-Serial2//]ip add 11.1.1.1
[R1-Serial2//]q
[R1]
Dec ::-: R1 %%01IFNET//LINK_STATE(l)[]:The line protocol PPP
IPCP on the interface Serial2// has entered the UP state.
[R1]dis ip int
[R1]dis ip interface bri
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is
The number of interface that is DOWN in Physical is
The number of interface that is UP in Protocol is
The number of interface that is DOWN in Protocol is Interface IP Address/Mask Physical Protocol
GigabitEthernet0// 12.1.1.1/ up up
GigabitEthernet0// unassigned down down
NULL0 unassigned up up(s)
Serial2// 11.1.1.1/ up up
Serial2// unassigned down down
[R1]

R2

 Please press enter to start cmd line!
####
<Huawei>
Dec ::-: Huawei %%01IFNET//BOARD_ENABLE(l)[]:Board has bee
n available.
<Huawei>
Dec ::-: Huawei %%01IFNET//IF_ENABLE(l)[]:Interface GigabitE
thernet1// has been available.
<Huawei>
Dec ::-: Huawei %%01DEV//ENTUP(l)[]:2SA board[] register su
ccess.
<Huawei>
Dec ::-: Huawei %%01IFNET//BOARD_ENABLE(l)[]:Board has bee
n available.
<Huawei>
Dec ::-: Huawei %%01IFNET//IF_ENABLE(l)[]:Interface Serial2/
/ has been available.
<Huawei>
Dec ::-: Huawei %%01IFNET//IF_ENABLE(l)[]:Interface Serial2/
/ has been available.
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface GigabitEt
hernet0// has turned into UP state.
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface GigabitEt
hernet0// has turned into UP state.
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface Serial2/
/ has turned into UP state.
<Huawei>
Dec ::-: Huawei %%01IFNET//LINK_STATE(l)[]:The line protocol
PPP on the interface Serial2// has entered the UP state.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int
[R2]interface g0//
[R2-GigabitEthernet0//]ip add 12.1.1.2
Dec ::-: R2 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R2-GigabitEthernet0//]q
[R2]int s2///
^
Error: Wrong parameter found at '^' position.
[R2]int s
[R2]int Serial //
[R2-Serial2//]ip add 11.1.1.2
[R2-Serial2//]
Dec ::-: R2 %%01IFNET//LINK_STATE(l)[]:The line protocol PP
P IPCP on the interface Serial2// has entered the UP state.
[R2-Serial2//]q
[R2]int
[R2]interface g0//
[R2-GigabitEthernet0//]ip add 10.1.1.1
Dec ::-: R2 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R2-GigabitEthernet0//]q
[R2]interface g0//
[R2-GigabitEthernet0//]ip add 10.1.1.2
[R2-GigabitEthernet0//]q
[R2]dis ip int
[R2]dis ip interface br
[R2]dis ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is
The number of interface that is DOWN in Physical is
The number of interface that is UP in Protocol is
The number of interface that is DOWN in Protocol is Interface IP Address/Mask Physical Protocol
GigabitEthernet0// 12.1.1.2/ up up
GigabitEthernet0// 10.1.1.2/ up up
GigabitEthernet1// unassigned down down
NULL0 unassigned up up(s)
Serial2// 11.1.1.2/ up up
Serial2// unassigned down down
[R2]

R3

 The device is running!

 <Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface GigabitEt
hernet0// has turned into UP state.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]int g0//
[R3-GigabitEthernet0//]ip add 10.1.1.3
[R3-GigabitEthernet0//]
Dec ::-: R3 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R3-GigabitEthernet0//]q
[R3]dis ip int bri
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is
The number of interface that is DOWN in Physical is
The number of interface that is UP in Protocol is
The number of interface that is DOWN in Protocol is Interface IP Address/Mask Physical Protocol
GigabitEthernet0// unassigned down down
GigabitEthernet0// 10.1.1.3/ up up
GigabitEthernet0// unassigned down down
GigabitEthernet2// unassigned down down
GigabitEthernet2// unassigned down down
GigabitEthernet2// unassigned down down
GigabitEthernet2// unassigned down down
NULL0 unassigned up up(s)
[R3]

3、R1配置浮动静态路由

[R1]ip rou
[R1]ip route-s
[R1]ip route-static 10.1.1.0 g0// 12.1.1.2
[R1]ip rou
[R1]ip route-st
[R1]ip route-static 10.1.1.0 se
[R1]ip route-static 10.1.1.0 Serial // 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 : Routes : Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.0/ Static D 12.1.1.2 GigabitEthernet
//
Static D 11.1.1.2 Serial2//
11.1.1.0/ Direct D 11.1.1.1 Serial2//
11.1.1.1/ Direct D 127.0.0.1 Serial2//
11.1.1.2/ Direct D 11.1.1.2 Serial2//
11.1.1.255/ Direct D 127.0.0.1 Serial2//
12.1.1.0/ Direct D 12.1.1.1 GigabitEthernet
//
12.1.1.1/ Direct D 127.0.0.1 GigabitEthernet
//
12.1.1.255/ Direct D 127.0.0.1 GigabitEthernet
//
127.0.0.0/ Direct D 127.0.0.1 InLoopBack0
127.0.0.1/ Direct D 127.0.0.1 InLoopBack0
127.255.255.255/ Direct D 127.0.0.1 InLoopBack0
255.255.255.255/ Direct D 127.0.0.1 InLoopBack0 [R1]ip route-static 10.1.1.0 Serial // 11.1.1.2 pri
[R1]ip route-static 10.1.1.0 Serial // 11.1.1.2 pr
[R1]ip route-static 10.1.1.0 Serial // 11.1.1.2 preference ?
INTEGER<-> Preference value range
[R1]ip route-static 10.1.1.0 Serial // 11.1.1.2 preference
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 : Routes : Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.0/ Static D 12.1.1.2 GigabitEthernet
//
11.1.1.0/ Direct D 11.1.1.1 Serial2//
11.1.1.1/ Direct D 127.0.0.1 Serial2//
11.1.1.2/ Direct D 11.1.1.2 Serial2//
11.1.1.255/ Direct D 127.0.0.1 Serial2//
12.1.1.0/ Direct D 12.1.1.1 GigabitEthernet
//
12.1.1.1/ Direct D 127.0.0.1 GigabitEthernet
//
12.1.1.255/ Direct D 127.0.0.1 GigabitEthernet
//
127.0.0.0/ Direct D 127.0.0.1 InLoopBack0
127.0.0.1/ Direct D 127.0.0.1 InLoopBack0
127.255.255.255/ Direct D 127.0.0.1 InLoopBack0
255.255.255.255/ Direct D 127.0.0.1 InLoopBack0 [R1]int
[R1]interface g
[R1]interface GigabitEthernet //
[R1-GigabitEthernet0//]shut
[R1-GigabitEthernet0//]shutdown
Dec ::-: R1 %%01IFPDT//IF_STATE(l)[]:Interface GigabitEthern
et0// has turned into DOWN state.
[R1-GigabitEthernet0//]
[R1-GigabitEthernet0//]
Dec ::-: R1 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the DOWN state.
[R1-GigabitEthernet0//]dis ip ro
[R1-GigabitEthernet0//]dis ip rou
[R1-GigabitEthernet0//]dis ip rout
[R1-GigabitEthernet0//]q
[R1]dis ip rou
[R1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : Routes : Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.0/ Static D 11.1.1.2 Serial2//
11.1.1.0/ Direct D 11.1.1.1 Serial2//
11.1.1.1/ Direct D 127.0.0.1 Serial2//
11.1.1.2/ Direct D 11.1.1.2 Serial2//
11.1.1.255/ Direct D 127.0.0.1 Serial2//
127.0.0.0/ Direct D 127.0.0.1 InLoopBack0
127.0.0.1/ Direct D 127.0.0.1 InLoopBack0
127.255.255.255/ Direct D 127.0.0.1 InLoopBack0
255.255.255.255/ Direct D 127.0.0.1 InLoopBack0 [R1]