当前位置:   article > 正文

静态路由综合实验报告_静态路由配置实验总结

静态路由配置实验总结

在这里插入图片描述

要求:

1、全网用192.168.1/24进行IP地址分配

2、R5作为DHCP服务器为pc分配IP地址

3、路由上均具备2个环回地址

4、R4与R5之间正常走1000M,备份走100M

5、全网尽量负载均衡

6、减少路由表数量,并避免环路产生

7、全网可达

分析

1、总共需要14个网段,所以需要拿4位主机位;

2、不能直接编写到达静态路由,所以需要做缺省路由

3、尽量减少路由表的路透条目,所以需要进行汇总;

4、R4与R5之间,需要配置浮动静态,即修改优先级。

在这里插入图片描述

配置

1.配置IP地址
R1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 28
Mar 15 2023 14:54:13-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 g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.33 28
Mar 15 2023 14:54:50-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]dis	
[r1-GigabitEthernet0/0/1]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.1/28       up         up        
GigabitEthernet0/0/1              192.168.1.33/28      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s) 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
R2
 <Huawei>sys
[Huawei]sysname r2
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 28

[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.17 28

[r2-GigabitEthernet0/0/1]display ip interface brief 
down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.162.1.17/28      up         up        
GigabitEthernet0/0/1              192.168.1.17/28      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
R3
[Huawei]sysname r3
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.35 28
Mar 15 2023 15:20:27-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 g0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.49 28
Mar 15 2023 15:21:00-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]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.35/28      up         up        
GigabitEthernet0/0/1              192.168.1.49/28      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
R4
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r4
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.18 28
[r4-GigabitEthernet0/0/0]
Mar 15 2023 15:22:57-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 g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.50 28
[r4-GigabitEthernet0/0/1]
Mar 15 2023 15:23:31-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]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.65 28
[r4-GigabitEthernet0/0/2]
Mar 15 2023 15:23:58-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 g4/0/0
[r4-GigabitEthernet4/0/0]ip add 192.168.1.181 28
[r4-GigabitEthernet4/0/0]
Mar 15 2023 15:25:24-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]display ip interface 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 0
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 0

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.18/28      up         up        
GigabitEthernet0/0/1              192.168.1.50/28      up         up        
GigabitEthernet0/0/2              192.168.1.65/28      up         up        
GigabitEthernet4/0/0              192.168.1.181/28     up         up        
NULL0                             unassigned           up         up(s) 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
R5
Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.66 28
Mar 15 2023 15:28:23-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 g0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.1.82 28
Mar 15 2023 15:28:44-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]display ip interface brief
*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 0
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.66/28      up         up        
GigabitEthernet0/0/1              192.168.1.82/28      up         up        
GigabitEthernet0/0/2              unassigned           up         down      
NULL0                             unassigned           up         up(s)     

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
配置回环地址
R1
r1]int Loop	
[r1]int LoopBack 0
[r1-LoopBack0]ip add 192.168.1.97 28
[r1-LoopBack0]q
[r1]int loop	
[r1]int LoopBack 1
[r1-LoopBack1]ip add 192.168.1.113 28
[r1-LoopBack1]q
[r1]disp	
[r1]display curr	
[r1]display current-configuration 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

R2

[r2]interface LoopBack 4

[r2-LoopBack4]ip address 192.168.1.161 28

[r2-LoopBack4]q  
[r2]interface LoopBack 5

[r2-LoopBack5]ip address 192.168.1.177 28

[r2-LoopBack5]q
[r2]display current-configuration 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

R3

[r3]interface LoopBack 2 
[r3-LoopBack2]ip address 192.168.1.129 28
[r3-LoopBack2]q

[r3]interface LoopBack 3

[r3-LoopBack3]ip address 192.168.1.145 28

[r3-LoopBack3]display current-configuration 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
R4
[r4]interface LoopBack 6        
[r4-LoopBack6]ip address 192.168.1.193 28

[r4-LoopBack6]q

[r4]interface LoopBack 7
[r4-LoopBack7]ip address 192.168.1.209 28

[r4-LoopBack7]display current-configuration

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
R5
[r5]interface LoopBack 8

[r5-LoopBack8]ip address 5.5.5.1 24

[r5-LoopBack8]display current-configuration 
  • 1
  • 2
  • 3
  • 4
  • 5
配置静态路由
R1
[r1]ip route-static 192.168.1.16 28 192.168.1.2 
[r1]ip route-static 192.168.1.48 28 192.168.1.35

//负载均衡
[r1]ip route-static 192.168.1.64 27 192.168.1.2        
[r1]ip route-static 192.168.1.64 27 192.168.1.35

//缺省路由

[r1]ip route-static 0.0.0.0 0 192.168.1.2

//回环的静态路由

[r1]ip route-static 192.168.1.160 27 192.168.1.2         //L4和L5

[r1]ip route-static 192.168.1.128 27 192.168.1.35         //L2和L3

[r1]ip route-static 192.168.1.192 27 192.168.1.2          //L6和L7

[r1]display ip routing-table //查看路由表
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
R2
[r2]ip route-static 192.168.1.32 27 192.168.1.1 

[r2]ip route-static 192.168.1.64 27 192.168.1.18

//缺省路由

[r2]ip route-static 0.0.0.0 0 192.168.1.18

