实验三 交换机的基本配置

合集下载

实验三 交换机端口的基本配置

实验三     交换机端口的基本配置

实验三交换机端口的基本配置【实验名称】交换机端口的基本配置【实验目的】掌握交换机端口的常用配置参数【背景描述】你是某公司网管,现公司有部分主机网卡属于10Mbit/s网卡,传输模式为半双工,为了能够实现主机之间的正常访问,现把和主机相连的交换机端口速率设为100Mbit/s,传输模式设为半双工,并开启端口进行数据的转发。

【技术原理】锐捷全系列交换机Fastethernet接口默认情况下10Mbit/s或100Mbit/s自适应端口,双工模式也为自适应。

默认情况下,所有交换机端口均开启。

锐捷全系列交换机Fastethernet接口支持端口速率、双工模式的配置。

【实现功能】配置交换机端口的速率,双工模式,并进行有效查看。

【实验设备】S2126(1台0)、主机(1台)、直连线(1条)【实验拓扑】【实验步骤】步骤1.交换机端口参数的配置。

switch> enable 14psd:starswitch# configure terminalswitch(config)#interface fastethernet 0/3 !进行F0/3的端口模式switch(config-if)# speed 10 !配置端口速率为10Mswitch(config-if)#duplex half !配置端口的双工模式为半双工switch(config-if)#no shutdown !开启该端口,使端口转发数据配置端口速率参数有100(100Mbit/s)、10(10Mbit/s)、auto(自适应),默认是auto。

配置双工模式有full(全双工)、half(半双工)、auto(自适应),默认是auto。

步骤2.查看交换机端口的配置信息Switch# show interface fastethernet 0/3Interface:FastEthernet100BaseTX0/3Description:AdminiStatus:up !查看端口的状态OperStatus:upHardware:10/100BaseTXMtu:1500LastChange:0d:0h:0m:0sAdminDuplex:Half!查看配置的双工模式operDuplex:AdminSpeed:10!查看配置的速率operSpeed: UnknowFlowControlAdminStatus:offFlowControlOperStatus:offPriority:0Broadcast blocked:DISABLEUnknow multicast blocked:DISABLEUnkowm unticast blocked:DISABLE【注意事项】交换机端口在默认情况下是开启的,AdminStatus是UP状态,如果这端口没有实际连接其他设备,OperStatus是down状态。

交换机的基本配置实验报告

交换机的基本配置实验报告

交换机的基本配置实验报告交换机的基本配置实验报告一、实验目的本实验旨在探索交换机的基本配置,并了解其在网络中的重要作用。

通过实际操作,加深对交换机的理解,掌握其基本配置方法和技巧。

二、实验原理交换机是一种用于连接计算机网络中多个设备的网络设备。

它能够根据目的地址将数据包转发到相应的目标设备,提高网络传输效率和安全性。

三、实验步骤1. 连接交换机:将交换机与计算机通过网线连接,确保物理连接正常。

2. 登录交换机:打开计算机上的终端软件,通过串口或Telnet方式登录交换机的控制台界面。

3. 配置基本信息:在控制台界面中,输入用户名和密码进行登录。

进入交换机的配置模式后,设置交换机的主机名、IP地址、子网掩码等基本信息,以便进行后续配置。

4. 配置端口:根据实际需求,对交换机的端口进行配置。

可以设置端口的速率、双工模式、VLAN等参数,以适应不同的网络环境和设备需求。

5. 配置VLAN:通过创建和配置虚拟局域网(VLAN),将交换机的端口划分为不同的广播域,增强网络的安全性和管理能力。

6. 配置链路聚合:通过将多个物理链路绑定为一个逻辑链路,提高链路的带宽和冗余性,增加网络的可靠性。

7. 配置STP:通过启用生成树协议(STP),防止网络中出现环路,避免广播风暴和数据包冲突,提高网络的稳定性。

8. 配置ACL:通过访问控制列表(ACL),对网络流量进行过滤和控制,保护网络的安全性和隐私。

9. 保存配置:在完成交换机的基本配置后,及时保存配置文件,以便下次启动时自动加载。

四、实验结果通过以上步骤,成功完成了交换机的基本配置。

经过测试,交换机能够正常工作,并能够按照配置的规则进行数据包的转发和处理。

各个端口、VLAN、链路聚合等功能也能够正常运行。

五、实验总结本次实验通过实际操作,深入了解了交换机的基本配置方法和技巧。

交换机作为网络中重要的设备,其配置对于网络的性能和安全至关重要。

合理配置交换机的端口、VLAN、链路聚合等参数,能够提高网络的传输效率和可靠性,增强网络的安全性和管理能力。

交换机基本配置实验报告

交换机基本配置实验报告

