静态路由综合实验

实验要求

1、R6为ISP,接口IP地址均为公有地址,该设备只能配置IP地址,之后不能再对其进行任何配置;

2、R1-R5为局域网,私有IP地址192.168.1.0/24,请合理分配;

3、R1、R2、R4,各有两个环回IP地址;R5,R6各有一个环回地址;所有路由器上环回均代表连接用户的接口;

4、R3下面的两台PC通过DHCP自动获取IP地址;

5、选路最佳,路由表尽量小,避免环路;

6、R1-R5均可以访问R6的环回;

7、R6 telnet R5的公有地址时,实际登录到R1上;

8、R4与R5正常通过1000M链路,故障时通过100m链路;

1---4小题如下

1.基于以下要求进行Ip地址划分:

节省IP地址;

便于进行汇总减少我们的出错情况;

网段的划分要合理,如该实验中我们需要划分14个网段,但是实际划分的网段要比我们需要的网段要多一些避免故障发生。

骨干链路 --- 192.168.1.0000 0000

R1-R2 --- 192.168.1.0000 0000 --- 192.168.1.0/30

R2-R4 --- 192.168.1.0000 0100 --- 192.168.1.4/30

R1-R3 --- 192.168.1.0000 1000 --- 192.168.1.8/30

R3-R4 --- 192.168.1.0000 1100 --- 192.168.1.12/30

R4-R5(1000M) --- 192.168.1.0001 0000 --- 192.168.1.16/30

R4-R5(100M) --- 192.168.1.0001 0100 --- 192.168.1.20/30

R1环回 --- 192.168.1.0010 0000

L0 --- 192.168.1.0010 0000 --- 192.168.1.32/28

L1 --- 192.168.1.0011 0000 --- 192.168.1.48/28

R2环回 --- 192.168.1.0100 0000

L0 --- 192.168.1.0100 0000 --- 192.168.1.64/28

L1 --- 192.168.1.0101 0000 --- 192.168.1.80/28

R3子网 --- 192.168.1.0110 0000 --- 192.168.1.96/27

R4环回 --- 192.168.1.1000 0000

L0 --- 192.168.1.1000 0000 --- 192.168.1.128/28

L1 --- 192.168.1.1001 0000 --- 192.168.1.144/28

R5环回 --- 192.168.1.1010 0000 --- 192.168.1.160/27

192.168.1.1100 0000 ---多余

192.168.1.1110 0000 ---多余

结果如图

2.在ensp中对路由器进行配置:

(1)给路由器进行IP地址配置以及环回IP地址配置

R1

改名操作

sysname R1

进入相应接口配置IP

interface GigabitEthernet0/0/0

ip address 192.168.1.1 255.255.255.252

interface GigabitEthernet0/0/1

ip address 192.168.1.5 255.255.255.252

配置环回IP

interface LoopBack0

ip address 192.168.1.33 255.255.255.240

interface LoopBack1

ip address 192.168.1.49 255.255.255.240

R2

改名操作

sysname R2

进入相应接口配置IP

interface GigabitEthernet0/0/0

ip address 192.168.1.9 30

interface GigabitEthernet0/0/1

ip address 192.168.1.2 30

配置环回IP

interface LoopBack0

ip address 192.168.1.65 28

interface LoopBack1

ip address 192.168.1.81 28

R3

改名操作

sysname R3

进入相应接口配置IP

interface GigabitEthernet0/0/0

ip address 192.168.1.6 255.255.255.252

interface GigabitEthernet0/0/1

ip address 192.168.1.13 255.255.255.252

interface GigabitEthernet0/0/2

ip address 192.168.1.97 255.255.255.224

配置环回IP(无)

R4

改名操作

sysname R4

进入相应接口配置IP

interface GigabitEthernet0/0/0

ip address 192.168.1.10 255.255.255.252

interface GigabitEthernet0/0/1

ip address 192.168.1.14 255.255.255.252

interface GigabitEthernet0/0/2

ip address 192.168.1.17 255.255.255.252

interface GigabitEthernet4/0/0

ip address 192.168.1.21 255.255.255.252

配置环回IP

interface LoopBack0

ip address 192.168.1.129 255.255.255.240

interface LoopBack1

ip address 192.168.1.145 255.255.255.240

R5

改名操作

sysname R5

进入相应接口配置IP

interface GigabitEthernet0/0/0

ip address 192.168.1.18 255.255.255.252

interface GigabitEthernet0/0/1

ip address 12.0.0.5 255.255.255.0

