HCIP静态路由综合实验
一、实验拓扑
二、实验需求
1、R6为ISP,只需要配置IP地址,不需要做其他配置。
2、R1-5为局域网,所有IP地址都基于192.168.1.0/24进行划分
3、所有路由器上的环回,均代表连接用户的接口
4、R4下的PC均通过DHCP进行自动获取IP地址
5、R1-R5均可访问R6的环回
6、R4-R5之间正常通过1000链路进行转发数据,故障时通过100进行转发数据
三、IP地址规划
192.168.1.0/24
192.168.1.0/27 //骨干
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.20/30
192.168.1.24/30
192.168.1.28/30
192.168.1.32/27 //r1
192.168.1.32/28
192.168.1.48/28
192.168.1.64/27 //r2
192.168.1.64/28
192.168.1.80/28
192.168.1.96/27 //r4
192.168.1.128/27 //r3
192.168.1.128/28
192.168.1.144/28
192.168.1.160/27 //r5
192.168.1.192/27
192.168.1.224/27
四、网络配置
r1:
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.49 28
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[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
[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 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.32 27 NULL 0
// 开启telnet服务
[r1]aaa
[r1-aaa]local-user huawei privilege level 15 password cipher 123456
[r1-aaa]local-user huawei service-type telnet
[r1-ui-vty0-4]authentication-mode aaa
r2:
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.81 28
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
[r2]ip route-static 0.0.0.0 0 192.168.1.10
[r2]ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
[r2]ip route-static 192.168.1.12 255.255.255.252 192.168.1.10
[r2]ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
[r2]ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
[r2]ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
[r2]ip route-static 192.168.1.128 255.255.255.224 192.168.1.10
// 防环路由汇总写空接口
[r2]ip route-static 192.168.1.64 27 NULL 0
r3:
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 192.168.1.129 28
[r3]interface LoopBack 1
[r3-LoopBack1]ip address 192.168.1.145 28
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
[r3]interface GigabitEthernet 0/0/2
[r3-GigabitEthernet0/0/2]ip address 192.168.1.17 30
[r3]interface GigabitEthernet 4/0/0
[r3-GigabitEthernet4/0/0]ip address 192.168.1.21 30
[r3]ip route-static 0.0.0.0 0 192.168.1.18
[r3]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
[r3]ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
[r3]ip route-static 192.168.1.4 255.255.255.252 192.168.1.14
[r3]ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
[r3]ip route-static 192.168.1.32 255.255.255.224 192.168.1.14
[r3]ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
[r3]ip route-static 192.168.1.96 255.255.255.224 192.168.1.14
// 防环路由汇总写空接口
[r3]ip route-static 192.168.1.128 27 NULL 0
r4:
[r4]interface GigabitEthernet 0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.97 27
[r4]dhcp enable
[r4-ip-pool-aaa]network 192.168.1.96 mask 27
[r4-ip-pool-aaa]gateway-list 192.168.1.97
[r4-ip-pool-aaa]dns-list 114.114.114.114 8.8.8.8
[r4]interface GigabitEthernet 0/0/2
[r4-GigabitEthernet0/0/2]dhcp select global
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.6 30
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.14 30
[r4]ip route-static 0.0.0.0 0 192.168.1.13
[r4]ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
[r4]ip route-static 192.168.1.8 255.255.255.252 192.168.1.13
[r4]ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
[r4]ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
[r4]ip route-static 192.168.1.64 255.255.255.224 192.168.1.13
[r4]ip route-static 192.168.1.128 255.255.255.224 192.168.1.13
r5:
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 192.168.1.161 27
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
[r5]interface GigabitEthernet 0/0/2
[r5-GigabitEthernet0/0/2]ip address 192.168.1.22 30
[r5]interface GigabitEthernet 0/0/1
[r5-GigabitEthernet0/0/1]ip address 56.1.1.1 24
[r5]ip route-static 0.0.0.0 0 56.1.1.2
[r5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.17
[r5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.17
[r5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
[r5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.17
[r5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.17
[r5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.17
[r5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.17
[r5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.17
// 备份
[r5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 preference 61
[r5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference 61
// 策略
[r5]acl 2000
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5]interface GigabitEthernet 0/0/1
[r5-GigabitEthernet0/0/1]nat outbound 2000
// 端口映射到r1上
[r5]interface GigabitEthernet 0/0/1
[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 inside 192.168.1.33 23
r6:
[ISP]interface LoopBack 0
[ISP-LoopBack0]ip address 6.6.6.6 24
[ISP]interface GigabitEthernet 0/0/0
[ISP-GigabitEthernet0/0/0]ip address 56.1.1.2 24
五、实验结果
原文地址:https://blog.csdn.net/Idealismi/article/details/143772783
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!