一、实验目的本次实验旨在通过对交换机进行基本配置,使学生掌握交换机的基本功能和操作方法,了解交换机的工作原理,为今后的网络管理和维护工作打下基础。

二、实验环境1. 实验设备:三层交换机一台2. 实验软件:网络仿真软件(如Cisco Packet Tracer)3. 实验工具:网络仿真软件配套的虚拟网络设备三、实验内容1. 交换机的基本操作2. 交换机的基本配置3. 交换机的安全配置四、实验步骤1. 交换机的基本操作(1)启动交换机,并进入用户模式。

(2)查看交换机的版本信息、硬件信息等。

(3)进入特权模式,进行高级配置。

(4)退出特权模式,返回用户模式。

2. 交换机的基本配置(1)配置交换机的主机名。

(2)配置交换机的登录信息,包括用户名和密码。

(3)配置交换机的VLAN信息。

(4)配置交换机的端口信息,包括端口描述、VLAN分配等。

3. 交换机的安全配置(1)配置交换机的访问控制列表(ACL),限制访问权限。

(2)配置交换机的SSH功能,提高远程登录的安全性。

(3)配置交换机的Telnet功能,允许远程登录。

五、实验结果与分析1. 交换机的基本操作通过实验,学生掌握了交换机的基本操作,包括启动、进入用户模式、查看设备信息、进入特权模式等。

2. 交换机的基本配置(1)配置交换机的主机名。

实验结果显示,交换机成功设置了主机名,并在后续操作中正确显示。

(2)配置交换机的登录信息。

实验结果显示,交换机成功设置了用户名和密码,并验证了登录信息。

(3)配置交换机的VLAN信息。

实验结果显示,交换机成功创建了VLAN,并将端口分配到了对应的VLAN。

(4)配置交换机的端口信息。

实验结果显示,交换机成功设置了端口描述和VLAN分配,并验证了端口信息。

3. 交换机的安全配置(1)配置交换机的ACL。

实验结果显示,交换机成功配置了ACL,并验证了访问权限。

(2)配置交换机的SSH功能。

实验结果显示,交换机成功配置了SSH功能,并验证了远程登录的安全性。

交换机虚拟局域网(VLAN)基本配置(与“交换机”有关的文档共9张)

交换机虚拟局域网(VLAN)基本配置(与“交换机”有关的文档共9张)

Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#interface fastethernet 0/2或int f0/2
Switch(config-if)#switchport access vlan 20
第一页,共9页。
实验三 交换机虚拟局域网 (VLAN)基本配置
【实验拓扑】
交换机
1234
广播帧
VLAN20
广播帧
交换机收到广 播帧后,只转 发到属于同一 VLAN 的 其 他 端口。
VLAN30
广播域
图1
第二页,共9页。
广播域
实验三 交换机虚拟局域网 (VLAN)基本配置
【实验拓扑续】
以太网交换机
步骤3.在交换机上创建VLAN;
Switch#configure terminal或conf t !进入全局配置模式命令
Switch(config)#vlan 20
!在交换机上创建VLAN 20
Switch(config-vlan)#exit
!返回上一层模式
Switch(config)#vlan 30
Port 1 Port 2 Port 3 Port 4
主机A
主机B
主机C
主机D
图1(续)
第三页,共9页。
VLAN表
端口
所属VLAN
Port 1
VLPort 4
VLAN 20 VLAN 30 VLAN 30
……
……
…… ……
实验三 交换机虚拟局域网 (VLAN)基本配置
上理述解操 VL作AN将和交IE换步E机E8骤10口22和. 2.口划在入未VLA划N2分0,V同A理L可N将前交换两机3台口和交4口换划入机VL上AN3四0。台PC均可以互相Ping通; 上述操作将交换步机骤1口3和2.口划分入别VLA在N2两0,台同理交可换将交机换机上3口创和建4口V划L入AVNLA,N30并。 将接口划入VLAN; 步骤4.在两台交换机上均按照如下命令操作; Switch(config-if)#switchport access vlan 20

交换机基本配置实验报告

交换机基本配置实验报告

交换机基本配置实验报告交换机基本配置实验报告一、实验目的本次实验的目的是学习交换机的基本配置,并掌握交换机的基本功能和操作。

二、实验设备1. 一台交换机2. 两台电脑3. 两根网线三、实验步骤1. 连接设备将两台电脑分别与交换机通过网线连接起来,确保连接无误。

2. 登录交换机打开电脑上的终端仿真软件,通过串口或者网口连接到交换机上。

输入正确的用户名和密码,成功登录交换机。