nat outbound 2000

interface GigabitEthernet0/0/2

ip address 192.168.1.22 255.255.255.252

配置环回IP

interface LoopBack0

ip address 192.168.1.161 255.255.255.224

R6

改名操作

sysname R6

进入相应接口配置IP

interface GigabitEthernet0/0/0

ip address 12.0.0.6 255.255.255.0

配置环回IP

interface LoopBack0

ip address 1.1.1.6 255.255.255.0

(2)给PC端配置IP地址(使用dhcp服务):

R3

dhcp enable

ip pool aa

gateway-list 192.168.1.97

network 192.168.1.96 mask 255.255.255.224

dns-list 114.114.114.114 8.8.8.8

dhcp select global

然后在实验拓扑图中对PC1与PC2启动dhcp服务

并且在命令行使用ipconfig进行查看

pc1

pc2

3.配置静态路由

R1

ip route-static 0.0.0.0 0.0.0.0 192.168.1.2

ip route-static 0.0.0.0 0.0.0.0 192.168.1.6

ip route-static 192.168.1.8 255.255.255.252 192.168.1.2

ip route-static 192.168.1.12 255.255.255.252 192.168.1.6

ip route-static 192.168.1.16 255.255.255.252 192.168.1.2

ip route-static 192.168.1.16 255.255.255.252 192.168.1.6

ip route-static 192.168.1.20 255.255.255.252 192.168.1.2

ip route-static 192.168.1.20 255.255.255.252 192.168.1.6

ip route-static 192.168.1.64 255.255.255.224 192.168.1.2

ip route-static 192.168.1.96 255.255.255.224 192.168.1.6

ip route-static 192.168.1.128 255.255.255.224 192.168.1.2

ip route-static 192.168.1.128 255.255.255.224 192.168.1.6

ip route-static 192.168.1.160 255.255.255.224 192.168.1.2

ip route-static 192.168.1.160 255.255.255.224 192.168.1.6

R2

ip route-static 0.0.0.0 0.0.0.0 192.168.1.10

ip route-static 192.0.0.0 254.0.0.0 192.168.1.10

ip route-static 192.168.1.4 255.255.255.252 192.168.1.1

ip route-static 192.168.1.12 255.255.255.252 192.168.1.10

ip route-static 192.168.1.16 255.255.255.252 192.168.1.10

ip route-static 192.168.1.20 255.255.255.252 192.168.1.10

ip route-static 192.168.1.32 255.255.255.224 192.168.1.1

ip route-static 192.168.1.64 255.255.255.224 NULL0

ip route-static 192.168.1.96 255.255.255.224 192.168.1.10

ip route-static 192.168.1.96 255.255.255.224 192.168.1.1

ip route-static 192.168.1.128 255.255.255.224 192.168.1.10

ip route-static 192.168.1.160 255.255.255.224 192.168.1.10

R3

ip route-static 0.0.0.0 0.0.0.0 192.168.1.14

ip route-static 192.168.1.0 255.255.255.252 192.168.1.5

ip route-static 192.168.1.8 255.255.255.252 192.168.1.14

ip route-static 192.168.1.16 255.255.255.252 192.168.1.14

ip route-static 192.168.1.20 255.255.255.252 192.168.1.14

ip route-static 192.168.1.32 255.255.255.224 192.168.1.5

ip route-static 192.168.1.64 255.255.255.224 192.168.1.5

ip route-static 192.168.1.64 255.255.255.224 192.168.1.14

ip route-static 192.168.1.128 255.255.255.224 192.168.1.14

ip route-static 192.168.1.160 255.255.255.224 192.168.1.14

R4

ip route-static 0.0.0.0 0.0.0.0 192.168.1.18

ip route-static 0.0.0.0 0.0.0.0 192.168.1.22 preference 61

ip route-static 192.0.0.0 224.0.0.0 192.168.1.13

ip route-static 192.168.1.0 255.255.255.252 192.168.1.9

ip route-static 192.168.1.4 255.255.255.252 192.168.1.13

ip route-static 192.168.1.32 255.255.255.224 192.168.1.13

ip route-static 192.168.1.32 255.255.255.224 192.168.1.9

ip route-static 192.168.1.64 255.255.255.224 192.168.1.9

ip route-static 192.168.1.96 255.255.255.224 192.168.1.13

ip route-static 192.168.1.128 255.255.255.224 NULL0

ip route-static 192.168.1.160 255.255.255.224 192.168.1.18