//回环的静态路由

[r2]ip route-static 192.168.1.96 27 192.168.1.1         // L0和L1

[r2]ip route-static 192.168.1.128 27 192.168.1.1        //L2和L3

[r2]ip route-static 192.168.1.192 27 192.168.1.18        //L6和L7

[r2]display ip routing-table 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
R3
[r3]ip route-static 192.168.1.0 27 192.168.1.50

[r3]ip route-static 192.168.1.64 27 192.168.1.50

//缺省路由

[r3]ip route-static 0.0.0.0 0 192.168.1.50

//回环的静态路由

[r3]ip route-static 192.168.1.96 27 192.168.1.33        // L0和L1
[r3]ip route-static 192.168.1.192 27 192.168.1.50         //L4和L5
[r3]ip route-static 192.168.1.160 27 192.168.1.33         //L2和L3
[r3]display ip routing-table
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
R4
[r4]ip route-static 192.168.1.0 28 192.168.1.17

[r4]ip route-static 192.168.1.32 28 192.168.1.49

//回环的静态路由

[r4]ip route-static 192.168.1.96 27 192.168.1.17       // L0和L1

[r4]ip route-static 192.168.1.160 27 192.168.1.17        //L4和L5

[r4]ip route-static 192.168.1.128 27 192.168.1.49        //L2和L3

//缺省路由

[r4]ip route-static 0.0.0.0 0 192.168.1.66

[r4]ip route-static 0.0.0.0 0 192.168.1.82        preference 61         //设置优先级

[r4]display ip routing-table 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
R5
[r5]ip route-static 192.168.1.32 27 192.168.1.65  [r5]ip route-static 192.168.1.32 27 192.168.1.81 preference 61       

//192.168.1.65为1000M的, 192.168.1.81 为100M的,以下同理
[r5]ip route-static 192.168.1.0 27 192.168.1.65    [r5]ip route-static 192.168.1.0 27 192.168.1.81 preference 61           
//回环的静态路由
[r5]ip route-static 192.168.1.96 27 192.168.1.65    //L1和L2
[r5]ip route-static 192.168.1.96 27 192.168.1.81  preference 61      
[r5]ip route-static 192.168.1.160 27 192.168.1.65        //L4和L5
[r5]ip route-static 192.168.1.160 27 192.168.1.81 preference 61       
[r5]ip route-static 192.168.1.128 27 192.168.1.65        //L2和L3
[r5]ip route-static 192.168.1.128 27 192.168.1.81 preference 61
[r5]ip route-static 192.168.1.192 27 192.168.1.65        //L6和L7
[r5]ip route-static 192.168.1.192 27 192.168.1.81 preference 61
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
避免回环
[r1]ip route-static 192.168.1.96 27 NULL 0
[r2]ip route-static 192.168.1.160 27 NULL 0
[r3]ip route-static 192.168.1.128 27 NULL 0
[r4]ip route-static 192.168.1.192 27 NULL 0
  • 1
  • 2
  • 3
  • 4
全局DHCP配置
R5
[r5]interface g0/0/2
[r5-GigabitEthernet0/0/2]ip address 192.168.2.1 24
Mar 15 2023 16:46:52-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r5-GigabitEthernet0/0/2]q
[r5]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r5]ip pool shazi
Info: It's successful to create an IP address pool.
[r5-ip-pool-shazi]dns	
[r5-ip-pool-shazi]dns-list 8.8.8.8 114.114.114.114
[r5-ip-pool-shazi]q
[r5]interface g0/0/2
[r5-GigabitEthernet0/0/2]dhcp select global
[r5-GigabitEthernet0/0/2]display ip pool  
  -----------------------------------------------------------------------
  Pool-name      : shazi
  Pool-No        : 0
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.2.1     
  Mask           : -
  VPN instance   : --


  IP address Statistic
    Total       :0     
    Used        :0          Idle        :0     
    Expired     :0          Conflict    :0          Disable   :0   
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
验证
R1pingR2、R3、R4、R5任一一个接口以及R5的回环接口

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

R1ping R5的回环地址
在这里插入图片描述

R1pingL3、L4、L5、L6等

在这里插入图片描述

R2ping R5的回环地址

在这里插入图片描述

R3ping R5的回环地址

在这里插入图片描述

R4ping R5的回环地址

在这里插入图片描述

R5ping

在这里插入图片描述

验证正常1000M链路通信,故障时自动改为100M

在R5ping192.168.1.17的同时,在R4上断掉g0/0/2口

R4:

[r4]interface g0/0/2

[r4-GigabitEthernet0/0/2]shutdown

R5:

在这里插入图片描述

显示R5的接口G0/0/0 down

在R2的G0/0/1上抓包看

在这里插入图片描述

R5ping

img

验证正常1000M链路通信,故障时自动改为100M

在R5ping192.168.1.17的同时,在R4上断掉g0/0/2口

R4:

[r4]interface g0/0/2

[r4-GigabitEthernet0/0/2]shutdown

R5:

img

显示R5的接口G0/0/0 down

在R2的G0/0/1上抓包看

img

一开始是从192.168.1.66传输,也就是1000M的路线,后面1000Mshutdown,从192.168.1.82开始传输,也就是100M的

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/578058
推荐阅读
相关标签
  

闽ICP备14008679号