HCIA中的经典静态路由综合实验

实验拓扑图:


实验要求: 

1 除R5的环回地址固定以外,整个其他所有网段基于192.168.1.0/24进行合理的IP地址划分;

2 R1-R4每个路由器存在两个环回接口,用于模拟连接pc网段﹔地址也在192.168.1.0/24这个网络范围内;

3 R1-R4上不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问;

4全网可达,尽量减少每台路由器,路由表条目数量,避免环路出现;

5 R4与R5间,正常1000M链路通信,故障时自动改为100M。


 根据实验要求分配IP

实验要求除R5的环回地址固定以外,整个其他所有网段基于192.168.1.0/24,在192.168.1.0/24网段进行合理的划分,首先看实验的拓扑环境情况。

网段划分的问题,要从以下两个方面进行考虑:

1.便于汇总;

2.节省IP地址。

网段划分:

192.168.1.00000000/24

       192.168.1.000 00000 /27 ----- 骨干链路

               192.168.1.000 000 00 /30 ---- 192.168.1.0/3

               192.168.1.000 001 00 /30 --- 192.168.1.4/30

               192.168.1.000 010 00 /30 ---- 192.168.1.8/30

               192.168.1.000 011 00 /30 ---- 192.168.1.12/30

               192.168.1.000 100 00 /30 ---- 192.168.1.16/30

               192.168.1.000 101 00 /30 ---- 192.168.1.20/3 

               192.168.1.000 110 00 /30

               192.168.1.000 111 00 /30    (剩余的2条骨干链路用于备用)

分配环回地址:

192.168.1.00000000/24

       192.168.1.000 00000 /27 ----- 骨干链路

       192.168.1.001 00000 /27 ---- R1 192.168.1.32/27

              192.168.1.001 0 0000 /28 --- 192.168.1.32/28

              192.168.1.001 1 0000 /28 --- 192.168.1.48/28

       192.168.1.010 00000 /27 ---- R2 192.168.1.64/27 

              192.168.1.010 0 0000 /28 ---- 192.168.1.64/28

              192.168.1.010 1 0000 /28 ---- 192.168.1.80/28

       192.168.1.011 00000 /27 ---- R3 192.168.1.96/27

              192.168.1.011 0 0000 /28 ---- 192.168.1.96/28 

              192.168.1.011 1 0000 /28 ---- 192.168.1.112/28

       192.168.1.100 00000 /27 ---- R4 192.168.1.128/27

              192.168.1.100 0 0000 /28 ---- 192.168.1.128/28

              192.168.1.100 1 0000 /28 ---- 192.168.1.144/28

192.168.1.101 00000 /27

192.168.1.110 00000 /27

192.168.1.111 00000 /27(剩余3条IP地址,为预留备用链路,用于拓展链路和增加网段)


对R1

The device is running!

<Huawei>sys    
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]int g 0/0/0 
[r1-GigabitEthernet0/0/0]ip add    
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
Jul 13 2021 21:31:12-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add    
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
Jul 13 2021 21:31:35-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. [r1-GigabitEthernet0/0/1]q
[r1]int l 0
[r1-LoopBack0]ip add    
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]int l 1
[r1-LoopBack1]ip add    
[r1-LoopBack1]ip address 192.168.1.49 28
[r1-LoopBack1]q
[r1]dis    
[r1]display ip in b    
[r1]display ip in brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.1/30       up         up        
GigabitEthernet0/0/1              192.168.1.5/30       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.1.33/28      up         up(s)     
LoopBack1                         192.168.1.49/28      up         up(s)     
NULL0                             unassigned           up         up(s)     
[r1]


对R2

The device is running!

<Huawei>sys    
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add    
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
Jul 13 2021 21:37:41-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add    
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30 
Jul 13 2021 21:38:14-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 

[r2-GigabitEthernet0/0/1]q
[r2]int l 0
[r2-LoopBack0]ip add    
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]int l 1
[r2-LoopBack1]ip add    
[r2-LoopBack1]ip address  192.168.1.81 28
[r2-LoopBack1]q
[r2]dis ip in b    
[r2]dis ip in brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.2/30       up         up        
GigabitEthernet0/0/1              192.168.1.9/30       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.1.65/28      up         up(s)     
LoopBack1                         192.168.1.81/28      up         up(s)     
NULL0                             unassigned           up         up(s)


