路由.docx

上传人:b****5 文档编号:11858485 上传时间:2023-04-06 格式:DOCX 页数:12 大小:17.83KB
下载 相关 举报
路由.docx_第1页
第1页 / 共12页
路由.docx_第2页
第2页 / 共12页
路由.docx_第3页
第3页 / 共12页
路由.docx_第4页
第4页 / 共12页
路由.docx_第5页
第5页 / 共12页
点击查看更多>>
下载资源
资源描述

路由.docx

《路由.docx》由会员分享,可在线阅读,更多相关《路由.docx(12页珍藏版)》请在冰豆网上搜索。

路由.docx

路由

实验一:

虚拟局域网中数据的转发

(一)实验步骤与调试过程

一、分别在两个交换机上配置两个VLAN:

VLAN10和VLAN20并为其分配端口成员。

1在交换机上创建两个VLAN:

VLAN2和VLAN3。

2将交换机上的端口1~8分配成VLAN2的成员,将交换机上的端口9~16分配成VLAN3的成员。

3将工作站HostA、HostB接入交换机上的端口1~8中的某两个端口。

将工作站HostC接入交换机上的端口9~16中的某个端口。

4依照9-21所示配置各工作站IP地址、子网掩码信息。

5测试同一VLAN内工作站的连通性。

6测试不同VLAN间工作站的连通性。

7检查交换机上的VLAN相关信息

二、.配置路由器实现VLAN间路由

1利用路由器R1,R2模拟PC,关闭路由功能

2将R1的Fa0/0端口的IP改为:

192.168.1.2/24默认网关为:

192.168.1.1

3将R2的Fa0/0端口的IP改为:

192.168.1.2/24默认网关为:

192.168.1.1

4将交换机SW1关闭路由功能,作为二层交换机使用,并划分VLAN14,VLAN15两个VLAN;

5将SW1的Fa1/14端口加入到VLAN14中,将Fa1/15端口加入到VLAN15中

6在路由器R3的Fa0/0接口启用子接口Fa/0.14(ip:

192.168.0.1/24),Fa0/0.15(ip:

192.168.1.1/24),并封装相应的接口

(2)实验结果

成功的完成了实验,并得到以下结果:

1.成功的在两个交换机上配置了两个VLAN

2成功的配置路由器实现VLAN间路由

(3)实验报告主要内容

分别在两个交换机上配置两个VLAN:

VLAN10和VLAN20并为其分配端口成员:

在交换机中建立三个vlan:

vlan2,vlan3,vlan4

Switch>

Switch>enable

Switch#configureterminal

Switch(config)#hostnameSwitchA

Switch(config)#exit

Switch#vlandatabase

Switch(vlan)#vlan2

VLAN2added:

Name:

VLAN0002

Switch(VLAN)#

Switch(vlan)#vlan3

VLAN3added:

Name:

VLAN0003

Switch(VLAN)#

Switch(vlan)#vlan4

VLAN4added:

Name:

VLAN0004

Switch(VLAN)#exit

Switch#configureterminal

Switch(config)#interfacefastethernet0/1

Switch(config-if)#switchportaccessvlan2

Switch(config-if)#interfacefastethernet0/2

Switch(config-if)#switchportaccessvlan2

Switch(config-if)#interfacefastethernet0/3

Switch(config-if)#switchportaccessvlan2

Switch(config-if)#interfacefastethernet0/4

Switch(config-if)#switchportaccessvlan2

Switch(config-if)#interfacefastethernet0/5

Switch(config-if)#switchportaccessvlan2

Switch(config-if)#interfacefastethernet0/6

Switch(config-if)#switchportaccessvlan3

Switch(config-if)#interfacefastethernet0/7

Switch(config-if)#switchportaccessvlan3

Switch(config-if)#interfacefastethernet0/8

Switch(config-if)#switchportaccessvlan3

Switch(config-if)#interfacefastethernet0/9

Switch(config-if)#switchportaccessvlan3

Switch(config-if)#interfacefastethernet0/10

Switch(config-if)#switchportaccessvlan3

Switch(config-if)#interfacefastethernet0/11

Switch(config-if)#switchportaccessvlan4

Switch(config-if)#interfacefastethernet0/12

Switch(config-if)#switchportaccessvlan4

