静态路由综合实验
实验图
需求
1.子网划分技术划分网段
2.IP地址分配
3.10个模拟用户网段
4.等价路由构建
5.路由汇总
6.空接口防环
实验与配置内容
配置IP网段
r1网段
<Huawei>system-view
[Huawei]sysname r1
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1-GigabitEthernet0/0/0]quit
[r1]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[r1-GigabitEthernet0/0/1]quit
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]quit
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.49 28
[r1-LoopBack1]quit
r2网段
<Huawei>system-view
[Huawei]sysname r2
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[r2-GigabitEthernet0/0/0]quit
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
[r2-GigabitEthernet0/0/1]quit
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]quit
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.81 28
[r2-LoopBack1]quit
r3网段
<Huawei>system-view
[Huawei]sysname r3
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[r3-GigabitEthernet0/0/0]quit
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
[r3-GigabitEthernet0/0/1]quit
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 192.168.1.97 28
[r3-LoopBack0]quit
[r3]interface LoopBack 1
[r3-LoopBack1]ip address 192.168.1.113 28
[r3-LoopBack1]quit
r4网段
<Huawei>system-view
[Huawei]sysname r4
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[r4-GigabitEthernet0/0/0]quit
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
[r4-GigabitEthernet0/0/1]quit
[r4]interface GigabitEthernet 0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
[r4-GigabitEthernet0/0/2]quit
[r4]interface GigabitEthernet 4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
[r4-GigabitEthernet4/0/0]quit
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack0]quit
[r4]interface LoopBack 1
[r4-LoopBack1]ip address 192.168.1.145 28
[r4-LoopBack1]quit
r5网段
<Huawei>system-view
[Huawei]sysname r5
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
[r5-GigabitEthernet0/0/0]quit
[r5]interface GigabitEthernet 0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.1.22 30
[r5-GigabitEthernet0/0/1]quit
[r5]interface GigabitEthernet 0/0/2
[r5-GigabitEthernet0/0/2]ip address 192.168.1.25 29
[r5-GigabitEthernet0/0/2]quit
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 192.168.1.161 28
[r5-LoopBack0]quit
[r5]interface LoopBack 1
[r5-LoopBack1]ip address 192.168.1.177 28
[r5-LoopBack1]quit
空接口防环
[r1]ip route-static 192.168.1.32 27 NULL 0
[r2]ip route-static 192.168.1.64 27 NULL 0
[r3]ip route-static 192.168.1.96 27 NULL 0
[r4]ip route-static 192.168.1.128 27 NULL 0
[r5]ip route-static 192.168.1.32 27 NULL 0
r5空接口防环
[r5]ip route-static 192.168.1.192 26 NULL 0
r1检查
r2检查
r3检查
r4检查
r5检查
配置静态路由
r1
[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.96 27 192.168.1.6
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[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]ip route-static 192.168.1.32 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.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]ip route-static 0.0.0.0 0 192.168.1.10
r3
[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 0.0.0.0 0 192.168.1.14
r4
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.4 30 192.168.1.13
[r4]ip route-static 192.168.1.64 27 192.168.1.9
[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-static 0.0.0.0 0 192.168.1.18
[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
r5
[r5]ip route-static 192.168.1.0 24 192.168.1.17
[r5]ip route-static 192.168.1.0 24 192.168.1.21 preference 61
[r5]dhcp enable
[r5]ip pool lhy
[r5-ip-pool-lhy]network 192.168.1.24 mask 29
[r5-ip-pool-lhy]gateway-list 192.168.1.25
[r5-ip-pool-lhy]dns-list 8.8.8.8
[r5]interface GigabitEthernet 0/0/2
[r5-GigabitEthernet0/0/2]dhcp select global
[r5-GigabitEthernet0/0/2]quit
r1检查
r2检查
r3检查
r4检查
r5检查
pc1检查
pc2检查
结果测试