静态路由综合实验

实验要求

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

配置完成

相关推荐
xkroy1 小时前
网络协议概念与应用层
网络
筏.k1 小时前
C++ 网络编程(14) asio多线程模型IOThreadPool
网络·c++·架构
门思科技2 小时前
设计可靠 LoRaWAN 设备时需要考虑的关键能力
运维·服务器·网络·嵌入式硬件·物联网
小高不会迪斯科2 小时前
MIT 6.824学习心得(2) 浅谈多线程和RPC
网络·网络协议·rpc
清醒的兰2 小时前
Qt 基于TCP套接字编程
网络·qt·tcp
程序猿追3 小时前
免费版安全性缩水?ToDesk、TeamViewer、向日葵、网易UU远程访问&隐私防护测评
服务器·网络·科技·teamviewer
车载测试工程师3 小时前
车载交换机动态MAC学习和静态MAC绑定&如何获取MAC地址表
网络·tcp/ip·车载系统·wireshark
速盾cdn5 小时前
速盾:高防CDN还有哪些冷知识?
网络·web安全
格调UI成品6 小时前
预警系统安全体系构建:数据加密、权限分级与误报过滤方案
大数据·运维·网络·数据库·安全·预警
愚润求学9 小时前
【Linux】网络基础
linux·运维·网络