静态综合实验1

文章展示了对华为路由器R1、R2、R3和R4的IP地址配置,包括LoopBack接口和GigabitEthernet接口的IP设置。R3被配置为提供DHCP服务,创建了IP地址池并设置了默认网关和DNS服务器。此外,还配置了静态路由以实现网络连通性,并利用空接口解决黑洞问题。在R4与R5之间的链路,正常情况下是1000M,故障时会降级到100M。
摘要由CSDN通过智能技术生成

要求:

 IP地址规划

根据分配的IP地址给R1配地址

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1  
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 192.168.1.33 28
[R1-LoopBack0]interface LoopBack 1
[R1-LoopBack1]ip address 192.168.1.49 28
[R1-LoopBack1]quit
[R1]
[R1]int g0/0/0  
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
Jul  9 2023 14:20:20-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.9 30
Jul  9 2023 14:20:44-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

 R2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]int    
[R2]interface lo    
[R2]interface LoopBack 0
[R2-LoopBack0]ip ad    
[R2-LoopBack0]ip address 192.168.1.97 28
[R2-LoopBack0]interface LoopBack 1
[R2-LoopBack1]ip address 192.168.1.113 28
[R2-LoopBack1]q
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
Jul  9 2023 14:23:50-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 g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[R2-GigabitEthernet0/0/1]
Jul  9 2023 14:24:31-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]q
 

  给R3上配置DHCP服务

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip ad    
[R3-GigabitEthernet0/0/0]ip address 192.168.1.10 30
Jul  9 2023 14:36:29-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 address 192.168.1.14 30
Jul  9 2023 14:36:48-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]int g0/0/2
[R3-GigabitEthernet0/0/2]ip address 192.168.1.128 27
Error: The specified IP address is invalid.
[R3-GigabitEthernet0/0/2]ip address 192.168.1.129 27
[R3-GigabitEthernet0/0/2]
Jul  9 2023 14:37:46-08:00 R3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R3-GigabitEthernet0/0/2]q
[R3]dhcp e    
[R3]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[R3]ip po    
[R3]ip policy-based-route
[R3]ip pool aa
Info: It's successful to create an IP address pool.
[R3-ip-pool-aa]net    
[R3-ip-pool-aa]netbios-type
[R3-ip-pool-aa]network 192.168.1.128 ma    
[R3-ip-pool-aa]network 192.168.1.128 mask 27
[R3-ip-pool-aa]ga    
[R3-ip-pool-aa]gateway-list 192.168.1.129
[R3-ip-pool-aa]dns    
[R3-ip-pool-aa]dns-list 8.8.8.8 114.114.114.114
[R3-ip-pool-aa]q
[R3]int g0/0/2
[R3-GigabitEthernet0/0/2]dh    
[R3-GigabitEthernet0/0/2]dhcp se    
[R3-GigabitEthernet0/0/2]dhcp select gl    
[R3-GigabitEthernet0/0/2]dhcp select global 
[R3-GigabitEthernet0/0/2]q
[R3]q

R4

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip ad    
[R4-GigabitEthernet0/0/0]ip address 192.168.1.13 30
Jul  9 2023 14:36:29-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 address 192.168.1.6 30
Jul  9 2023 14:36:48-08:00 R3 %%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 address 192.168.1.17 30
[R4-GigabitEthernet0/0/2]
Jul  9 2023 14:37:46-08:00 R3 %%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]q
[R4]int g4/0/0

[R4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
[R4]q

R5同上 

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

在R1 ,R2,R3,R4,上写一条缺省

[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.10
[R2]ip route-static 0.0.0.0 0 192.168.1.6
[R3]ip route-static 0.0.0.0 0 192.168.1.13

[R4]ip route-static 0.0.0.0 0 192.168.1.18

利用空接口来解决黑洞问题配置:

 [R4]ip route-static 192.168.1.64 27 NULL 0

[R1]ip route-static 192.168.1.32 27 NULL 0
[R2]ip route-static 192.168.1.96 27 NULL 0

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

 [R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61

测试:

  

 关闭接口前

关闭接口后

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

孤冢清风666

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值