HCIP静态路由实验

实验要求
在这里插入图片描述
拓扑搭建

在这里插入图片描述

实验分析
1.AR6(isp)仅配置IP地址,其他接口配置缺省路由

2.划分

3.配置环回接口

4.dhcp协议,配置AR3,电脑端自动获取IP地址

5.配置空接口,避免环路

6.配置静态路由,全网可通

7.配置telnet,做server映射

8.配置路由优先级,取61(默认60)

划分子网(192.168.1.0/24)

骨干192.168.1.0/27

AR1 192.168.1.32/27

192.168.1.32/28 192.168.1.48/28

AR2 192.168.1.64/27

192.168.1.64/28 192.168.1.80/28

AR3 192.168.1.96/27

AR4 192.168.1.96/27

192.168.1.96/28 192.168.1.112/28

AR5 192.168.1.128/27

路由器配置

r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.5 30

r2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.9 30

r3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.13 30
[r3]int g0/0/2
[r3-GigabitEthernet0/0/2]ip add 192.168.1.97 27

r4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.10 30
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.14 30
[r4]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
[r4]int g4/0/0
[r4-GigabitEthernet4/0/0]ip add 192.168.1.21 30

r5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 1.1.1.1 24
[r5]int g0/0/2
[r5-GigabitEthernet0/0/2]ip add 192.168.1.22 30

r6
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 1.1.1.2 24

环回配置

r1
[AR1]int LoopBack 0
[AR1-LoopBack0]ip add 192.168.1.33 28
[AR1]int LoopBack 1
[AR1-LoopBack1]ip add 192.168.1.49 28

r2
[AR2]int LoopBack 0
[AR2-LoopBack0]ip add 192.168.1.68 28
[AR2]int LoopBack 1
[AR2-LoopBack1]ip add 192.168.1.81 28

r4
[AR4]int LoopBack 0
[AR4-LoopBack0]ip add 192.168.1.129 28
[AR4]int LoopBack 1
[AR4-LoopBack1]ip add 192.168.1.145 28

r5
[AR5]int LoopBack 0
[AR5-LoopBack0]ip add 192.168.1.161 27

r6
[r6]int LoopBack 0
[r6-LoopBack0]ip add 6.6.6.6 24

DHCP自动获取地址
[r3]dhcp enable
[r3]ip pool liu
[r3-ip-pool-liu]network 192.168.1.96 mask 255.255.255.224
[r3-ip-pool-liu]gateway-list 192.168.1.97
[r3-ip-pool-liu]dns-list 114.114.114.144
[r3]int g0/0/2
[r3-GigabitEthernet0/0/2]dhcp select g

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

配置缺省
r1
[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 0.0.0.0 0 192.168.1.10

r3
[r3]ip route-static 0.0.0.0 0 192.168.1.14

r4
[r4]ip route-static 0.0.0.0 0 192.168.1.18

r5
ip route-static 0.0.0.0 0 1.1.1.2

静态配置:下一跳

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

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.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

r4
[r4]ip route-static 192.168.1.64 27 192.168.1.9
[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.96 27 192.168.1.13
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]ip route-static 192.168.1.32 27 192.168.1.9

r5
[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17

r4-r5上面断开时
[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
[r5]ip route-static 192.168.1.32 27 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.64 27 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.96 27 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.128 27 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.0 30 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.4 30 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.8 30 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.12 30 192.168.1.21 pr 61

外网连接
[r5]acl 2000
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]nat outbound 2000
在这里插入图片描述

配置空接口

[AR1]ip route-static 192.168.1.32 27 null 0
[AR2]ip route-static 192.168.1.64 27 null 0
[AR4]ip route-static 192.168.1.128 27 null 0

r6telnetr5的IP时,实际登陆到r1上

r1打开telnet服务
[r1]aaa
[r1-aaa]local-user liu privilege level 15 password cipher 123456
Info: Add a new user.
[r1-aaa]local-user liu service-type telnet
[r1]user-interface vty 0
[r1-ui-vty0]au
[r1-ui-vty0]authentication-mode aaa

r5
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 inside 192.168.1.1 23
Warning:The port 23 is well-known port. If you continue it may cause function failure.
Are you sure to continue?[Y/N]:y
(不知道为什么有问题)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值