3. 设置主机名在交换机的命令行界面中,输入以下命令来设置交换机的主机名:Switch> enableSwitch# configure terminalSwitch(config)# hostname MySwitchMySwitch(config)#4. 配置管理IP地址在交换机的命令行界面中,输入以下命令来配置管理IP地址:MySwitch(config)# interface vlan 1MySwitch(config-if)# ip address 192.168.0.1 255.255.255.0 MySwitch(config-if)# no shutdownMySwitch(config-if)# exitMySwitch(config)#5. 配置端口在交换机的命令行界面中,输入以下命令来配置端口:MySwitch(config)# interface fastEthernet 0/1MySwitch(config-if)# switchport mode accessMySwitch(config-if)# switchport access vlan 1MySwitch(config-if)# exitMySwitch(config)#6. 配置VLAN在交换机的命令行界面中,输入以下命令来配置VLAN:MySwitch(config)# vlan 10MySwitch(config-vlan)# name SalesMySwitch(config-vlan)# exitMySwitch(config)# vlan 20MySwitch(config-vlan)# name MarketingMySwitch(config-vlan)# exitMySwitch(config)#7. 配置端口成员在交换机的命令行界面中,输入以下命令来配置端口成员:MySwitch(config)# interface fastEthernet 0/2MySwitch(config-if)# switchport mode accessMySwitch(config-if)# switchport access vlan 10MySwitch(config-if)# exitMySwitch(config)# interface fastEthernet 0/3MySwitch(config-if)# switchport mode accessMySwitch(config-if)# switchport access vlan 20MySwitch(config-if)# exitMySwitch(config)#8. 保存配置在交换机的命令行界面中,输入以下命令来保存配置:MySwitch(config)# exitMySwitch# copy running-config startup-config四、实验结果通过以上配置,我们成功地完成了交换机的基本配置。

交换机实验实验报告

交换机实验实验报告

交换机实验实验报告1. 引言交换机是计算机网络中常见的网络设备之一,其作用是在局域网中实现包的转发和交换。

本实验旨在深入了解交换机的工作原理和功能,并通过实验验证其在网络通信中的作用。

2. 实验目的- 了解交换机的基本工作原理和功能- 掌握交换机的配置和管理方法- 验证交换机在网络通信中的作用3. 实验设备- 交换机- 计算机4. 实验步骤步骤一:交换机的基本配置首先,将交换机与计算机通过网线相连。

然后,通过计算机的网卡配置界面,设置计算机的IP地址和子网掩码。

接下来,打开交换机的管理界面,进入交换机的配置模式。

在配置模式下,设置交换机的IP地址、子网掩码和网关。

保存配置并重启交换机。

步骤二:交换机的端口配置进入交换机的管理界面,配置交换机的端口参数。

设置端口的速率、双工模式等参数,确保交换机能够正常工作。

步骤三:交换机的VLAN配置在交换机的管理界面中,设置VLAN(虚拟局域网)参数。

创建VLAN并将不同端口划分到不同的VLAN中,以实现不同VLAN 之间的隔离和通信。

步骤四:交换机的链路聚合配置在交换机的管理界面中,设置链路聚合(Link Aggregation)参数。

通过将多个端口绑定在一起,实现带宽的合并,提高网络性能和可靠性。

步骤五:实验验证交换机功能通过在不同VLAN中的计算机之间进行通信测试,验证交换机的VLAN功能。

同时,通过启用链路聚合,测试网络的带宽和传输性能是否得到提升。

5. 实验结果与分析通过实验,我们成功配置了交换机的基本参数,包括IP地址、子网掩码和网关。

同时,我们针对不同的需求创建了不同的VLAN,并成功将端口划分到相应的VLAN中。

通过对不同VLAN中的计算机进行通信测试,我们发现交换机能够实现不同VLAN之间的隔离,并确保数据的准确传输。

此外,通过启用链路聚合,我们成功将多个端口的带宽合并,提高了网络的传输性能。

6. 实验总结通过本次实验,我们深入了解了交换机的工作原理和功能,并掌握了交换机的基本配置和管理方法。

路由器交换机配置实验三

路由器交换机配置实验三

路由一配置: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. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

实验三交换机的基本配置(实验指导)
一、实验目的
了解交换机网络硬件设备,初步掌握交换机的常用配置。

二、实验工具
交换机,路由器,PC,Packet Tracer软件等。

三、实验要求
熟悉Cisco IOS命令,理解交换机的工作原理,通过Packet Tracer软件能对交换机进行仿真配置,完成Vlan。

可根据情况进一步完成VTP,STP等配置并测试。

实验环境
四、实验内容
4.1交换机基础知识
1.交换机与计算机的基本连接方法
法一将交换机所带连接电缆RJ-45接头插入Console口,电缆的另一端通过
RJ45-DB25(或RJ45-DB9)接入计算机的串口,接好交换机电源,打开交换机后面板上的电源开关,实现交换机冷启动,通过超级终端配置交换机。