Switch(config-if)#end

Switch#showvlan

PC1:

C:

>ipc/ip192.168.1.2255.255.255.0

C:

>

PC2:

C:

>ipc/ip192.168.2.2255.255.255.0

C:

>

PC3:

C:

>ipc/ip192.168.3.2255.255.255.0

C:

>

2.配置路由器实现VLAN间路由

实验配置过程:

交换机SW1的配置清单:

1.划分VLAN:

SW1#vlandata

SW1(vlan)#vlan14

SW1(vlan)#vlan15

SW1(vlan)#exit

2.将端口加入到相应的VLAN:

SW1(config)#intfa1/14

SW1(config-if)#speed100

SW1(config-if)#duplexfull

SW1(config-if)#switchportmodacc

SW1(config-if)#switchportaccvlan14

SW1(config-if)#exit

SW1(config)#intfa1/15

SW1(config-if)#speed100

SW1(config-if)#duplexfull

SW1(config-if)#switchportmodacc

SW1(config-if)#switchportaccvlan15

SW1(config-if)#exit

3.为Fa1/13端口配置干道:

SW1(config)#intfa1/13

SW1(config-if)#switchportmodtrunk

SW1(config-if)#switchporttrunkencapsulationdot1q

SW1(config-if)#noshut

SW1(config-if)#exit

4.关闭交换机的路由功能:

SW1(config)#noiprouting

路由器R3的配置清单:

1.开启路由器R3的路由功能:

R3(config)#iprouting

2.启用子接口、封装VLAN并设置ip:

R3(config)#intfa0/0.14

R3(config-subif)#encapsulationdot1q14

R3(config-subif)#ipadd192.168.0.1255.255.255.0

R3(config-subif)#noshut

R3(config-subif)#exit

R3(config)#intfa0/0.15

R3(config-subif)#encapsulationdot1q15

R3(config-subif)#ipadd192.168.1.1255.255.255.0

R3(config-subif)#noshut

R3(config-subif)#exit

3.配置Fa0/0端口并启动该端口:

R3(config)#intfa0/0

R3(config-if)#speed100

R3(config-if)#duplexfull

R3(config-if)#noshut

路由器R2的配置清单:

R2(config)#noiprouting

R2(config)#ipdefault-gateway192.168.0.1

R2(config)#intfa0/0

R2(config-if)#speed100

R2(config-if)#duplexfull

R2(config-if)#ipadd192.168.0.2255.255.255.0

R2(config-if)#noshut

路由器R1的配置清单:

R1(config)#noiprouting

R1(config)#ipdefault-gateway192.168.1.1

R1(config)#intfa0/0

R1(config-if)#speed100

R1(config-if)#duplexfull

R1(config-if)#ipadd192.168.1.2255.255.255.0

R1(config-if)#noshut

R1(config-if)#exit

实验二:

动态路由协议配置

(1)实验步骤与调试过程

一、.配置RIPv2路由协议:

(1).routerrip

(2).version2(3)networkip-address

二、.配置点到点链路上的OSPF,对运行中的OSPF进行诊断

1、依照7-4-1连接各路由器

2、依照7-4-1配置各路由器的各IP地址等参数。

3、配置路由器RouterA、RouterB和RouterC上的OSPF协议

4、测试各网络之间的连通性。

5、利用7.2节中的命令对OSPF的运行进行诊断,观察诊断输出

 

(2)实验结果

通过实验,得到如下结果:

1.成功的配置了RIPv2路由协议

2.成功的配置点到点链路上的OSPF,对运行中的OSPF进行诊断并且三个pc间能相互ping通

(3)实验报告主要内容

1..配置RIPv2路由协议:

(1).routerrip

(2).version2(3)networkip-addres

2.配置点到点链路上的OSPF,对运行中的OSPF进行诊断

在Router1中进行如下配置:

Router>enable

Router#config

Router(config)#hostnameRouterA

RouterA(config)#ints0

RouterA(config-if)#ipadd192.168.1.1255.255.255.0

RouterA(config-if)#clockrate64000

RouterA(config-if)#noshutdown

RouterA(config)#ints1

RouterA(config-if)#ipadd192.168.2.1255.255.255.0

RouterA(config-if)#clockrate64000