对R3

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r3
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add    
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
Jul 13 2021 21:43:57-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add    
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
Jul 13 2021 21:44:16-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r3-GigabitEthernet0/0/1]q
[r3]int l0
[r3-LoopBack0]ip add    
[r3-LoopBack0]ip address 192.168.1.97 28 
[r3-LoopBack0]int l1 
[r3-LoopBack1]ip add    
[r3-LoopBack1]ip address 192.168.1.113 28
[r3-LoopBack1]q
[r3]dis ip int b 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.6/30       up         up        
GigabitEthernet0/0/1              192.168.1.13/30      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.1.97/28      up         up(s)     
LoopBack1                         192.168.1.113/28     up         up(s)     
NULL0                             unassigned           up         up(s)     
 


对R4    

The device is running!

<Huawei>sys    
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r4
[r4]int g 0/0/0 
[r4-GigabitEthernet0/0/0]ip add    
[r4-GigabitEthernet0/0/0]ip address 192.168.1.14 30
Jul 13 2021 21:47:21-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 

[r4-GigabitEthernet0/0/0]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add    
[r4-GigabitEthernet0/0/1]ip address 192.168.1.10 30
Jul 13 2021 21:47:52-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r4-GigabitEthernet0/0/1]q
[r4]int l 0
[r4-LoopBack0]ip add    
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack0]int l1
[r4-LoopBack1]ip add    
[r4-LoopBack1]ip address 192.168.1.145 28
[r4-LoopBack1]int g 0/0/2
[r4-GigabitEthernet0/0/2]ip add    
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
Jul 13 2021 21:48:41-08:00 r4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 

[r4-GigabitEthernet0/0/2]int g 4/0/0
[r4-GigabitEthernet4/0/0]ip add    
[r4-GigabitEthernet4/0/0]ip address  192.168.1.21 30
[r4-GigabitEthernet4/0/0]
Jul 13 2021 21:49:33-08:00 r4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet4/0/0 has entered the UP state. 
[r4-GigabitEthernet4/0/0]q
[r4]dis ip int b     
[r4]dis ip int brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 7
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 7
The number of interface that is DOWN in Protocol is 0

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.14/30      up         up        
GigabitEthernet0/0/1              192.168.1.10/30      up         up        
GigabitEthernet0/0/2              192.168.1.17/30      up         up        
GigabitEthernet4/0/0              192.168.1.21/30      up         up        
LoopBack0                         192.168.1.129/28     up         up(s)     
LoopBack1                         192.168.1.145/28     up         up(s)     
NULL0                             unassigned           up         up(s)     
 


对R5

The device is running!

<Huawei>sys    
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r5
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]
[r5-GigabitEthernet0/0/0]ip add    
[r5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
Jul 13 2021 21:53:52-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r5-GigabitEthernet0/0/0] int g 0/0/1 
[r5-GigabitEthernet0/0/1]ip add    
[r5-GigabitEthernet0/0/1]ip address 192.168.1.22 30 
[r5-GigabitEthernet0/0/1]
Jul 13 2021 21:54:09-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r5-GigabitEthernet0/0/1]int l0
[r5-LoopBack0]ip address 5.5.5.5 24
[r5-LoopBack0]q
[r5]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.18/30      up         up        
GigabitEthernet0/0/1              192.168.1.22/30      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         5.5.5.5/24           up         up(s)     
NULL0                             unassigned           up         up(s)     


 

配置环回

对R1

<r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.8 30 192.168.1.2  
[r1]ip route-static 192.168.1.128 27 192.168.1.2  
[r1]ip route-static 192.168.1.128 27 192.168.1.6   
[r1]ip route-static 192.168.1.16 30 192.168.1.2    
[r1]ip route-static 192.168.1.16 30 192.168.1.6  
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r1]ip route-static 192.168.1.96 27 192.168.1.6
 


对R2

