HCIP静态路由综合实验

实验内容及各个部分的ip规划

在这里插入图片描述

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.32/27

192.168.1.32/28  192.168.1.48/28

192.168.1.64/27

192.168.1.64/28  192.168.1.80/28

192.168.1.96/27

192.168.1.96/28  192.168.1.112/28

192.168.1.128/27

192.168.1.128/28  192.168.1.144/28
192.168.1.160/27
192.168.1.192/27
192.168.1.224/27
192.168.1.255/27

配置各个路由器的回环

例:

[R1]int loop0
[R1-LoopBack0]ip add 192.168.1.33 28
[R1-LoopBack0]

骨干网络配置

例:

[R1]int G0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
Aug  3 2023 10:57:16-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]

AR3配置DHCP服务

[R3]dhcp en
Info: The operation may take a few seconds. Please wait for a moment.done.
[R3]ip pool a
Info: It's successful to create an IP address pool.
[R3-ip-pool-a]network 192.168.1.96 mask 27
[R3-ip-pool-a]gateway-list 192.168.1.97
[R3-ip-pool-a]dns-list 114.114.114.114 8.8.8.8
[R3-ip-pool-a]q
[R3]int G0/0/1
[R3-GigabitEthernet0/0/1]dhcp select global 

私有网络的缺省路由

AR5

[R5]ip route-static 0.0.0.0 0 56.1.1.2

AR4

[R4]ip rout 0.0.0.0 0 192.168.1.22

AR2

[R2]ip rout 0.0.0.0 0 192.168.1.10

AR3

[R3]ip rout 0.0.0.0 0 192.168.1.13

AR1

[R1]ip rout 0.0.0.0 0 192.168.1.2
[R1]ip rout 0.0.0.0 0 192.168.1.6

路由器静态路由配置

AR1

[R1]ip rout 192.168.1.64 27 192.168.1.2
[R1]ip rout 192.168.1.8 30 192.168.1.2
[R1]ip rout 192.168.1.96 27 192.168.1.6
[R1]ip rout 192.168.1.12 30 192.168.1.6
[R1]

AR2

[R2]ip rout 192.168.1.32 27 192.168.1.1
[R2]ip rout 192.168.1.4 30 192.168.1.1
[R2]ip rout 192.168.1.96 27 192.168.1.1
[R2]ip rout 192.168.1.96 27 192.168.1.10
[R2]

AR3

[R3]ip rout 192.168.1.32 27 192.168.1.5
[R3]ip rout 192.168.1.0 30 192.168.1.5
[R3]ip rout 192.168.1.64 27 192.168.1.5
[R3]ip rout 192.168.1.64 27 192.168.1.13
[R3]

AR4

[R4]ip rout 192.168.1.64 27 192.168.1.9
[R4]ip rout 192.168.1.0 30 192.168.1.9
[R4]ip rout 192.168.1.32 27 192.168.1.9
[R4]ip rout 192.168.1.32 27 192.168.1.14
[R4]ip rout 192.168.1.4 30 192.168.1.14
[R4]ip rout 192.168.1.96 27 192.168.1.14	

AR5

[R5]ip rout 192.168.1.32 27 192.168.1.21
[R5]ip rout 192.168.1.64 27 192.168.1.21
[R5]ip rout 192.168.1.96 27 192.168.1.21
[R5]ip rout 192.168.1.128 27 192.168.1.21
[R5]ip rout 192.168.1.0 30 192.168.1.21
[R5]ip rout 192.168.1.4 30 192.168.1.21
[R5]ip rout 192.168.1.8 30 192.168.1.21
[R5]ip rout 192.168.1.12 30 192.168.1.21

避免环路

AR1

[R1]ip route-static 192.168.1.32 27 NULL 0

AR2

[R2]ip route-static 192.168.1.64 27 NULL 0

AR4

[R4]ip route-static 192.168.1.128 27 NULL 0

内网能够访问AR6的换回

使用nat
AR5

[R5]acl 2000
[R5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R5-acl-basic-2000]int G0/0/1
[R5-GigabitEthernet0/0/1]nat outbound 2000

telnet服务

AR1

[R1]aaa
[R1-aaa]local-user zhangsan privilege level 15 password cipher 123456
Info: Add a new user.
[R1-aaa]local-user zhangsan service-type telnet
[R1-aaa]q
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]

R6 telnet R5的公有IP地址时,实际登陆到R1上

AR5

[R5]int G0/0/2
[R5-GigabitEthernet0/0/2]nat static protocol tcp global current-interface 23 inside 192.168.1.33 23
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y
[R5-GigabitEthernet0/0/2]

R4、R5故障排除配置

AR4

[R4]ip rout 0.0.0.0 0 192.168.1.18 preference 61

AR5

[R5]
[R5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.17 pr 61
[R5]
[R5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.17 pr 61
[R5]
[R5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.17 pr 61
[R5]
[R5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.17 pr 61
[R5]
[R5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.17 pr 61
[R5]
[R5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.17 pr 61
[R5]
[R5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.17 pr 61
[R5]
[R5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.17 pr 61
[R5]

最后登录效果

<ISP>telnet 56.1.1.1
  Press CTRL_] to quit telnet mode
  Trying 56.1.1.1 ...
  Connected to 56.1.1.1 ...

Login authentication


Username:zhangsan
Password:
<R1>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值