静态综合实验

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地址,然后配置各个路由器的IP路由表,使得全网可达,使用缺省路由完成对5.5.5.0网段的正常访问,最后配置浮动静态路由

192.168.1.0 24
子网划分
需求13个广播域


5个网段—子网划分
192.168.1.0 24

192.168.1.000   00000   27
192.168.1.0  27—30
192.168.1.000 000 00  30
192.168.1.0 30
192.168.1.4 30
192.168.1.8 30
192.168.1.12 30
192.168.1.16 30
.。。
192.168.1.28 30

骨干链路使用
192.168.1.32 27
192.168.1.001 0 0000   28
192.168.1.32 28
192.168.1.48 28
R1上环回
192.168.1.64 27

R2环回
192.168.1.96 27

192.168.1.128 27


192.168.1.160 27
192.168.1.192 27
192.168.1.224 27

依照如上分析对路由器进行配置

如下图r1,依次对r2、r3、r4、r5进行配置

r1

 

如图

r2

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int    

[r2]interface l    
[r2]interface LoopBack 0
[r2-LoopBack0]
[r2-LoopBack0]ip ad    

[r2-LoopBack0]ip address 192.168.1.97 28
[r2-LoopBack0]int l1
[r2-LoopBack1]ip ad    
[r2-LoopBack1]ip address 192.168.1.113 29
[r2-LoopBack1]q
[r2]int    
[r2]interface g    
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip ad    

[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
Jul  9 2023 15:00:22-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]disc    
[r2-GigabitEthernet0/0/0]discard th    
[r2-GigabitEthernet0/0/0]disp    
[r2-GigabitEthernet0/0/0]display th    
[r2-GigabitEthernet0/0/0]display this 
[V200R003C00]
#
interface GigabitEthernet0/0/0
 ip address 192.168.1.2 255.255.255.252 
#
return
[r2-GigabitEthernet0/0/0]q
[r2]int    
[r2]interface g    
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip ad    
[r2-GigabitEthernet0/0/1]ip address 192.168.1.5 30
Jul  9 2023 15:01:41-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]
[r2]int    
[r2]interface l    

[r2]interface LoopBack 1

[r2-LoopBack1]    
[r2-LoopBack1]ip ad    
[r2-LoopBack1]ip address 192.168.1.113 28

[r2-LoopBack1]q
[r2]
<r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]ip rou    
[r2]ip route
.
[r2]ip route-static 192.168.1.64 27 192.168.1.6
[r2]ip rou    
[r2]ip route

[r2]ip route-static 192.168.1.16 30 192.168.1.6
[r2]ip roui    
[r2]ip rou    
[r2]ip route
[r2]ip route-static 192.168.1.12 30 192.168.1.6
[r2]ip rou    
[r2]ip route
[r2]ip route-static 192.168.1.128 27 192.168.1.6
[r2]ip rou    
[r2]ip route
[r2]ip route-static 192.168.1.128 27 192.168.1.1
[r2]
[r2]
[r2]ip rou    
[r2]ip route
[r2]ip route-static 192.168.1.8 30 192.168.1.1
[r2]
[r2]ip rou    
[r2]ip route    
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]
<r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]ip rou    
[r2]ip route
[r2]ip route-static 0.0.0.0 0 192.168.1.6
[r2]
[r2]ip rou    
[r2]ip route
[r2]ip route-static 192.168.1.96 27 n    
[r2]ip route-static 192.168.1.96 27 NULL 0
[r2]
<r2>