仿真终端配置如下:
①启动Windows;
②双击“程序”—“附件”—“通讯”—“超级终端”;
③在连接端口下拉框中选择实际连接的COM口;
④端口属性选择:波特率:9600 数据位:8
停止位:1 奇偶校验:无
法二:在Packet Tracer中添加一台电脑和一台交换机,用串行线将电脑与交换机的console口相连,启动电脑模拟软件的终端,通信设置同上
2. 交换机的基本配置模式
交换机的基本配置模式如图1所示。

①用户模式
只允许用户访问有限量的基本监视命令。

用户执行模式是在从CLI 登录到Cisco 交换机后所进入的默认模式。

在switch>提示符下键入enable,交换机进入特权命令模式。

switch>enable
enable Disable/exit
图1交换机的基本配置模式
②特权模式
特权模式的提示符为“#”,允许用户访问所有设备命令,如用于配置和管理的命令,特权执行模式可采用口令加以保护,使得只有获得授权的用户才能访问设备。

在switch#特权模式下输入disable ,出现提示符switch>,此时交换机回到用户模式。

switch#disable
switch>
③全局设置模式
在switch#提示符下键入configure terminal ,出现提示符switch(config)#,此时交换机处于全局设置模式,可以设置交换机的全局参数。

switch(config)#
在全局设置模式下输入end 或按快捷键ctrl+z ,交换机回到特权命令模式。

switch(config)#end(或^z)
switch#
④接口设置模式:
configure terminal end/exit exit 相应命令 end/ctrl+z
要从全局配置模式下进入接口配置模式,应输入interface接口类型插槽号/端口号命令。

提示符将更改为switch(config-if)#。

要退出接口配置模式,使用exit命令。

提示符恢复为switch (config)#,要退出全局配置模式,可以再次使用exit 命令。

提示符切换为#,回到特权执行模式。

进入交换机快速以太网接口fastethernet0/1,输入的命令是:switch(config)#interface fastethernet 0/1
switch(config-if)#
3.上下文帮助
Cisco命令行界面提供了两种类型的帮助:
词语帮助:如果记不起完整命令,只记得开头几个字符,则可以按顺序先输入这几个字符,然后再输入一个问号“?”。

注意,问号前面不要加入空格。

以输入字符开头的一系列命令将随即显示。

例如,特权模式下输入d?将返回以d字符序列开头的所有命令的列表。

Switch#d?
debug delete dir disable disconnect
命令语法帮助:如果不熟悉在CLI的当前上下文中可以使用哪些命令,或者不知道要使给定命令完整需要哪些参数或可以使用哪些参数,则可以输入“?”命令。

当仅输入“?”时,将显示可在当前上下文中使用的所有命令的列表。

如果在特定命令后面输入“?”命令,则会显示命令参数。

如果显示<cr>,则表示命令不需要任何其它参数即可执行。

注意,此帮助需要在问号前面加入空格,以防止CLI 执行词语帮助,而不是命令语法帮助。

例如,输入enable ? 将获得enable命令所支持的命令选项的列表。

Switch#enable ?
<0-15> Enable level
<cr>
当输入了不正确的命令时,控制台错误消息有助于确定问题。

表4.2中提供了示例错误消息、这些消息的含义,以及当这些消息显示时如何获得帮助。

表4.2 错误示例
示例错误消息含义获取帮助
switch#con
% Ambiguous command:"con" 未输入足够的字符,设备
无法识别命令。

重新输入命令,后跟问号?,
命令和问号之间不要有空
格。

switch#show
% Incomplete command. 未输入此命令所需要的
所有关键字或值。

重新输入命令,后跟问号?,
命令和问号之间要有空格。

Switch(config)#interface 0/1
^
% Invalid input detected at '^' marker. 输入的命令不正确。

脱字
符“^”标出了错误点。

输入问号?以显示所有可用
的命令或参数。

4. 访问命令历史记录
如果要在交换机上配置很多接口,使用Cisco IOS命令历史记录缓冲区可以节省重复输入命令的时间。

Cisco CLI 提供已输入命令的历史记录。

这种功能称为命令历史记录,它对于重复调用较长或较复杂的命令或输入项特别有用。

默认情况下,命令历史记录功能启用,系统会在其历史记录缓冲区中记录最近输入的10条命令。

可以使用show history命令来查看最新输入的执行命令。

使用光标的上下键可以访问某个模式最近使用到的命令。

4.2配置交换机
1.网络拓扑图:
图2 交换机实验拓扑图
2.填加设置VLAN,如下:
上面的pc0,pc1,pc4,pc5等都属于Vlan2,
下面的pc2, pc3, pc6,pc7等都属于Vlan3。

相关文档
最新文档