<r2>sys    
<r2>system-view 
Enter system view, return user view with Ctrl+Z.
[r2]ip route-static 192.168.1.128 27 192.168.1.10  
[r2]ip route-static 192.168.1.16 30 192.168.1.10
[r2]ip route-static 192.168.1.12 30 192.168.1.10    
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]ip route-static 192.168.1.96 27 192.168.1.1  
[r2]ip route-static 192.168.1.4 30 192.168.1.1  
[r2]ip route-static 192.168.1.32 27 192.168.1.1
 


对R3

<r3>sys    
<r3>system-view 
Enter system view, return user view with Ctrl+Z.
[r3]ip route-static 192.168.1.32 27 192.168.1.5 
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 192.168.1.8 30 192.168.1.14
[r3]ip route-static 192.168.1.128 27 192.168.1.14  
[r3]ip route-static 192.168.1.16 30 192.168.1.14
 


对R4

<r4>sys    
<r4>system-view 
Enter system view, return user view with Ctrl+Z.

[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-static 192.168.1.4 30 192.168.1.13   
[r4]ip route-static 192.168.1.32 27 192.168.1.13  
[r4]ip route-static 192.168.1.32 27 192.168.1.9 
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.64 27 192.168.1.9
 


对R5

<r5>
<r5>sys    
<r5>system-view 
Enter system view, return user view with Ctrl+Z.  
[r5]ip route-static 192.168.1.32 27 192.168.1.17 
[r5]ip route-static 192.168.1.0 30 192.168.1.17   
[r5]ip route-static 192.168.1.64 27 192.168.1.17  
[r5]ip route-static 192.168.1.8 30 192.168.1.17 
[r5]ip route-static 192.168.1.12 30 192.168.1.17  
[r5]ip route-static 192.168.1.4 30 192.168.1.1 
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.1
 


配置缺省

对R1 

<r1>sys    
<r1>system-view 
Enter system view, return user view with Ctrl+Z.
[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.6
 


 对R2

<r2>sys    
<r2>system-view 
Enter system view, return user view with Ctrl+Z.
[r2]ip route-static 0.0.0.0 0 192.168.1.10


对R3 

<r3>sys    
<r3>system-view 
Enter system view, return user view with Ctrl+Z.
[r3]ip route-static 0.0.0.0 0 192.168.1.14
[r3]


对R4

<r4>sys    
<r4>system-view 
Enter system view, return user view with Ctrl+Z.
[r4]ip route-static 0.0.0.0 0 192.168.1.18
[r4]


测试 

(在此就不全部展示测试环节,选取部分)

对R1

<r1>ping 5.5.5.5
  PING 5.5.5.5: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Reply from 5.5.5.5: bytes=56 Sequence=3 ttl=253 time=60 ms
    Reply from 5.5.5.5: bytes=56 Sequence=4 ttl=253 time=30 ms
    Reply from 5.5.5.5: bytes=56 Sequence=5 ttl=253 time=40 ms

  --- 5.5.5.5 ping statistics ---
    5 packet(s) transmitted
    3 packet(s) received
    40.00% packet loss
    round-trip min/avg/max = 30/43/60 ms

<r1>ping 192.168.1.17
  PING 192.168.1.17: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 192.168.1.17: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 192.168.1.17: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 192.168.1.17: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 192.168.1.17: bytes=56 Sequence=5 ttl=254 time=20 ms

  --- 192.168.1.17 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 20/25/30 ms

<r1>


给R1-R4配置空接口 

对R1


<r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]ip rou 192.168.1.32 27 nu0
 

对R2

<r2>
<r2>sys    
<r2>system-view 
Enter system view, return user view with Ctrl+Z.
[r2]ip rou 192.168.1.64 27 n 0

对R3


<r3>sys
Enter system view, return user view with Ctrl+Z.
[r3]ip rou 192.168.1.96 27 n 0
[r3]

对R4

 <r4>sys    
<r4>system-view 
Enter system view, return user view with Ctrl+Z.
[r4]ip rou 192.168.1.128 27 n 0
[r4]


对实验要求五进行配置

<r1>sys    
<r1>system-view 
Enter system view, return user view with Ctrl+Z.
[r1]ip rou 192.168.1.20 30 192.168.1.2
[r1]ip rou 192.168.1.20 30 192.168.1.6
[r1]

<r2>sys    
<r2>system-view 
Enter system view, return user view with Ctrl+Z.
[r2]ip rou 192.168.1.20 30 192.168.1.10
[r2] 

 <r3>sys    
<r3>system-view 
Enter system view, return user view with Ctrl+Z.
[r3]ip  rou 192.168.1.20 30 192.168.1.14
[r3]

对R4进行考虑当R1-R3的数据发送至R4时,选择走哪一条路径发送给R5。

依照实验要求,正常情下走上面一条,异常情况下走下面一条。

[r4]ip rou 0.0.0.0 0 192.168.1.22 pre 61  
[r4]display ip routing-table protocol static 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
         Destinations : 7        Routes : 9        Configured Routes : 9

Static routing table status : <Active>
         Destinations : 7        Routes : 8

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   192.168.1.18    GigabitEthernet
0/0/2
    192.168.1.0/30  Static  60   0          RD   192.168.1.9     GigabitEthernet
0/0/1
    192.168.1.4/30  Static  60   0          RD   192.168.1.13    GigabitEthernet
0/0/0
   192.168.1.32/27  Static  60   0          RD   192.168.1.13    GigabitEthernet
0/0/0
                    Static  60   0          RD   192.168.1.9     GigabitEthernet
0/0/1
   192.168.1.64/27  Static  60   0          RD   192.168.1.9     GigabitEthernet
0/0/1
   192.168.1.96/27  Static  60   0          RD   192.168.1.13    GigabitEthernet
0/0/0
  192.168.1.128/27  Static  60   0           D   0.0.0.0         NULL0

Static routing table status : <Inactive>
         Destinations : 1        Routes : 1

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  61   0          R    192.168.1.22    GigabitEthernet
4/0/0
 

对R5写回包路由 

<r5>
<r5>system-view 
Enter system view, return user view with Ctrl+Z. 
[r5]display this 
[V200R003C00]
#
 sysname r5
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
 drop illegal-mac alarm
#
 set cpu-usage threshold 80 restore 75
#
ip route-static 192.168.1.0 255.255.255.252 192.168.1.17
ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
ip route-static 192.168.1.12 255.255.255.252 192.168.1.17
ip route-static 192.168.1.32 255.255.255.224 192.168.1.17
ip route-static 192.168.1.64 255.255.255.224 192.168.1.17
ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
ip route-static 192.168.1.128 255.255.255.224 192.168.1.17
#
return
[r5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 pre 61
[r5]
[r5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 pre 61
[r5]
[r5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 pre 61
[r5]
[r5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 pre 61
[r5]
[r5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 pre 61
[r5]
[r5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 pre 61
[r5]
[r5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 pre 61
[r5]
[r5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 pre 61
[r5]
[r5]display  ip routing-table  protocol  static 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
         Destinations : 8        Routes : 16       Configured Routes : 16

Static routing table status : <Active>
         Destinations : 8        Routes : 8

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

    192.168.1.0/30  Static  60   0          RD   192.168.1.17    GigabitEthernet
0/0/0
    192.168.1.4/30  Static  60   0          RD   192.168.1.1     GigabitEthernet
0/0/0
    192.168.1.8/30  Static  60   0          RD   192.168.1.17    GigabitEthernet
0/0/0
   192.168.1.12/30  Static  60   0          RD   192.168.1.17    GigabitEthernet
0/0/0
   192.168.1.32/27  Static  60   0          RD   192.168.1.17    GigabitEthernet
0/0/0
   192.168.1.64/27  Static  60   0          RD   192.168.1.17    GigabitEthernet
0/0/0
   192.168.1.96/27  Static  60   0          RD   192.168.1.1     GigabitEthernet
0/0/0
  192.168.1.128/27  Static  60   0          RD   192.168.1.17    GigabitEthernet
0/0/0

Static routing table status : <Inactive>
         Destinations : 8        Routes : 8

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

    192.168.1.0/30  Static  61   0          R    192.168.1.21    GigabitEthernet
0/0/1
    192.168.1.4/30  Static  61   0          R    192.168.1.21    GigabitEthernet
0/0/1
    192.168.1.8/30  Static  61   0          R    192.168.1.21    GigabitEthernet
0/0/1
   192.168.1.12/30  Static  61   0          R    192.168.1.21    GigabitEthernet
0/0/1
   192.168.1.32/27  Static  61   0          R    192.168.1.21    GigabitEthernet
0/0/1
   192.168.1.64/27  Static  61   0          R    192.168.1.21    GigabitEthernet
0/0/1
   192.168.1.96/27  Static  61   0          R    192.168.1.21    GigabitEthernet
0/0/1
  192.168.1.128/27  Static  61   0          R    192.168.1.21    GigabitEthernet
0/0/1
 

 接下来,关闭R4的0/0/2端口

<r4>sys    
<r4>system-view 
Enter system view, return user view with Ctrl+Z.
[r4]int g 0/0/2 
[r4-GigabitEthernet0/0/2]shutdown 
Jul 14 2021 00:03:41-08:00 r4 %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEthern
et0/0/2 has turned into DOWN state.
[r4-GigabitEthernet0/0/2]
[r4-GigabitEthernet0/0/2]
Jul 14 2021 00:03:41-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the DOWN state. 
[r4-GigabitEthernet0/0/2]
Jul 14 2021 00:03:41-08:00 r4 %%01RM/4/IPV4_DEFT_RT_CHG(l)[2]:IPV4 default Route
 is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=Unknown, 
Nexthop=192.168.1.18, Neighbour=0.0.0.0, Preference=1006632960, Label=NULL, Metr
ic=0) 
[r4-GigabitEthernet0/0/2]

 关闭R4的0/0/2端口的情况下,在进行测试,

  
[r4]display ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 26       Routes : 27       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  61   0          RD   192.168.1.22    GigabitEthernet
4/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
    192.168.1.0/30  Static  60   0          RD   192.168.1.9     GigabitEthernet
0/0/1
    192.168.1.4/30  Static  60   0          RD   192.168.1.13    GigabitEthernet
0/0/0
    192.168.1.8/30  Direct  0    0           D   192.168.1.10    GigabitEthernet
0/0/1
   192.168.1.10/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
   192.168.1.11/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
   192.168.1.12/30  Direct  0    0           D   192.168.1.14    GigabitEthernet
0/0/0
   192.168.1.14/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
   192.168.1.15/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
   192.168.1.20/30  Direct  0    0           D   192.168.1.21    GigabitEthernet
4/0/0
   192.168.1.21/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
4/0/0
   192.168.1.23/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
4/0/0
   192.168.1.32/27  Static  60   0          RD   192.168.1.13    GigabitEthernet
0/0/0
                    Static  60   0          RD   192.168.1.9     GigabitEthernet
0/0/1
   192.168.1.64/27  Static  60   0          RD   192.168.1.9     GigabitEthernet
0/0/1
   192.168.1.96/27  Static  60   0          RD   192.168.1.13    GigabitEthernet
0/0/0
  192.168.1.128/27  Static  60   0           D   0.0.0.0         NULL0
  192.168.1.128/28  Direct  0    0           D   192.168.1.129   LoopBack0
  192.168.1.129/32  Direct  0    0           D   127.0.0.1       LoopBack0
  192.168.1.143/32  Direct  0    0           D   127.0.0.1       LoopBack0
  192.168.1.144/28  Direct  0    0           D   192.168.1.145   LoopBack1
  ---- More ----

 在 关闭R4的0/0/2端口的情况下,在R1对5.5.5.5网段进行测试,

<r1>ping 5.5.5.5
  PING 5.5.5.5: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 5.5.5.5: bytes=56 Sequence=2 ttl=253 time=50 ms
    Reply from 5.5.5.5: bytes=56 Sequence=3 ttl=253 time=50 ms
    Reply from 5.5.5.5: bytes=56 Sequence=4 ttl=253 time=30 ms
    Reply from 5.5.5.5: bytes=56 Sequence=5 ttl=253 time=30 ms

  --- 5.5.5.5 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 30/40/50 ms

<r1>

如图,在关闭R4的0/0/2端口的情况下,在R1对5.5.5.5网段进行测试,R1可以Ping通5.5.5.5网段。


上述就是本次分享的 HCIA中的经典静态路由综合实验,希望能帮助到大家对HCIA中经典静态路由的进行。同时欢迎大家在评论区留言。

(若有错误,希望大家在评论区留言指正。)

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值