静态路由综合实验

实验要求

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

配置完成

相关推荐
城南vision5 分钟前
计算机网络——TCP篇
网络·tcp/ip·计算机网络
Ciderw33 分钟前
块存储、文件存储和对象存储详细介绍
网络·数据库·nvme·对象存储·存储·块存储·文件存储
Tony聊跨境1 小时前
独立站SEO类型及优化:来检查这些方面你有没有落下
网络·人工智能·tcp/ip·ip
2403_875736872 小时前
道品科技智慧农业中的自动气象检测站
网络·人工智能·智慧城市
Tassel_YUE4 小时前
网络自动化04:python实现ACL匹配信息(主机与主机信息)
网络·python·自动化
Diamond技术流4 小时前
从0开始学习Linux——网络配置
linux·运维·网络·学习·安全·centos
Spring_java_gg4 小时前
如何抵御 Linux 服务器黑客威胁和攻击
linux·服务器·网络·安全·web安全
方方怪5 小时前
与IP网络规划相关的知识点
服务器·网络·tcp/ip
weixin_442643426 小时前
推荐FileLink数据跨网摆渡系统 — 安全、高效的数据传输解决方案
服务器·网络·安全·filelink数据摆渡系统
阑梦清川7 小时前
JavaEE初阶---网络原理(五)---HTTP协议
网络·http·java-ee