实验三-交换机、路由器配置实验
- 格式:doc
- 大小:731.00 KB
- 文档页数:11
综合实验选做一实验名称:三层交换机和路由器的路由试验目的:掌握三层交换机S V I方式连接路由器的配置方法掌握三层交换机路由的配置功能描述:在分散连接的系统中,在跨交换机环境下,通过划分Vlan,实现属于不同Vlan 的端口不能互相访问,而相同的VLAN内的端口可以互相访问。
背景描述:你们中学校园采用核心、接入两层结构组建的网络,现学校需要将校园网接入互联网,学校在出口使用一台路由器连接互联网。
请做相应配置实现三层交换机和路由器之间的互通,并实现内部网络中V L A N之间的通信。
技术原理:利用三层交换机的路由功能实现VLAN和IP网络的关联。
实验设备:三层交换机一台,路由器一台,二层交换机两台,PC机三台实验拓扑:如下图,IP地址自定实验步骤:实验准备:按照拓扑进行连线。
并进行IP规划。
注意:要保证拓扑中和路由器连接的PC3一直存在,也就是说PC3要占用实验室里面的一台PC。
拓扑中的PC1和PC2可以利用实验室里面的另外一台PC来代替。
步骤1.在交换机SwitchA(2126-1)上创建Vlan 10,并将0/2口划分到Vlan 10 中,在交换机SwitchB(2126-2)上创建Vlan 20,并将0/2口划分到Vlan 20 中。
s2126-1#show vlan 进行查看步骤2.把交换机SwitchA(2126-1)和交换机SwitchB(2126-2)各自通过F0/22口和三层交换机S3760的F0/12口以及F0/22口相连。
并将各自的F0/22接口设定为trunk模式。
通过show vlan命令查看。
参考命令:s2126-1#conf ters2126-1(config)#interface fastethernet0/22s2126-1(config-if)#switch mode trunk步骤3.在三层交换机3760上创建VLAN 10和VLAN 20 和VLAN 30。
将与二层交换机相连接的F0/22和F0/12口,设为trunk模式。
一、实训目的通过本次实训,掌握路由器的基本配置方法,了解路由器在网络中的作用,提高网络设备的配置与管理能力。
二、实训环境1. 路由器:华为AR系列路由器一台2. 交换机:华为S系列交换机一台3. 网线:直通网线若干4. 计算机若干5. 实验室网络环境:模拟企业局域网环境三、实训内容1. 路由器基本配置2. 路由器接口配置3. 路由协议配置4. 静态路由配置5. 动态路由配置6. 路由策略配置7. NAT配置8. 路由器安全配置四、实训步骤1. 路由器基本配置(1)连接路由器与计算机,使用Console线进入路由器配置模式。
(2)配置路由器基本参数,包括主机名、密码等。
(3)配置接口IP地址,确保路由器与交换机之间能够正常通信。
2. 路由器接口配置(1)查看路由器接口信息,了解接口状态。
(2)配置接口VLAN,实现不同VLAN之间的隔离。
(3)配置接口安全特性,如MAC地址绑定、IP源地址过滤等。
3. 路由协议配置(1)配置静态路由,实现不同网络之间的互通。
(2)配置动态路由协议,如RIP、OSPF等,实现网络自动路由。
4. 静态路由配置(1)查看路由表,了解当前网络的路由信息。
(2)配置静态路由,实现特定网络之间的互通。
5. 动态路由配置(1)配置RIP协议,实现网络自动路由。
(2)配置OSPF协议,实现网络自动路由。
6. 路由策略配置(1)配置路由策略,实现特定数据包的转发。
(2)配置策略路由,实现不同数据包的转发。
7. NAT配置(1)配置NAT地址池,实现内部网络访问外部网络。
(2)配置NAT转换,实现内部网络访问外部网络。
8. 路由器安全配置(1)配置ACL,实现访问控制。
(2)配置IPsec VPN,实现远程访问。
(3)配置端口安全,防止未授权访问。
五、实训结果通过本次实训,成功配置了路由器的基本参数、接口、路由协议、静态路由、动态路由、路由策略、NAT和路由器安全配置。
实现了不同网络之间的互通,满足了网络需求。
计算机网络实验课程实验报告
实验名称路由器配置
一、实验目的
1、掌握路由器的基本配置及常用命令;
2、理解网络地址规划的原则及方法。
二、实验所用仪器(或实验环境)
路由器1台,交换机2台,PC机至少4台,RJ45双绞线。
Console控制电缆。
本次使用cisco packet tracer进行仿真。
三、实验基本原理及步骤(或方案设计及理论计算)
1、直连路由:用2个交换机组建两个LAN,用路由器将两个LAN连接;
2、基于三层交换机的VLAN间路由:用1个三层交换机组建两个LAN,用三层交换机的端口路由功能实现VLAN间的路由。
3、单臂路由:用1个二层交换机组建两个LAN,用路由器将两个LAN连接;(选作,有些设备不支持)
4、规划设置PC机的IP地址和掩码。
四、实验数据记录(或仿真及软件设计)
实验一
实验二
实验三
五、实验结果分析及回答问题(或测试环境及测试结果)实验一
实验二实验三
六、心得体会
可以熟练使用常用的路由器的操作指令;对于LAN和VLAN有了更深的理解和认识。
实验交换机和路由器的初始化设置1.交换机的初始化当交换机没有进行配置时,接入超级终端会提示是否以对话方式进行配置,初始化内容主要有IP地址、网关、主机名和口令等。
配置文件是flash:config.text。
2924交换机进入ROM方式是在上电时按住其mode键,本软件是按Ctrl+Break键,出现:switch> ;按Ctrl+Break键switch:reset ;或用boot命令如果有配置文件进入用户模式,否则提交对话:--- System Configuration Dialog ---At any point you may enter a question mark '?' for help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets '[]'.Continue with configuration dialog? [yes/no]:yEnter IP address:10.65.1.8Enter IP netmask:255.255.0.0Would you like to enter a default gateway address? [yes]:IP address of default gateway:Enter host name [Switch]:swaThe enable secret is a one-way cryptographic secret usedinstead of the enable password when it exists.Enter enable secret:aaaWould you like to configure a Telnet password? [yes]:Enter Telnet password:aWould you like to enable as a cluster command switch? [no]:The following configuration command script was created:......Press RETURN to get started.swa>enpassword:aaaswa#copy run start (保存配置信息)swa#dir flash: (查看闪存中的文件)再次进入对话方式:swa#setup2.路由器的初始化路由器初始化与交换机类似,上电时按Ctrl+Break,进入ROM监控状态router> ;用户模式,按Ctrl+Break rommon>reset ;进入ROM监控状态,复位引导(没有配置文件或采用寄存器设置跳过配置文件提示对话信息)Continue with configuration dialog? [yes/no]:yesAt any point you may enter a question mark '?' for help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets '[ ]'.Basic management setup configures only enough connectivityfor management of the system,extended setup will ask youto configure each interface on the systemWould you like to enter basic management setup? [yes/no]:yesConfiguring global parameters:Enter host name [router]:ra回车The enable secret is a password used to protect access toprivileged EXEC and configuration modes. This password,after entered,becomes encrypted in the configuration.Enter enable secret:aaa回车The enable password is used when you do not specify anenable secret password,with some older software versions,and some boot images.Enter enable password:aa回车The virtual terminal password is used to protectaccess to the router over a network interface.Enter virtual terminal password :a回车Enter interface name used to connect to the managementnetwork from the above interface summary:FastEthernet0/0回车Configuring interface FastEthernet0/0:回车Use the 100 Base-TX (RJ-45) connector? [yes]:回车Operate in full-duplex mode? [no]:回车Configure IP on this interface? [yes]:回车IP address for this interface [ ]:10.1.1.1回车Subnet mask for this interface [ ]:255.0.0.0回车[0] Go to the IOS command prompt without saving this config.[1] Return back to the setup without saving this config.[2] Save this configuration to nvram and exit.Enter your selection [2]:回车ra>enpassword aaa (进入特权模式)ra#show run (显示配置信息)ra#w (保存配置信息)ra#dir flash: (显示配置文件)。
实验:串联三层、二层交换机、路由器的配置(二层交换机划分两个VLAN)一、实验介绍:1、实验名称:三层交换机,二层交换机,路由器连通配置2、实验目的:理解二层交换机、三层交换机、路由器串联后,怎样ping通3、实验设备:PC1、PC2、PC3、路由器一个、三层交换机一个、二层交换机一个二、实验拓扑:三、实验步骤1.PC1和路由器的配置:A.PCI配置IP ,:172.16.1.2 掩码:255.255.255.0 网关:172.16.1.1验证:c:\>ipconfigB.路由器F0/0 IP:172.16.1.1 掩码:255.255.255.0F0/1 IP:172.16.2.1 掩码:255.255.255.0>enable 进入特权模式# configure terminal 进入全局模式(config)# interface fastethernet 0/0 进入以太网fa 0/0配置模式(config-if)# ip address 172.16.1.1 255.255.255.0 配置以太网接口0 IP地址、掩码(config-if)# no shutdown 开启端口(config-if)# exit 退回全局模式(config)# interface fastethernet 0/1 进入以太网fa 0/1配置模式(config-if)# ip address 172.16.2.1 255.255.255.0 配置以太网接口1 IP地址、掩码(config-if)# no shutdown 开启端口验证方法:# show running-config 或#show interface serial 2(config-if)# exit 退回全局模式(config)# ip toute 172.16.3.0 255.255.255.0 172.16.2.2 配置3 号网段静态路由(config)# ip toute 172.16.4.0 255.255.255.0 172.16.2.2 配置4 号网段静态路由验证方法:特权模式下打show ip route# write 保存配置2.三层交换机的配置:A.F0/1端口配置IP:172.16.2.2 掩码:255.255.255.0创建VLAN 11 VLAN 22 配置IP:VLAN 11 :172.16.3.1 vlan 22 :172.16.4.1>enable 进入特权模式# configure terminal 进入全局模式(config)# interface fastethernet 0/1 进入以太网fa 0/1配置模式(config-if)# no switchport 端口开启三层交换(config-if)# ip address 172.16.2.2 255.255.255.0 为端口配置IP(config-if)# no shutdown 开启端口(config-if)# exit 退回全局模式(config)# vlan 22 创建vlan 22(config)# vlan 33 创建vlan 33验证:特权模式下打show vlan(config-if)# exit 退回全局模式(config)# interface vlan 22 进入vlan 22 配置模式(config-if)# ip address 172.16.3.1 255.255.255.0 配置vlan 22的IP(config-if)# no shutdown 激活(config)# interface vlan 33 进入vlan 33 配置模式(config-if)# ip address 172.16.4.1 255.255.255.0 配置vlan 33的IP(config-if)# no shutdown 激活(config-if)# exit 退回全局配置模式(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1 添加1 号网段静态路由(config)# interface fastethernet 0/4 进入以太网fa 0/4配置模式(config-if)# switchport mode trunk 设置为干道# write 保存配置验证:# show running-config 或#show interface serial 2路由验证:show ip route3.二层交换机,PC2,PC3的配置:A.二层交换机划分两个vlanB.P C2 IP:172.16.3.2 掩码:255.255.255.0PC2 IP:172.16.4.2 掩码:255.255.255.0二层交换机配置>enable 进入特权模式# configure terminal 进入全局模式(config)# vlan 22 创建vlan 22(config)# vlan 33 创建vlan 33(config)# interface fastethernet 0/2 进入2端口配置模式(config-if)# switchport access vlan 22 将2 端口加入vlan 22(config-if)# exit 退回全局配置模式(config)# interface fastethernet 0/3 进入3端口配置模式(config-if)# switchport access vlan 33 将3 端口加入vlan 33config-if)# exit 退回全局模式(config)# interface fastethernet 0/4 进入4端口配置模式(config-if)# switchport mode trunk 设置为干道# write 保存配置验证:show vlanPC配置A.PC2 IP:172.16.3.2 掩码:255.255.255.0 网关:172.16.3.1 B.PC2 IP:172.16.4.2 掩码:255.255.255.0 网关:172.16.4.14.测试:PCI ping 172.16.1.1 172.16.2.1 172.16.2.2172.16.3.1172.16.4.1172.16.3.2 172.16.4.2PC2 Ping 172.16.3.1 172.16.4.1 172.16.4.2172.16.2.2172.16.2.1172.16.1.1 172.16.1.2PC3 ping 172.16.4.1 172.16.3.1 172.16.3.2172.16.2.2 172.16.2.1172.16.1.1 172.16.1.2。
第1篇一、实验目的本次实验旨在使学生了解和掌握网络配置的基本方法,熟悉网络设备的操作,并能根据实际需求设计简单的网络拓扑结构。
通过实验,学生应能够:1. 熟悉网络设备的操作界面和基本功能。
2. 掌握IP地址的配置方法。
3. 理解子网划分和VLAN的设置。
4. 学会网络路由协议的配置。
5. 了解网络安全的配置方法。
二、实验环境1. 实验设备:一台PC机、一台路由器、一台交换机。
2. 软件环境:Windows操作系统、Packet Tracer 7.3.1模拟器。
三、实验内容1. 网络拓扑设计根据实验要求,设计以下网络拓扑结构:```PC0 <----> 路由器1 <----> 路由器2 <----> 交换机1 <----> PC3^ || || |PC1 <----> 交换机2 <----> PC2```2. IP地址配置为网络中的各个设备配置IP地址、子网掩码和默认网关:- PC0: IP地址 192.168.1.1,子网掩码 255.255.255.0,默认网关 192.168.1.2- 路由器1: 接口1: IP地址 192.168.1.2,子网掩码 255.255.255.0,接口2: IP地址 192.168.2.1,子网掩码 255.255.255.0- 路由器2: 接口1: IP地址 192.168.2.2,子网掩码 255.255.255.0,接口2: IP地址 192.168.3.1,子网掩码 255.255.255.0- 交换机1: 接口1: IP地址 192.168.1.3,子网掩码 255.255.255.0,接口2: IP地址 192.168.2.2,子网掩码 255.255.255.0- PC1: IP地址 192.168.2.2,子网掩码 255.255.255.0,默认网关 192.168.2.1 - PC2: IP地址 192.168.3.2,子网掩码 255.255.255.0,默认网关 192.168.3.1 - PC3: IP地址 192.168.3.3,子网掩码 255.255.255.0,默认网关 192.168.3.1 3. VLAN配置为交换机设置VLAN,并将端口划分到对应的VLAN:- 交换机1: VLAN 10: 接口1,VLAN 20: 接口2- 交换机2: VLAN 10: 接口1,VLAN 20: 接口24. 路由协议配置为路由器配置静态路由和RIP协议:- 路由器1: 静态路由 192.168.3.0/24 下一跳 192.168.2.2- 路由器2: 静态路由 192.168.1.0/24 下一跳 192.168.2.1,RIP协议5. 网络安全配置为路由器配置访问控制列表(ACL):- 路由器1: ACL 100 deny ip any any- 路由器2: ACL 100 deny ip any any四、实验步骤1. 在Packet Tracer中搭建网络拓扑结构。
交换机、路由器综合实验(三)一、实验目的:掌握较复杂网络的交换机和路由器的配置问题。
二、实验环境:Cisco路由器3台;Catalyst 3550交换机1台;PC机3台。
图1说明:三层交换机将内网分割为三个子网192.168.0.0、192.168.1.0、192.168.2.0;路由器R1负责内网与外网的连接,并实现NAT功能;R1、R2、R3之间通过路由协议识别各个网络,由于内网采用了私有IP地址进行编址,它对外网应该是不可见的,所以启用路由协议时不要启用内部网络。
三、实验工具:Boson Netsim模拟器四、实验内容:(1) 按图1所示连接网络;(2) 配置路由器R1:路由器的名字为R1;F0口的IP地址:192.168.0.1/24,设置F0口为NAT输入端;S0口的IP地址:200.1.1.1/24,设置S0口为NAT输出端;配置NAT池,地址范围为200.1.1.10~200.1.1.20,将内网中格式为192.168.*.* 的IP 地址转换为NAT池中的IP地址;配置静态路由,将目的网络为192.168.1.0 或192.168.2.0 的数据报发往192.168.0.2;配置OSPF路由协议,区域号为10,在它的外网地址上启用协议。
(3) 配置路由器R2:路由器的名字为R2;S0口的IP地址:222.2.2.1/24;S1口的IP地址:200.1.1.2/24;配置OSPF路由协议,区域号为10,在它的所有直连网络上启用协议。
(4) 配置路由器R3:路由器的名字为R3;F0口的IP地址:18.1.1.1/8;S0口的IP地址:222.2.2.2/24;配置OSPF路由协议,区域号为10,在它的所有直连网络上启用协议。
(5) 配置三层交换机:把F0/1口设置为三层路由口,IP地址为192.168.0.2/24;把F0/2口设置为三层路由口,IP地址为192.168.1.1/24;把F0/3口设置为三层路由口,IP地址为192.168.2.1/24;配置默认路由,方向为R1路由器的F0口;启用路由功能。
路由一配置:Router(config)#host R1R1(config-line)#exitR1(config)#in e0/0R1(config-if)#ip add 192.168.1.1 255.255.255.252R1(config-if)#no shutR1(config-if)#in e0/1R1(config-if)#ip add 172.16.128.1 255.255.255.0R1(config-if)#no shutR1(config-if)#in e0/2R1(config-if)#ip add 172.16.130.1 255.255.255.0R1(config-if)#no shutR1(config-if)#in e0/3R1(config-if)#ip add 172.16.138.1 255.255.255.0R1(config-if)#no shutR1(config-if)#router ospf 1R1(config-router)#network 192.168.1.0 0.0.0.3 area 1R1(config-router)#exitR1(config)#router ripR1(config-router)#network 172.16.0.0R1(config-router)#exitR1(config)#do show ip ospf neighbor2192.168.2.251/28 R2上学习到的192.168.3.0的路由只能有一条Neighbor ID Pri State Dead Time Address Interface 192.168.2.251 1 FULL/DR 00:00:36 192.168.1.2 Ethernet0/0 R1(config)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 3 subnetsC 172.16.138.0 is directly connected, Ethernet0/3C 172.16.128.0 is directly connected, Ethernet0/1C 172.16.130.0 is directly connected, Ethernet0/2192.168.1.0/30 is subnetted, 1 subnetsC 192.168.1.0 is directly connected, Ethernet0/0192.168.2.0/28 is subnetted, 1 subnetsO IA 192.168.2.240 [110/20] via 192.168.1.2, 00:01:33, Ethernet0/0192.168.3.0/24 is variably subnetted, 2 subnets, 2 masksO IA 192.168.3.0/25 [110/40] via 192.168.1.2, 00:01:09, Ethernet0/0O IA 192.168.3.248/30 [110/30] via 192.168.1.2, 00:01:23, Ethernet0/0R1(config)#router ospf 1R1(config-router)#redistribute rip subnets metric 30 metric-type 1R1(config-router)#exitR1(config)#router ripR1(config-router)#redistribute ospf 1 metric 2R1(config-router)#passive-interface e0/0R1(config-router)#exitR1(config)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 3 subnetsC 172.16.138.0 is directly connected, Ethernet0/3C 172.16.128.0 is directly connected, Ethernet0/1C 172.16.130.0 is directly connected, Ethernet0/210.0.0.0/24 is subnetted, 1 subnetsO E1 10.1.1.0 [110/60] via 192.168.1.2, 00:01:38, Ethernet0/0 192.168.1.0/30 is subnetted, 1 subnetsC 192.168.1.0 is directly connected, Ethernet0/0192.168.2.0/28 is subnetted, 1 subnetsO IA 192.168.2.240 [110/20] via 192.168.1.2, 00:03:35, Ethernet0/0 192.168.3.0/24 is variably subnetted, 2 subnets, 2 masksO IA 192.168.3.0/25 [110/40] via 192.168.1.2, 00:03:35, Ethernet0/0O IA 192.168.3.248/30 [110/30] via 192.168.1.2, 00:03:35, Ethernet0/0 R1(config)#do ping 10.1.1.1 source 172.16.130.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:Packet sent with a source address of 172.16.130.1Success rate is 100 percent (5/5), round-trip min/avg/max = 96/172/300 ms R1(config)#router ospf 1R1(config-router)#area 1 nssaR1(config-router)#summary-address 172.16.128.0 255.255.240.0R1(config-router)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 192.168.1.2 to network 0.0.0.0172.16.0.0/16 is variably subnetted, 4 subnets, 2 masksC 172.16.138.0/24 is directly connected, Ethernet0/3C 172.16.128.0/24 is directly connected, Ethernet0/1O 172.16.128.0/20 is a summary, 00:01:04, Null0C 172.16.130.0/24 is directly connected, Ethernet0/2192.168.1.0/30 is subnetted, 1 subnetsC 192.168.1.0 is directly connected, Ethernet0/0O*IA 0.0.0.0/0 [110/11] via 192.168.1.2, 00:02:55, Ethernet0/0注:只有在重发布以后才可运行NSSA,NSSA的配置必须是双向的路由二配置:Router(config)#host R2R2(config)#in e0/0R2(config-if)#ip add 192.168.1.2 255.255.255.252R2(config-if)#no shutR2(config-if)#in e0/1R2(config-if)#ip add 192.168.2.251 255.255.255.240R2(config-if)#no shutR2(config-if)#router ospf 1R2(config-router)#network 192.168.2.240 0.0.0.15 area 0R2(config-router)#network 192.168.1.0 0.0.0.3 area 1R2(config-router)#exitR2(config)#do show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface 192.168.3.249 1 FULL/DR 00:00:37 192.168.2.243 Ethernet0/1 192.168.1.1 1 FULL/BDR 00:00:31 192.168.1.1 Ethernet0/0 R2(config)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set192.168.1.0/30 is subnetted, 1 subnetsC 192.168.1.0 is directly connected, Ethernet0/0192.168.2.0/28 is subnetted, 1 subnetsC 192.168.2.240 is directly connected, Ethernet0/1192.168.3.0/24 is variably subnetted, 2 subnets, 2 masksO IA 192.168.3.0/25 [110/30] via 192.168.2.243, 00:01:22, Ethernet0/1O IA 192.168.3.248/30 [110/20] via 192.168.2.243, 00:01:37, Ethernet0/1R2(config)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 3 subnetsO E1 172.16.138.0 [110/40] via 192.168.1.1, 00:01:48, Ethernet0/0O E1 172.16.128.0 [110/40] via 192.168.1.1, 00:01:48, Ethernet0/0O E1 172.16.130.0 [110/40] via 192.168.1.1, 00:01:48, Ethernet0/010.0.0.0/24 is subnetted, 1 subnetsO E1 10.1.1.0 [110/50] via 192.168.2.243, 00:01:48, Ethernet0/1 192.168.1.0/30 is subnetted, 1 subnetsC 192.168.1.0 is directly connected, Ethernet0/0192.168.2.0/28 is subnetted, 1 subnetsC 192.168.2.240 is directly connected, Ethernet0/1192.168.3.0/24 is variably subnetted, 2 subnets, 2 masksO IA 192.168.3.0/25 [110/30] via 192.168.2.243, 00:03:45, Ethernet0/1 O IA 192.168.3.248/30 [110/20] via 192.168.2.243, 00:03:45, Ethernet0/1 R2(config)#router ospf 1R2(config-router)#area 1 nssa no-summaryR2(config-router)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.16.0.0/20 is subnetted, 1 subnetsO N1 172.16.128.0 [110/40] via 192.168.1.1, 00:01:09, Ethernet0/010.0.0.0/24 is subnetted, 1 subnetsO E1 10.1.1.0 [110/50] via 192.168.2.243, 00:01:09, Ethernet0/1 192.168.1.0/30 is subnetted, 1 subnetsC 192.168.1.0 is directly connected, Ethernet0/0192.168.2.0/28 is subnetted, 1 subnetsC 192.168.2.240 is directly connected, Ethernet0/1O IA 192.168.3.0/24 [110/20] via 192.168.2.243, 00:01:14, Ethernet0/1路由三配置:Router(config)#host R3R3(config)#in e0/1R3(config-if)#ip add 192.168.2.243 255.255.255.240R3(config-if)#no shutR3(config-if)#in e0/2R3(config-if)#ip add 192.168.3.249 255.255.255.252R3(config-if)#no shutR3(config-if)#router ospf 1R3(config-router)#network 192.168.3.248 0.0.0.3 area 2R3(config-router)#network 192.168.2.240 0.0.0.15 area 0R3(config-router)#do show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface 192.168.2.251 1 FULL/DR 00:00:32 192.168.2.251 Ethernet0/1 192.168.3.250 1 FULL/BDR 00:00:36 192.168.3.250 Ethernet0/2 R3(config-router)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set192.168.1.0/30 is subnetted, 1 subnetsO IA 192.168.1.0 [110/20] via 192.168.2.251, 00:01:31, Ethernet0/1192.168.2.0/28 is subnetted, 1 subnetsC 192.168.2.240 is directly connected, Ethernet0/1192.168.3.0/24 is variably subnetted, 2 subnets, 2 masksO 192.168.3.0/25 [110/20] via 192.168.3.250, 00:01:31, Ethernet0/2C 192.168.3.248/30 is directly connected, Ethernet0/2R3(config-router)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 3 subnetsO E1 172.16.138.0 [110/50] via 192.168.2.251, 00:02:01, Ethernet0/1O E1 172.16.128.0 [110/50] via 192.168.2.251, 00:02:01, Ethernet0/1O E1 172.16.130.0 [110/50] via 192.168.2.251, 00:02:01, Ethernet0/110.0.0.0/24 is subnetted, 1 subnetsO E1 10.1.1.0 [110/40] via 192.168.3.250, 00:02:01, Ethernet0/2192.168.1.0/30 is subnetted, 1 subnetsO IA 192.168.1.0 [110/20] via 192.168.2.251, 00:02:01, Ethernet0/1 192.168.2.0/28 is subnetted, 1 subnetsC 192.168.2.240 is directly connected, Ethernet0/1192.168.3.0/24 is variably subnetted, 2 subnets, 2 masksO 192.168.3.0/25 [110/20] via 192.168.3.250, 00:02:01, Ethernet0/2 C 192.168.3.248/30 is directly connected, Ethernet0/2R3(config-router)#area 2 nssa no-summaryR3(config-router)#area 2 range 192.168.3.0 255.255.255.0R3(config-router)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.16.0.0/20 is subnetted, 1 subnetsO E1 172.16.128.0 [110/50] via 192.168.2.251, 00:03:59, Ethernet0/110.0.0.0/24 is subnetted, 1 subnetsO N1 10.1.1.0 [110/50] via 192.168.3.250, 00:03:59, Ethernet0/2 192.168.1.0/30 is subnetted, 1 subnetsO IA 192.168.1.0 [110/20] via 192.168.2.251, 00:03:59, Ethernet0/1 192.168.2.0/28 is subnetted, 1 subnetsC 192.168.2.240 is directly connected, Ethernet0/1192.168.3.0/24 is variably subnetted, 3 subnets, 3 masksO 192.168.3.0/25 [110/20] via 192.168.3.250, 00:03:59, Ethernet0/2 O 192.168.3.0/24 is a summary, 00:03:59, Null0C 192.168.3.248/30 is directly connected, Ethernet0/2路由四配置:Router(config)#host R4R4(config)#in e0/2R4(config-if)#ip add 192.168.3.250 255.255.255.252R4(config-if)#no shutR4(config-if)#in e0/1R4(config-if)#ip add 192.168.3.1 255.255.255.128R4(config-if)#no shutR4(config-if)#in e0/0R4(config-if)#ip add 10.1.1.1 255.255.255.0R4(config-if)#no shutR4(config-if)#router ospf 1R4(config-router)#network 192.168.3.248 0.0.0.3 area 2R4(config-router)#network 192.168.3.0 0.0.0.127 area 2R4(config-router)#exitR4(config)#router ripR4(config-router)#network 10.0.0.0R4(config-router)#exitR4(config)#do show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface 192.168.3.249 1 FULL/BDR 00:00:36 192.168.3.249 Ethernet0/2 R4(config)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Ethernet0/0192.168.1.0/30 is subnetted, 1 subnetsO IA 192.168.1.0 [110/30] via 192.168.3.249, 00:01:36, Ethernet0/2192.168.2.0/28 is subnetted, 1 subnetsO IA 192.168.2.240 [110/20] via 192.168.3.249, 00:01:36, Ethernet0/2 192.168.3.0/24 is variably subnetted, 2 subnets, 2 masksC 192.168.3.0/25 is directly connected, Ethernet0/1C 192.168.3.248/30 is directly connected, Ethernet0/2R4(config)#router ospf 1R4(config-router)#redistribute rip subnets metric 30 metric-type 1R4(config-router)#exitR4(config)#router ripR4(config-router)#redistribute ospf 1 metric 2R4(config-router)#passive-interface e0/2R4(config-router)#exitR4(config)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 3 subnetsO E1 172.16.138.0 [110/60] via 192.168.3.249, 00:01:19, Ethernet0/2O E1 172.16.128.0 [110/60] via 192.168.3.249, 00:01:19, Ethernet0/2O E1 172.16.130.0 [110/60] via 192.168.3.249, 00:01:19, Ethernet0/210.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Ethernet0/0192.168.1.0/30 is subnetted, 1 subnetsO IA 192.168.1.0 [110/30] via 192.168.3.249, 00:01:19, Ethernet0/2 192.168.2.0/28 is subnetted, 1 subnetsO IA 192.168.2.240 [110/20] via 192.168.3.249, 00:01:19, Ethernet0/2 192.168.3.0/24 is variably subnetted, 2 subnets, 2 masksC 192.168.3.0/25 is directly connected, Ethernet0/1C 192.168.3.248/30 is directly connected, Ethernet0/2R4(config)#do ping 172.16.138.1 source 10.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.138.1, timeout is 2 seconds: Packet sent with a source address of 10.1.1.1Success rate is 100 percent (5/5), round-trip min/avg/max = 96/168/260 ms R4(config)#router ospf 1R4(config-router)#area 2 nssa no-summaryR4(config-router)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 192.168.3.249 to network 0.0.0.010.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Ethernet0/0192.168.3.0/24 is variably subnetted, 2 subnets, 2 masksC 192.168.3.0/25 is directly connected, Ethernet0/1C 192.168.3.248/30 is directly connected, Ethernet0/2O*IA 0.0.0.0/0 [110/11] via 192.168.3.249, 00:05:56, Ethernet0/2R4(config-router)#do ping 172.16.130.1 source 10.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.130.1, timeout is 2 seconds:Packet sent with a source address of 10.1.1.1Success rate is 100 percent (5/5), round-trip min/avg/max = 100/193/312 ms实验步骤总结:R1 1、OSPF ,RIP 2、查看邻接关系3、重发布4、完全NSSA5、地址汇总R2 1、OSPF 2、查看邻接关系3、完全NSSAR3 1、OSPF 2、查看邻接关系3、完全NSSA 4、地址汇总R4 1、OSPF ,RIP 2、查看邻接关系3、重发布4、完全NSSA。
三层交换实验报告三层交换实验报告一、实验目的本次实验的目的是通过搭建一个三层交换网络,探究其在数据传输中的优势和应用场景。
通过实验,我们将深入了解三层交换的工作原理、配置方法以及网络性能的提升。
二、实验环境本次实验所使用的设备包括三层交换机、路由器和PC机。
三层交换机采用了Cisco的Catalyst系列,路由器采用了Cisco的ISR系列。
PC机作为终端设备,用于发送和接收数据。
三、实验过程1. 配置三层交换机首先,我们需要在三层交换机上进行基本配置。
通过命令行界面,我们可以设置交换机的IP地址、子网掩码和默认网关。
这样,交换机就能够与其他设备进行通信。
2. 配置路由器接下来,我们需要在路由器上进行配置。
通过命令行界面,我们可以设置路由器的IP地址、子网掩码和默认网关。
此外,我们还需要配置路由表,以便路由器能够正确地转发数据包。
3. 连接设备在完成配置后,我们需要将三层交换机、路由器和PC机进行连接。
通过使用网线将它们连接起来,我们可以建立一个局域网。
在局域网中,三层交换机负责交换数据包,路由器负责转发数据包,PC机作为终端设备进行数据的发送和接收。
4. 测试网络性能在搭建好网络之后,我们可以进行性能测试。
通过发送大量的数据包,我们可以测试网络的吞吐量和延迟。
三层交换机的优势在于它能够根据目的IP地址来转发数据包,从而提高网络的传输效率。
而传统的二层交换机只能根据MAC 地址来转发数据包,效率较低。
四、实验结果经过测试,我们发现三层交换机在数据传输中的确具有一定的优势。
相比于传统的二层交换机,三层交换机能够更快地转发数据包,从而提高了网络的传输效率。
此外,三层交换机还支持更多的网络协议,可以满足更多的应用需求。
五、实验总结通过本次实验,我们深入了解了三层交换的工作原理和配置方法。
三层交换机在现代网络中扮演着重要的角色,它能够提高网络的传输效率和性能。
在实际应用中,我们可以将三层交换机应用于大型企业网络、数据中心等场景,以满足高速、大容量的数据传输需求。
实验三-交换机、路由器配置实验数据通信与计算机网络实验报告实验三交换机、路由器配置实验学院计算机与电子信息学院专业电子信息工程班级电信?? -?班姓名学号指导教师崔得龙实验报告评分:_______实验三交换机、路由器配置实验一、实验目的1.学习路由器的基本连接和配置方法,了解路由器在网络互连中的作用;2.掌握子网划分方法和子网地址计算;3.学习局域网互连、局域网与广域网互连的方法,了解构建小型计算机网络的基本知识;4.熟悉Cisco Catalyst 1924以太交换机特性;5.掌握Cisco Catalyst 1924以太交换机基本配置方法。
二、实验内容1.熟悉模拟软件的运行环境及操作方法;2.路由器的配置与管理;3.交换机的配置与管理。
三、实验原理1. 路由器是一种计算机网络互连设备,用于实现计算机局域网和广域网的互连,或多个局域网通过广域网互连。
路由器具有路由选择的功能,实现OSI参考模型的网络层功能。
路由器利用互连协议将多个逻辑子网连接,利用路由协议,根据信息包的目的地址进行路由选择,选择最佳路由,来实现数据包的有效传送。
Cisco路由器主要有局域网接口、广域网接口等。
局域网接口主要有以太网接口、令牌环网接口、快速以太网接口、FDDI等,与广域网的连接通过串行接口实现。
串行接口使用专用电缆和DCE相连,与广域网建立连接,利用广域网的传输能力实现网络互连。
Cisco路由器配置可通过控制台终端、虚拟终端、图形网络管理软件、TFTP服务器等方式实现,本实验通过模拟软件模拟通过控制台使用命令行接口,了解Cisco IOS的使用,对路由器接口、路由器协议进行配置,将多个路由器连接,构成小型网络,并实现局域网之间通过路由器通信。
2. 交换机就是一种在通信系统中完成信息交换功能的设备。
交换机的主要功能包括物理编址、网络拓扑结构、错误校验、帧序列以及流量控制。
目前一些高档交换机还具备了一些新的功能,如对VLAN(虚拟局域网)的支持、对链路汇聚的支持,甚至有的还具有路由和防火墙的功能。
交换机除了能够连接同种类型的网络之外,还可以在不同类型的网络(如以太网和快速以太网)之间起到互连作用。
如今许多交换机都能够提供支持快速以太网或FDDI等的高速连接端口,用于连接网络中的其它交换机或者为带宽占用量大的关键服务器提供附加带宽。
本实验通过模拟软件模拟通过控制台使用命令行接口,了解Cisco 1900交换机的配置与管理方法,并使之与路由器等构成小型网络,实现局域网之间数据交换。
3. 网络拓扑结构图四、实验仪器计算机45台、集线器4台、网卡45块、网线条、软盘若干。
五、实验步骤1.将模拟软件拷贝到计算机硬盘,熟悉模拟软件的运行环境及界面,察看帮助文件。
2.完成模拟软件提供的实验lab4的全部内容,分析实验结果。
3.完成模拟软件提供的实验lab6的全部内容,分析实验结果。
4.完成模拟软件提供的实验lab5的全部内容,分析实验结果。
5.自己根据情况,学习一些其他命令行命令的使用。
六、实验内容:(一)lab4实验内容:1)进入privileged模式 Chicago>en2)设置路由器名: Chicago#config t->hostname Chigaco3)设置登陆界面模式: hicago(config)#banner motd#4)设置登端口: RA(config)# interface e05)端口映射描述: Chicago(config-if)#no shut6)设置端口通信带宽: Chicago(config-if)#(二)lab5实验内容:交换机配置:点击1900 switch,按下k,回车得到>,>enable 回车,则进入特权模式运用show run,show versin则可以查到相应信息键入:#config t(config)#hostname 1900A则可以设置路由器名查看ip1900A(config)#^Z1900A#show ip设ip,子网掩码,ip默认网关1900A#config t1900A(config)#ip address 172.16.10.3 255.255.255.01900A(config)#ip default-gateway 172.16.10.1查看相关信息1900A(config)#^Z1900A#show ip1900A#ping 172.16.10.11900A#show mac-address-table1900A#show run1900A#delete nvram(三)lab6实验内容:路由器配置:Router>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname RouterARouterA(config)#int e0RouterA(config-if)#ip address 172.16.10.1 255.255.255.0RouterA(config-if)#no shut%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up %LINK-3-UPDOWN: Interface Ethernet0, changed state to upRouterA(config-if)#int s0RouterA(config-if)#ip address 172.16.20.1 255.255.255.0RouterA(config-if)#no shut%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up %LINK-3-UPDOWN: Interface Serial0, changed state to upRouterA(config-if)#int to0RouterA(config-if)#ip address 172.16.15.1 255.255.255.0RouterA(config-if)#ring-speed 16RouterA(config-if)#no shut%LINEPROTO-5-UPDOWN: Line protocol on Interface TokenRing0, changed state to up %LINK-3-UPDOWN: Interface TokenRing0, changed state to upRouterA(config-if)#exitRouterA(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleRouterA#config tEnter configuration commands, one per line. End with CNTL/Z.RouterA(config)#ip route 172.16.30.0 255.255.255.0 172.16.20.2RouterA(config)#ip route 172.16.40.0 255.255.255.0 172.16.20.2RouterA(config)#ip route 172.16.50.1 255.255.255.0 172.16.20.2RouterA(config)#ip route 172.16.50.0 255.255.255.0 172.16.20.2RouterA(config)#ip route 172.16.55.0 255.255.255.0 172.16.20.2RouterA(config)#路由器B、C与A配置类同。
设置静态路由器把三个路由器连成一个网络:RouterA# config tRouterA(config)# ip route 172.16.30.0 255.255.255.0 172.16.20.2 RouterA(config)# ip route 172.16.40.0 255.255.255.0 172.16.20.2 RouterA(config)# ip route 172.16.50.0 255.255.255.0 172.16.20.2 RouterA(config)# ip route 172.16.55.0 255.255.255.0 172.16.20.2 数据检测:双击HostB,键入:双击HostA,键入:Ping 172.16.50.1 回车Pinging 172.16.50.1 with 32 bytes of data:Reply from 172.16.50.1; bytes=32 time=22ms TTL=254Reply from 172.16.50.1; bytes=32 time=23ms TTL=254Reply from 172.16.50.1; bytes=32 time=23ms TTL=254Reply from 172.16.50.1; bytes=32 time=22ms TTL=254Ping statistics for 172.16.50.1:Packet: sent=4 Received=4,Lost= 0(0% Loss) Approximate round trip times in milli-seconds;Minimum=22ms maximum=23ms Average=22msA ping B,CB ping A,C七、实验总结本次交换机、路由器配置实验,主要学习路由器的基本连接和配置方法,了解路由器在网络互连中的作用;掌握子网划分方法和子网地址计算;学习局域网互连、局域网与广域网互连的方法,了解构建小型计算机网络的基本知识;熟悉Cisco Catalyst 1924以太交换机特性;掌握Cisco Catalyst 1924以太交换机基本配置方法。
学到了很多知识,收获很大。