r3

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r3
[r3]int    
[r3]interface g    
[r3]interface GigabitEthernet 0/0/2
[r3-GigabitEthernet0/0/2]ip ad    
[r3-GigabitEthernet0/0/2]ip address 192.168.1.129 27
Jul  9 2023 15:09:30-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r3-GigabitEthernet0/0/2]q
[r3]int g    
[r3]int GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip ad    
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
Jul  9 2023 15:10:05-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    
[r3]interface g 0/0/0
[r3-GigabitEthernet0/0/0]ip ad    
[r3-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[r3-GigabitEthernet0/0/0]
Jul  9 2023 15:10:42-08:00 r3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]q
[r3]
<r3>sys
Enter system view, return user view with Ctrl+Z.
[r3]ip rou    
[r3]ip route
[r3]ip route-static 192.168.1.3 27 192.168.1.9
Info: The destination address and mask of the configured static route mismatched
, and the static route 192.168.1.0/27 was generated.
[r3]ip rou    
[r3]ip route
[r3]ip route-static 192.168.1.0 30 192.168.1.9
[r3]ip rou    
[r3]ip route`    
[r3]ip route    

[r3]ip rou    
[r3]ip route-static
[r3]ip route-static 192.168.1.32 27 192.168.1.9
[r3]ip rou    
[r3]ip route-static 192.168.1.0 30 192.168.1.9
Error: The route already exists.
[r3]ip rou    
[r3]ip route

[r3]ip route-static 192.168.1.96 27 192.168.1.9
[r3]ip rou    
[r3]ip route
[r3]ip route-static 192.168.1.4 30 192.168.1.14
[r3]ip rou    
[r3]ip route
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip rou    
[r3]ip route
[r3]ip route-static 192.168.1.16 30 192.168.1.14
[r3]
<r3>sys
Enter system view, return user view with Ctrl+Z.
[r3] ip rou    
[r3]ip route
[r3]ip route-static 0.0.0.0 0 192.168.1.14
[r3]
<r3>

r4

The device is running!


<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r4
[r4]int    

[r4]interface l    
[r4]interface LoopBack 0
[r4-LoopBack0]ip ad    

[r4-LoopBack0]ip ad    
[r4-LoopBack0]ip address 192.168.1.97 28
[r4-LoopBack0]
[r4-LoopBack0]
[r4-LoopBack0]
[r4-LoopBack0]q
[r4]int    
[r4]interface l    
[r4]interface LoopBack 0    
[r4]interface LoopBack 0
[r4-LoopBack0]ip ad    
[r4-LoopBack0]ip address 192.168.1.81 28
[r4-LoopBack0]q
[r4]int    
[r4]interface g    
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip ad    
[r4-GigabitEthernet0/0/0]ip address 192.168.1.6 30
Jul  9 2023 15:06:42-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]q
[r4]int    
[r4]interface g    
[r4]interface GigabitEthernet 0/0/2

[r4-GigabitEthernet0/0/2]ip ad    
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
[r4-GigabitEthernet0/0/2]
Jul  9 2023 15:07:14-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r4-GigabitEthernet0/0/2]q
[r4]int    
[r4]interface g    
[r4]interface GigabitEthernet 4/0/0
[r4-GigabitEthernet4/0/0]ip ad    
[r4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
[r4-GigabitEthernet4/0/0]
Jul  9 2023 15:07:51-08:00 r4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet4/0/0 has entered the UP state. 
[r4-GigabitEthernet4/0/0]q
[r4]int    
[r4]interface g    
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ip ad    
[r4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
[r4-GigabitEthernet0/0/1]
Jul  9 2023 15:08:23-08:00 r4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r4-GigabitEthernet0/0/1]q
[r4] 
<r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]ip rou    
[r4]ip route
[r4]ip route-static 192.168.1.128 27 192.168.1.13
[r4]ip rou    
[r4]ip route
[r4]ip route-static 192.168.1.8 30 192.168.1.13
[r4]uorou    
[r4]uorou
[r4]ip rou    
[r4]ip route
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]
[r4] ip rou    
[r4]ip route
[r4]ip route-static 192.168.1.32 27 192.168.1.15
[r4]ip rou    
[r4]ip route
[r4]ip route-static 192.168.1.32 27 192.168.1.5
[r4]disp    
[r4]display th    
[r4]display this 
[V200R003C00]
#
 sysname r4
#
 board add 0/4 1GEC 
#
 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.8 255.255.255.252 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.15
ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
ip route-static 192.168.1.128 255.255.255.224 192.168.1.13
#
return
[r4]undo    
[r4]undo ipr    
[r4]undo ip rou    
[r4]undo ip route

[r4]undo ip route-static 192.168.1.32 255.255.255.224 192.168.1.15
[r4]ip rou    
[r4]ip route
[r4]ip route-static 192.168.1.0 30 192.168.1.5
[r4] ip rou    
[r4]ip route
[r4]ip route-static 192.168.1.96 27 192.168.1.5
[r4]
<r4>
<r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]ip rou    
[r4]ip route
[r4]ip route-static 0.0.0.0 0 192.168.1.18
[r4]
[r4]ip rou    
[r4]ip route
[r4]ip route-static 192.168.1.64 27 n    
[r4]ip route-static 192.168.1.64 27 NULL 0
[r4]
[r4]ip rou    
[r4]ip route
[r4]ip route-static 0.0.0.0 0 192.168.1.22 p    
[r4]ip route-static 0.0.0.0 0 192.168.1.22 permanent ?
  description  Add or delete description of unicast static route
  <cr>         Please press ENTER to execute command 

[r4]ip route-static 0.0.0.0 0 192.168.1.22 pre    
[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
[r4]
<r4>

r5

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r5
[r5]int    
[r5]interface g    
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip ad    
[r5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
Jul  9 2023 15:11:48-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]q
[r5]      
[r5]int    
[r5]interface g    
[r5]interface GigabitEthernet 0/0/1
[r5-GigabitEthernet0/0/1]ip ad    
[r5-GigabitEthernet0/0/1]ip address 192.168.1.22 30
Jul  9 2023 15:12:39-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]q
[r5]    
[r5]    
[r5]ip ad    
[r5]int    
[r5]interface l    
[r5]interface LoopBack 0
[r5-LoopBack0]ip ad    
[r5-LoopBack0]ip address 5.5.5.5 24
[r5-LoopBack0]q
[r5]int    
[r5]interface l    
[r5]interface LoopBack 1
[r5-LoopBack1]ip ad    
[r5-LoopBack1]ip address 6.6.6.6 24
[r5-LoopBack1]q
[r5]
<r5>sys
Enter system view, return user view with Ctrl+Z.
[r5]ip rou    
[r5]ip route
[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5] ip rou    
[r5]ip route
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip rou    
[r5]ip route
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip rou    
[r5]ip route
[r5]ip route-static 192.168.1.96 27 192.168.14.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip rou    
[r5]ip route
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip rou    
[r5]ip route
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip rou    
[r5]ip route
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip rou    
[r5]ip route
[r5]ip route-static 192.168.1.12 30 192.168.1.17
[r5]undo    
[r5]undo 
[r5]undo ip route-static 192.168.1.96 27 192.168.14.17
[r5]
<r5>

 

 依次配置完成后可达到以上所有条件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值