ip route-static 192.168.1.160 255.255.255.224 192.168.1.22

R5

ip route-static 0.0.0.0 0.0.0.0 12.0.0.6

ip route-static 192.168.1.0 255.255.255.252 192.168.1.17

ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 preference 61

ip route-static 192.168.1.4 255.255.255.252 192.168.1.17

ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 61

ip route-static 192.168.1.8 255.255.255.252 192.168.1.17

ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 61

ip route-static 192.168.1.12 255.255.255.252 192.168.1.17

ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 61

ip route-static 192.168.1.16 255.255.255.252 192.168.1.17

ip route-static 192.168.1.32 255.255.255.224 192.168.1.17

ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference 61

ip route-static 192.168.1.64 255.255.255.224 192.168.1.17

ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference 61

ip route-static 192.168.1.96 255.255.255.224 192.168.1.17

ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 preference 61

ip route-static 192.168.1.128 255.255.255.224 192.168.1.17

ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference 61

R6

ip route-static 192.168.1.32 255.255.255.224 NULL0

到此已经解决前4小题!!

5.选路最佳,路由表尽量小,避免环路;

R1

ip route-static 192.168.1.32 255.255.255.224 NULL0

R2

ip route-static 192.168.1.64. 255.255.255.224 NULL0

R4

ip route-static 192.168.1.128 255.255.255.224 NULL0

6.R1-R5均可以访问R6的环回;

使用ACL抓取流量

acl number 2000

rule 5 permit source 192.168.1.0 0.0.0.255

配置easyIP访问公网

interface GigabitEthernet0/0/0

ip address 192.168.1.18 255.255.255.252

nat server protocol tcp global current-interface telnet inside 192.168.1.1 teln

et

interface GigabitEthernet0/0/1

ip address 12.0.0.5 255.255.255.0

nat outbound 2000

7、R6 telnet R5的公有地址时,实际登录到R1上;

R1配置telnet

aaa

local-user yb password cipher 123

local-user yb privilege level 15

local-user yb service-type telnet

user-interface vty 0 4

authentication-mode aaa

R5配置端口映射

interface GigabitEthernet0/0/0

ip address 192.168.1.18 255.255.255.252

nat server protocol tcp global current-interface telnet inside 192.168.1.1 teln

et

8、R4与R5正常通过1000M链路,故障时通过100m链路;

因为静态路由默认优先级为60,所以需要把100M的优先级调大

修改R4静态路由优先级

ip route-static 0.0.0.0 0.0.0.0 192.168.1.22 preference 61

修改R5静态路由优先级

ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 preference 61

ip route-static 192.168.1.4 255.255.255.252 192.168.1.17

ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 61

ip route-static 192.168.1.8 255.255.255.252 192.168.1.17

ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 61

ip route-static 192.168.1.12 255.255.255.252 192.168.1.17

ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 61

ip route-static 192.168.1.16 255.255.255.252 192.168.1.17

ip route-static 192.168.1.32 255.255.255.224 192.168.1.17

ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference 61

ip route-static 192.168.1.64 255.255.255.224 192.168.1.17

ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference 61

ip route-static 192.168.1.96 255.255.255.224 192.168.1.17

ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 preference 61

ip route-static 192.168.1.128 255.255.255.224 192.168.1.17

ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference 61

配置完成

相关推荐
Fine姐14 分钟前
The Network Link Layer: 无线传感器中Delay Tolerant Networks – DTNs 延迟容忍网络
开发语言·网络·php·硬件架构
网络研究院1 小时前
新的“MadeYouReset”方法利用 HTTP/2 进行隐秘的 DoS 攻击
网络·网络协议·安全·http·攻击·漏洞
189228048611 小时前
NY270NY273美光固态闪存NY277NY287
服务器·网络·数据库·科技·性能优化
秃了也弱了。11 小时前
WireShark:非常好用的网络抓包工具
网络·测试工具·wireshark
清源妙木真菌12 小时前
应用层协议——HTTP
网络·网络协议·http
网硕互联的小客服16 小时前
Apache 如何支持SHTML(SSI)的配置方法
运维·服务器·网络·windows·php
共享家952719 小时前
linux-数据链路层
linux·网络·macos
1892280486121 小时前
NY243NY253美光固态闪存NY257NY260
大数据·网络·人工智能·缓存
玩转以太网1 天前
3 种方式玩转网络继电器!W55MH32 实现网页 + 阿里云 + 本地控制互通
网络·物联网·阿里云
How_doyou_do1 天前
关于casdoor重定向问题
网络