RouterA(config-if)#noshutdown

RouterA(config-if)#intfe0/0

RouterA(config-if)#ipadd1.1.1.1255.255.255.0

RouterA(config-if)#noshutdown

RouterA(config-if)#exit

RouterA(config)#routerospf2

RouterA(config-router)#network1.1.1.00.0.0.255area1

RouterA(config-router)#network192.168.1.10.0.0.0area1

RouterA(config-router)#network192.168.2.10.0.0.0area1

RouterA(config-router)#end

RouterA#

在Router2中进行如下配置:

Router>enable

Router#config

Router(config)#hostnameRouterB

RouterB(config)#ints0

RouterB(config-if)#ipadd192.168.1.2255.255.255.0

RouterB(config-if)#clockrate64000

RouterB(config-if)#noshutdown

RouterB(config)#ints1

RouterB(config-if)#ipadd192.168.3.1255.255.255.0

RouterB(config-if)#clockrate64000

RouterB(config-if)#noshutdown

RouterB(config-if)#intfe0/0

RouterB(config-if)#ipadd2.2.2.2255.255.255.0

RouterB(config-if)#noshutdown

RouterB(config-if)#exit

RouterB(config)#routerospf2

RouterB(config-router)#network2.2.2.00.0.0.255area1

RouterB(config-router)#network192.168.1.20.0.0.0area1

RouterB(config-router)#network192.168.3.10.0.0.0area1

RouterB(config-router)#end

RouterB#

在Router3中进行如下配置:

Router>enable

Router#config

Router(config)#hostnameRouterC

RouterC(config)#ints0

RouterC(config-if)#ipadd192.168.2.2255.255.255.0

RouterC(config-if)#clockrate64000

RouterC(config-if)#noshutdown

RouterC(config)#ints1

RouterC(config-if)#ipadd192.168.3.2255.255.255.0

RouterC(config-if)#clockrate64000

RouterC(config-if)#noshutdown

RouterC(config-if)#intfe0/0

RouterC(config-if)#ipadd3.3.3.3255.255.255.0

RouterC(config-if)#noshutdown

RouterC(config-if)#exit

RouterC(config)#routerospf2

RouterC(config-router)#network3.3.3.300.0.0.255area1

RouterC(config-router)#network192.168.2.20.0.0.0area1

RouterC(config-router)#network192.168.3.20.0.0.0area1

RouterC(config-router)#end

RouterC#

运行结果:

PC1,PC2,PC3之间可以相互ping通

 

实验三:

路由器的基本配置和管理实验

(1)实验步骤与调试过程

步骤一:

配置主机和路由器的IP地址,使用ping命令检测连通情况。

检测电脑和路由器的console端口的IP地址可以PING通

步骤二:

下载路由器的IOS镜像。

(先查看本机磁盘中是否在文件目录中是否有路由器的IOS)

1设置TFTP服务器,并开启TFTP软件

2用命令“copyflashtftp”下载IO

步骤三:

下载路由器的配置文件。

1Router>en

2Router#copyrunning-configtftp将路由器flash中的ISO软件通过TFTP复制到主机中。

(这样做的目的是给路由器备份IOS)

步骤四:

在电脑中修改路由器的配置文件。

步骤五:

上传配置文件和IOS到路由器

1Router#copytftprunning-config

2Router#copytftpflash

(2)实验结果

通过实验,得到以下结果:

1.

(1)enable普通用户模式的命令,用于转换特权用户模式

(2).disable用于特权模式转换为普通模式(3)hostnamename设置路由器名称(4).enablesecertpassword设置路由器的加密使能密码(5).enablepasswordpassword全局配置模式命令,用于设置路由器的使能密码,(6).configureterminal进入全局配置模式(7).interfacetypeslot/number进入借口配置模式(8).shutdown临时关闭某个接口

 

(3)实验报告主要内容

步骤一:

配置主机和路由器的IP地址,使用ping命令检测连通情况。

检测电脑和路由器的console端口的IP地址可以PING通

步骤二:

下载路由器的IOS镜像。

(先查看本机磁盘中是否在文件目录中是否有路由器的IOS)

1设置TFTP服务器,并开启TFTP软件

2用命令“copyflashtftp”下载IO

步骤三:

下载路由器的配置文件。

