静态HCIA路由配置练习

要求:

1–R6为isp,接口IP地址均为公有地址;该设备只能配置IP地址,之后不能再对其进行任何配置;
2–R1-R5为局域网,私有IP地址192.168.1.0/24,请合理分配;
3–所有路由器上环回,均代表连接用户的接口;
4–R3下的两台FC通过DHCP自动获取IP地址;
5–选路最佳,路由表尽量小,避免环路;
6–R1-R5均可访问R6的环回;
7–R6telnetR5的公有IP地址时,实际登陆到R1上;
8–R4与R5正常通过1000链路,故障时通过100兆链路;

在这里插入图片描述
网络部署思路:
1,拓扑设计——IP地址规划
2,实施
1)底层——所有节点拥有合法的ip地址
2)路由——静态 动态 全网可达
3)策略——规则 优化 安全
4)测试
5)排错
3,维护
4,升级——割接(网工) 扩容(服务器)

实验过程

1.路由器IP划分:
私有IP为192.168.1.0/24,需要对其进行划分
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
2.路由器IP分配:
R1
192.168.1.32/27
192.168.1.32/28
192.168.1.48/28
R2
192.168.1.64/27
192.168.1.64/28
192.168.1.80/28
R3
192.168.1.96/27
R4
192.168.1.128/27
192.168.1.128/28
192.168.1.144/28
R5
192.168.1.160/27

[R2]interface GigabitEthernet0/0/0 进入接口
[R2-GigabitEthernet0/0/0]ip address 192.168.1.2 30 配IP地址

[R1]int LoopBack 0 进入回环
[R1-LoopBack0]ip address 192.168.1.33 28 配IP地址

R1的路由表
在这里插入图片描述
R2路由表
在这里插入图片描述
R3路由表
在这里插入图片描述

R4路由表
在这里插入图片描述

R5路由表
在这里插入图片描述

R6路由表
在这里插入图片描述

[R3]dhcp enable ——开启DHCP
[R3]ip pool a ——定义IP池的名字为a
[R3-ip-pool-a]network 192.168.1.96 mask 27——定义IP池里面的IP
[R3-ip-pool-a]gateway-list 192.168.1.97——定义网关
[R3-ip-pool-a]dns-list 114.114.114.114 8.8.8.8——定义DNS

在进入g0/0/2口中来一遍dhcp
[R3-GigabitEthernet0/0/2]dhcp select global

进入电脑后获取IP
在这里插入图片描述
在这里插入图片描述

给每个路由器写如缺省
[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]ip route-static 0.0.0.0 0 192.168.1.10

[R3]ip route-static 0.0.0.0 0 192.168.1.14

[R4]ip route-static 0.0.0.0 0 192.168.1.18

[R5]ip route-static 0.0.0.0 0 56.1.1.2

在给r1配最佳路径,因为r1给r4通讯时会负载均衡
[R1]ip route-static 192.168.1.64 27 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.8 30 192.168.1.2

给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配的路由为:
ip route-static 192.168.1.32 27 192.168.1.17
ip route-static 192.168.1.64 27 192.168.1.17
ip route-static 192.168.1.96 27 192.168.1.17
ip route-static 192.168.1.128 27 192.168.1.17
ip route-static 192.168.1.32 27 192.168.1.17
ip route-static 192.168.1.0 30 192.168.1.17
ip route-static 192.168.1.4 30 192.168.1.17
ip route-static 192.168.1.8 30 192.168.1.17
ip route-static 192.168.1.12 30 192.168.1.17
在R4中告诉她还有一条线路为备用线路
[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
ip route-static 192.168.1.64 27 192.168.1.21 pr 61
ip route-static 192.168.1.96 27 192.168.1.21 pr 61
ip route-static 192.168.1.128 27 192.168.1.21 pr 61
ip route-static 192.168.1.32 27 192.168.1.21 pr 61
ip route-static 192.168.1.0 30 192.168.1.21 pr 61
ip route-static 192.168.1.4 30 192.168.1.21 pr 61
ip route-static 192.168.1.8 30 192.168.1.21 pr 61
ip route-static 192.168.1.12 30 192.168.1.21 pr 61

测试是否8R4与R5正常通过1000链路,故障时通过100兆链路:
[R4]int g0/0/3
[R4-GigabitEthernet0/0/3]sh 进入接口并关闭

原先走过的是18接口
在这里插入图片描述
ping这个接口
在这里插入图片描述

关闭后走过的是22接口
在这里插入图片描述
并通过ping这个接口后任然可以通过
在这里插入图片描述

随后设置nat
[R5]acl 2000
[R5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255 一对多
[R5]int g0/0/2
[R5-GigabitEthernet0/0/2]nat outbound 2000

5–避免环路;
做防环在r1 r4 r2接入空接口预设 防止汇总中的回环一个环路失去,但其路由器不知道她失去,任然在访问这个失去的环路,但缺省会换
还回去,出环
[R1]ip route-static 192.168.1.32 27 null 0
[R2]ip route-static 192.168.1.64 27 null 0
[R4]ip route-static 192.168.1.128 27 null 0

7–R6telnetR5的公有IP地址时,实际登陆到R1上;
[R1]aaa 打开telnet服务
[R1-aaa]local-user xixi privilege level 15 password cipher 123456 设置账号密码
[R1-aaa]local-user xixi service-type telnet 定义作用
[R1]user-interface vty 0
[R1-ui-vty0]authentication-mode aaa
然后进入r4看是否进入r1
telnet 192.168.1.1
然后在r5做映射
[R5]int g0/0/2
[R5-GigabitEthernet0/0/2]nat server protocol tcp global current-interface 23 inside 192.168.1.1 23
在然后在R6中telnetR1

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值