1Router>en

2Router#copyrunning-configtftp将路由器flash中的ISO软件通过TFTP复制到主机中。

(这样做的目的是给路由器备份IOS)

步骤四:

在电脑中修改路由器的配置文件。

步骤五:

上传配置文件和IOS到路由器

1Router#copytftprunning-config

2Router#copytftpflash

实验四:

ACL配置

(1)实验步骤与调试过程

一、.

(1).通过DynamipsGUI运行编写好的.NET网络拓扑文件

(2)配置路由器基本参数

(3)配置路由器和各工作站相应的IP地址、子网掩码等参数,配置路由器A的串行接口serial0/0接口时钟频率为64000

(4).使用ping命令测试PC终端和路由器A之间、路由器A和路由器B之间的连通性

(5)配置路由器上的标准ACL,使得子网192.168.0.0/24中只有192.168.0.1可以访问子网192.168.1.0/24,禁止其他通信量

(6)测试、检查配置好的ACL

二、

(1)配置访问控制列表语句和访问控制组语句

(2)与第一步一样

三、

(1)设计、编写DynamipsGUI所需要的.NET文件

(2)通过DynamipsGUI运行编写好的.NET网络拓扑文件

(3)配置路由器基本参数

(4)配置路由器和各工作站相应的IP地址、子网掩码等参数,配置路由器A的串行接口serial0/0接口时钟频率为64000本参数

(5)使用ping命令测试PC终端和路由器A之间、路由器A和路由器B之间的连通性。

(6)在路由器B的全局配置模式下添加默认路由命令:

iproute0.0.0.00.0.0.0192.168.1.1

(7)在PC终端上测试以HTTP方式、Telnet方式访问路由器B

(8)配置扩展ACL使得PC终端无法ping通路由器B,允许其他通信量

(9)测试、检查配置好的ACL

(10)配置扩展ACL使得PC终端无法访问路由器B上运行的WWW服务,允许其他通信量

(11)测试、检查配置好的ACL

四、.

(1)配置访问控制列表语句

(2)配置访问控制组语句

(3与第三步一样

(2)实验结果

实验成功的完成,且得到如下结果:

1.子网192.168.0.1能访问问子网192.168.0.1/24,其他子网则不能访问

2.子网192.168.0.1能访问问子网192.168.0.1/24,其他子网则不能访问

3.个人PC无法PING通路由器,无法访问路由器B上的WWW服务,但其他通行量可以通过

4.个人PC无法PING通路由器,无法访问路由器B上的WWW服务,但其他通行量可以通过

(3)实验报告主要内容

一、.

(1).通过DynamipsGUI运行编写好的.NET网络拓扑文件

(2)配置路由器基本参数

(3)配置路由器和各工作站相应的IP地址、子网掩码等参数,配置路由器A的串行接口serial0/0接口时钟频率为64000

(4).使用ping命令测试PC终端和路由器A之间、路由器A和路由器B之间的连通性

(5)配置路由器上的标准ACL,使得子网192.168.0.0/24中只有192.168.0.1可以访问子网192.168.1.0/24,禁止其他通信量

(6)测试、检查配置好的ACL

二、

(1)配置访问控制列表语句和访问控制组语句

(2)与第一步一样

三、

(1)设计、编写DynamipsGUI所需要的.NET文件

(2)通过DynamipsGUI运行编写好的.NET网络拓扑文件

(3)配置路由器基本参数

(4)配置路由器和各工作站相应的IP地址、子网掩码等参数,配置路由器A的串行接口serial0/0接口时钟频率为64000本参数

(5)使用ping命令测试PC终端和路由器A之间、路由器A和路由器B之间的连通性。

(6)在路由器B的全局配置模式下添加默认路由命令:

iproute0.0.0.00.0.0.0192.168.1.1

(7)在PC终端上测试以HTTP方式、Telnet方式访问路由器B

(8)配置扩展ACL使得PC终端无法ping通路由器B,允许其他通信量

(9)测试、检查配置好的ACL

(10)配置扩展ACL使得PC终端无法访问路由器B上运行的WWW服务,允许其他通信量

(11)测试、检查配置好的ACL

四、

(1)配置访问控制列表语句

(2)配置访问控制组语句

(3与第三步一样

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1