两台交换机Vlan实验Ping结果
实验二VLAN以及Trunk实验(思科)

实验二VLAN以及Trunk配置(第2 次课 1 学时)一、【实验目的】1.了解交换机的工作原理,掌握交换机的基本配置命令。
1、掌握VLAN基本配置。
2、掌握静态接口VLAN划分。
二、【实验器材】1.思科3400交换机2台、PC机每组个2台。
2.连接console电缆线两条、标准网线若干。
三、【实验重点和难点】1.熟练使用交换机的常用配置命令。
2. 验证VLAN实现两个PC之间的连通性。
四、【实现功能】通过VLAN实现两个PC之间的连通性。
五、【思考题】不同VLAN间的PC是否可以相互访问,相同VLAN间的PC是否可以相互访问。
实验内容一、基本VLAN实验实验拓扑:实验需求:在交换机switch上面创建两个VLAN,vlan2和vlan3,vlan 名称分别为HR、ENG ,将主机PC1、PC2分别划入两个VLAN中步骤一:创建VLAN2与VLAN3Switch#config terminalSwitch(config)#vlan 2Switch(config-vlan)name HRSwitch(config-vlan) exitSwitch(config)#vlan 3Switch(config-vlan) name ENG步骤二:将与两台PC连接的两个接口分别划入相同的VLAN2中Switch(config)#int f0/1Switch(config-if) switch access vlan 2Switch(config-if)port nni//将接口划入指定VLAN中Switch(config-if)int f0/2Switch(config-if) switch access vlan 2Switch(config-if)port nni//将接口划入指定VLAN中Switch(config-if)exit验证结果:使用show vlan 2查看试验结果,在PC1以及PC2上使用ping 命令查看连通性。
Part2 实验3.4.4-实验报告

实验报告
实验名称:实验3.4.4:跨以太网交换机的VLAN扩展
学院:计算机学院班级:计算机科学与技术学号: 3520200095 姓名:曾志杭
1,请将创建的拓扑图截图粘贴到实验报告中。
2,PC-10-1和PC-10-3能彼此ping通吗?请将ping命令执行结果的截图粘贴到实验报告中。
PC-10-1和PC-10-3能彼此ping通。
3,PC-30-1和PC-30-3能彼此ping通吗?请将ping命令执行结果的截图粘贴到实验报告中。
PC-30-1和PC-30-3能彼此ping通。
4,开启LSW1端口GE 0/0/9和GE 0/0/24的数据抓包。
从PC-10-1 ping PC-10-3,分析Wireshark抓取的ping通信,回答以下问题:
(1)从端口GE 0/0/9抓取的以太网帧是带标记的以太网帧,还是不带标记的以太网帧?若为带标记的以太网帧,VLAN ID为多少?请将抓到的某个以太网帧的字段信息的截图粘贴在实验报告中。
从端口GE 0/0/9抓取的以太网帧是不带标记的以太网帧。
(2)从端口GE 0/0/24抓取的以太网帧是带标记的以太网帧,还是不带标记的以太网帧?若为带标记的以太网帧,VLAN ID为多少?请将抓到的某个以太网帧的字段信息的截图粘贴在实验报告中。
从端口GE 0/0/24抓取的以太网帧是带标记的以太网帧。
VLAN ID为10?。
两台交换机配置Vlan

两台交换机配置Vlan-1
1、按上图所示,分别将8台PC连接到两台C2950交换机上。
2、设置8台PC的IP地址。
3、分别在每1台PC的“命令提示符”中,ping其它7台PC。
4、分别进入switch0和switch1的“命令行”,查看Vlan的状态。
问题1:8台PC是否都能互相ping通?为什么?
5、在switch0中,设置端口1和端口5为Vlan 10;端口11和端口15为Vlan
20。
6、在switch1中,设置端口3和端口7为Vlan 10;端口13和端口17为Vlan
20。
7、再次在每1台PC的“命令提示符”中,ping其它7台PC。
8、进入交换机的“命令行”,查看Vlan的状态。
问题2:此时,8台PC是否都能互相ping通?其中哪几台PC可以ping通,
哪几台PC不能ping通?为什么?
9、进入switch0的f0/24端口,设置此端口的模式为Trunk,并允许所有的
vlan访问。
问题3:再次测试8台PC有哪些可以互相ping通。
VLAN综合实验(一)

在两个交换机间建立2条聚合在一起的链路,该链路上运行两个交换机上的分别属于VLAN1、2的计算机,在同VLAN内可以互相通信。
设备连接方案
需在图中标明链路连接情况,参加实验计算机的连接情况,IP地址等相关信息。
计算机C
计算机B
计算机A
交换机2
交换机1
计算机F
计算机E
计算机D
实验过程与数据
1、先将两个交换机间1号端口互连,未创建VLAN2、3时,计算机A、B、C、D、E、F间是否可以相互通信?两个交换机的MAC地址表如何?
Port index
A
1
1/0/4
B
2
1/0/10
C
3
1/0/18
D
1
1/0/1
E
2
1/0/1
F
3
1/0/1
3、
设备配置方案
将最终实现实验要求的系统配置文件复制粘贴到此处,并说明其中与本实验相关的配置命令的作用。
B
2
Ethernet1/0/1
C
3
Ethernet1/0/1
D
1
Ethernet1/0/4
E
2
Ethernet1/0/10
F
3
Ethernet1/0/18
2、将交换机互连的端口类型设置为TRUNK类型。设置两个互联端口的permit vlan情况为允许vlan1 2通过。利用ping命令测试连通情况。此时两个交换机的MAC地址表如何?
MAC ADDR
VLAN ID
Port index
A
1
Ethernet1/0/4
B
2
Ethernet1/0/10
一台核心交换机,下连两台交换机,如何实现终端电脑之间可以ping通?

一台核心交换机,下连两台交换机,如何实现终端电脑之间可
以ping通?
一、常见最通用最易用的网络拓扑结构
核心交换机下挂两台交换机(接入交换机),网络拓扑如下:
终端电脑一般都接入在两台接入交换机上,如果三台交换机进行通信都是采用二层以太网通信,则所有交换机的IP地址配置成同一网段即可,如图中所示。
IP地址都为192.168.2.0网段(IP地址与子网掩码进行与计算即可得到网段号),这种配置只要把IP地址与子网掩码设置好,把线缆接好即可实现整个网络所有的电脑都可以互相ping 通。
二、进行区域划分的网络拓扑结构
当网络中终端数量较大时,采用一个网段进行通信总有出现IP地址冲突、IP地址不够用的情况、以及同一个网段终端数量较大时,网络带宽利用率不高。
在大型网络时,核心交换机一般都为路由交换机,在核心交换机进行VLAN(虚拟局域网)划分,如图,核心交换机划分成VLAN1、VLAN2、两个虚拟局域网,VLAN1属于192.168.1.0网段,VLAN2属于192.168.2.0网段。
这时在接入交换机1的计算机终端需要与接入交换机2的计算机终端通信则需要进行三层路由通信,因此,需要对所有计算机配置网关,接入交换机1的计算机终端对应的网关是核心交换机VLAN1虚拟接口的IP的地址192.168.1.1/24,接入交换机2的计算机终端对应的网关是核心交换机VLAN2虚拟接口的IP的地址192.168.2.1/24,所有计算机配置好对应的网关后即可实现两两ping通。
精品作业分享_网络工程-交换机VLAN设置(综合实验报告)

交换机VLAN设置综合实验实验目的:1、理解VLAN的基本概念;2、训练基于端口的VLAN划分方法;3、掌握VLAN划分的基本过程;4、掌握跨交换机VLAN划分以及利用三层交换机实现vlan通信的方法。
实验原理:1.单交换机划分VLAN:利用一个交换机,逻辑划分成多个VLAN,相同的VLAN间的主机可以相互进行通讯,不同的VLAN间的主机不可以直接进行通讯。
2.跨交换机划分VLAN:实现跨交换机的相同VLAN内主机之间可以直接访问,同时对不同VLAN内的主机进行隔离。
3.利用三层交换机实现VLAN通信:开启三层交换机的路由功能,通过识别数据包的IP地址,查找路由表进行转换。
三层交换机利用直连路可以实现不同VLAN之间的访问。
三层交换机给接口配置IP地址采用交换虚拟接口的方式实现VLAN间互连。
实验软硬件要求:Cisco二层交换机、Cisco三层交换机、主机、交叉线、直通线实验步骤和结果:1、单交换机划分VLAN1)拓扑图2)配置要点*在交换机上划分两个VLAN;*将接口分配到VLAN中;*VLAN 2和VLAN 3中的主机不能ping通就说明配置成功。
3)配置过程Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#name twoSwitch(config-vlan)#exitSwitch(config)#vlan 3Switch(config-vlan)#name thirdSwitch(config-vlan)#end%SYS-5-CONFIG_I: Configured from console by consoleSwitch#show vlanVLAN Name Status Ports---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4Fa0/5, Fa0/6, Fa0/7, Fa0/8Fa0/9, Fa0/10, Fa0/11, Fa0/12Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig1/1, Gig1/22 two active3 third active1002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default activeVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1 enet 100001 1500 - - - - - 0 02 enet 100002 1500 - - - - - 0 03 enet 100003 1500 - - - - - 0 01002 enet 101002 1500 - - - - - 0 01003 enet 101003 1500 - - - - - 0 01004 enet 101004 1500 - - - - - 0 01005 enet 101005 1500 - - - - - 0 0Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#int fa0/1Switch(config-if)#switch access vlan 2Switch(config-if)#exitSwitch(config)#int fa0/2Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#int fa0/3Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#int fa0/4Switch(config-if)#switchport access vlan 3Switch(config-if)#exitSwitch(config)#int fa0/5Switch(config-if)#switchport access vlan 3Switch(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleSwitch#show vlanVLAN Name Status Ports---- -------------------------------- --------- ------------------------------- 1 default active Fa0/6, Fa0/7, Fa0/8, Fa0/9Fa0/10, Fa0/11, Fa0/12, Fa0/13 Fa0/14, Fa0/15, Fa0/16, Fa0/17 Fa0/18, Fa0/19, Fa0/20, Fa0/21 Fa0/22, Fa0/23, Fa0/24, Gig1/1 Gig1/22 two active Fa0/1, Fa0/2, Fa0/33 third active Fa0/4, Fa0/51002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default activeVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1 enet 100001 1500 - - - - - 0 02 enet 100002 1500 - - - - - 0 03 enet 100003 1500 - - - - - 0 01002 enet 101002 1500 - - - - - 0 01003 enet 101003 1500 - - - - - 0 01004 enet 101004 1500 - - - - - 0 01005 enet 101005 1500 - - - - - 0 02、跨交换机划分VLAN1)拓扑图2)配置要点*检验默认VLAN配置和连通性;*创建并检查VLAN配置,分配交换机端口到VLAN;*设置交换机端口的状态trunk3)配置过程switch2的配置如下:Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface fa0/3Switch(config-if)#switchport mode accessSwitch(config-if)#exitSwitch(config)#vlan 2Switch(config-vlan)#name twoSwitch(config-vlan)#exitSwitch(config)#vlan 3Switch(config-vlan)#name thirdSwitch(config-vlan)#exitSwitch(config)#int fa0/1Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#int fa0/2Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#int fa0/4Switch(config-if)#switchport access vlan 3Switch(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleSwitch#copy running-config startup-configDestination filename [startup-config]?Building configuration...[OK]Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#int fa0/3Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up Switch(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleSwitch#show interfaces trunkPort Mode Encapsulation Status Native vlanFa0/3 on 802.1q trunking 1Port Vlans allowed on trunkFa0/3 1-1005Port Vlans allowed and active in management domainFa0/3 1,2,3,1002,1003,1004,1005Port Vlans in spanning tree forwarding state and not pruned Fa0/3 1,2,3,1002,1003,1004,1005Switch#switch3的配置如下:Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Switch(config)#int fa0/1Switch(config-if)#switchport mode accessSwitch(config-if)#exitSwitch(config)#vlan 2Switch(config-vlan)#name twoSwitch(config-vlan)#exitSwitch(config)#vlan 3Switch(config-vlan)#name thirdSwitch(config-vlan)#exitSwitch(config)#int fa0/3Switch(config-if)#switchport access vlan 3Switch(config-if)#exitSwitch(config)#int fa0/4Switch(config-if)#switchport access vlan 3Switch(config-if)#exitSwitch(config)#end%SYS-5-CONFIG_I: Configured from console by consoleSwitch#copy running-config startup-configDestination filename [startup-config]?Building configuration...[OK]Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#int fa0/1Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up Switch(config-if)#end%SYS-5-CONFIG_I: Configured from console by consoleSwitch#show interfaces trunkPort Mode Encapsulation Status Native vlanFa0/1 on 802.1q trunking 1Port Vlans allowed on trunkFa0/1 1-1005Port Vlans allowed and active in management domainFa0/1 1,2,3,1002,1003,1004,1005Port Vlans in spanning tree forwarding state and not prunedFa0/1 1,2,3,1002,1003,1004,1005Switch#3、利用三层交换机实现VLAN通信1)拓扑图2)配置要点*为各个VLAN中的主机设置IP和网关*启动交换机的路由功能*创建交换机虚拟端口3)配置过程Switch#configureConfiguring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#ip routingSwitch(config)#int fa0/10Switch(config-if)#ip address 1.1.2.254 255.255.255.0^% Invalid input detected at '^' marker.Switch(config-if)#exitSwitch(config)#int vlan 10Switch(config-if)#ip address 1.1.1.254 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 20Switch(config-if)#ip address 1.1.2.254 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleSwitch#copy running-config startup-configDestination filename [startup-config]?Building configuration...[OK]Switch#Switch con0 is now availablePress RETURN to get started.4、分析比较、总结1)单交换机划分VLAN:利用在交换机里划分VLAN,划分之前各台主机之间都可以进行通信,但在划分VLAN之后,主机192.168.3.1 、主机192.168.3.62 和主机192.168.3.65因为在同一个VLAN 2,所以它们之间可以进行通信;主机192.168.3.125和主机192.168.3.126之间可以进行通信,因为它们在同一个VLAN 3;可是VLAN2和VLAN3之间的主机不能进行通信,因为它们之间不在同一个VLAN。
多交换机VLAN配置实验报告
多交换机VLAN配置实验报告姓名:***学号:********班级:********_______________________________________________________________________________Switch0配置信息:Switch>enableSwitch#Vlan database% Warning: It is recommended…Switch(vlan)#vlan 2 name BlueVLAN 2 added:Name: BlueSwitch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface f0/3Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#interface f0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#exitSwitch(config)#interface f0/2Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#exitSwitch(config)#exitSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#exitSwitch1配置信息:Switch>enableSwitch#vlan database% Warning: It is recommended …Switch(vlan)#vlan 2 name BlueVLAN 2 added:Name: BlueSwitch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface f0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#interface f0/2Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#exitSwitch(config)#interface f0/3Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#Switch(config)#exitSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#showvlanVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7Fa0/8, Fa0/9, Fa0/10, Fa0/11Fa0/12, Fa0/13, Fa0/14, Fa0/15Fa0/16, Fa0/17, Fa0/18, Fa0/19Fa0/20, Fa0/21, Fa0/22, Fa0/23Fa0/242 Blue active Fa0/3…Switch2配置信息:Switch>enableSwitch#vlan database% Warning: It is recommended…Switch(vlan)#vlan 3 name PinkVLAN 3 added:Name: PinkSwitch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface f0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#interface f0/2Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#exitSwitch(config)#interface f0/3Switch(config-if)#switchport access vlan 3Switch(config-if)#exitSwitch(config)#exitSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#exitSwitch3配置信息:Switch>enableSwitch#vlan database% Warning: It is recommended…Switch(vlan)#vlan 3 name PinkVLAN 3 added:Name: PinkSwitch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface f0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#interface f0/2Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#exitSwitch(config)#interface f0/3Switch(config-if)#switchport access vlan 3Switch(config-if)#exitSwitch(config)#exitSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#exitSwitch4配置信息:Switch>enableSwitch#vlan database% Warning: It is recommended…Switch(vlan)#vlan 4 name OrangeVLAN 4 added:Name: OrangeSwitch(vlan)#vlan 3 name PinkVLAN 3 added:Name: PinkSwitch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface f0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#interface f0/2Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#exitSwitch(config)#interface f0/4Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to upSwitch(config-if)#exitSwitch(config)#interface f0/3Switch(config-if)#switchport access vlan 4Switch(config-if)#exitSwitch(config)#interface f0/5Switch(config-if)#switchport access vlan 3Switch(config-if)#exitSwitch(config)#exitSwitch#Switch5配置信息:Switch>enableSwitch#vlan database% Warning: It is recommended to configure VLAN from config mode,as VLAN database mode is being deprecated. Please consult userdocumentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 5 name GreenVLAN 5 added:Name: GreenSwitch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface f0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#exitSwitch(config)#interface f0/2Switch(config-if)#switchport access vlan 5Switch(config-if)#exitSwitch(config)#exitSwitch#Switch6配置信息:Switch>enableSwitch#vlan database% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 5 name GreenVLAN 5 added:Name: GreenSwitch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface f0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#interface f0/2Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#interface f0/3Switch(config-if)#switchport access vlan 5Switch(config-if)#exitSwitch(config)#exitSwitch#网络拓扑图如下:Ping命令测试:(这里为什么一会通一会又不通呢?)。
跨交换机实现VLAN实验报告
计算机网络实验报告——跨交换机实现VLAN实验目的跨交换机实现VLAN的划分与配置。
一、实验器材•两台Switch2950交换机。
•四台PC机,其中一台装有超级终端仿真软件•一根console控制台电缆,直通双绞线若干,交叉双绞线若干。
二、实验任务本实验实验拓扑图如下图,根据该网络结构所需网段,进行ip地址规划,需要完成的工作如下:1、实验设备的选择与调试。
2、根据实验拓扑图,连接端口。
3、配置ip地址,并配置静态路由。
4、设置pc机IP地址及默认网关,并通过ping命令检查。
三、实验原理(1) 交换机基础配置Interface range fa0/1-12 定义端口范围Switchport access vlan 将所定义的端口划分到vlanX(2) 常用命令1)改变状态命令进入特权命令状态enable退出特权命令状态disable进入设置对话状态setup进入全局设置状态config terminal退出全局设置状态end进入端口设置状态interface type slot/number进入子端口设状态interface type numeber.subinterface[point-to-point|multipoint]进入线路设置状态line type slot/number进入路由设置状态router protocol退出局部设置状态exit2.)显示命令查看版本及引导信息show version查看运行设置show running-config //简写show run 特权模式查看开机设置show startup-config显示端口信息show controllers type slot/number3)拷贝命令将配置保存到NVRAM:copy running-config startup-config。
4.)网络命令登录远程主机telnet hostname|IP_address网络侦测ping hostname|IP_address5)基本设置命令全局设置config terminal //简写config t //进入全局模式设置访问用户及密码username username password password设置特权密码enable secret password 查询密码设置暗码修改密码//enable password + 密码修改密码四、实验步骤及原程程序4.1 实验设备选择与调试:交换机选择:本实验选择Cisco Packet Tracer 5.0中提供的2950-24为实验用交换机。
交换机基本配置及VLAN配置实验报告
交换机基本配置及VLAN配置实验报告一、实验目的1、了解交换机的基本配置;2、了解 VLAN 的概念和配置方法。
二、实验环境1、软件:Packet Tracer、SecureCRT;2、硬件:Catalyst 2960 交换机、PC。
三、实验步骤1、交换机基本配置(1)进入交换机配置界面,设置主机名。
Switch> enableSwitch# configure terminalSwitch(config)# hostname Lab1(2)配置管理口 IP 地址,可远程管理交换机。
Lab1(config)# interface vlan 1Lab1(config-if)# ip address 192.168.1.100 255.255.255.0Lab1(config-if)# no shutdown(3)配置 Telnet 登录密码。
(4)保存配置。
Lab1# copy running-config startup-config2、交换机 VLAN 配置(1)创建 VLAN。
Lab1(config)# interface fastEthernet 0/1Lab1(config-if)# switchport mode accessLab1(config-if)# switchport access vlan 10Lab1(config-if)# exitLab1(config)# interface fastEthernet 0/2Lab1(config-if)# switchport mode accessLab1(config-if)# switchport access vlan 20Lab1(config-if)# exit(3)配置 VLAN 间的通信。
四、实验结果Lab1# show running-configBuilding configuration...Current configuration : 653 bytes!version 12.2no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname Lab1!enable secret 5 $1$mERr$z1.tLakXthoRZezheDEZv1 !interface Vlan1no ip addressshutdown!interface Vlan10ip address 192.168.10.1 255.255.255.0no shutdown!interface Vlan20ip address 192.168.20.1 255.255.255.0no shutdown!ip default-gateway 192.168.1.1!line con 0!line aux 0!line vty 0 4password ciscologin!endLab1# show vlan briefVLAN Name Status Ports---- -------------------------------- ----------------------------------------1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6Fa0/7, Fa0/8, Fa0/9, Fa0/10Fa0/11, Fa0/12, Fa0/13, Fa0/14Fa0/15, Fa0/16, Fa0/17, Fa0/18Fa0/19, Fa0/20, Fa0/21, Fa0/22Fa0/23, Gi0/1, Gi0/210 VLAN10 active Fa0/1, Gi0/120 VLAN20 active Fa0/2, Gi0/21002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupInterface IP-Address OK? Method Status ProtocolVlan1 unassigned YES NVRAM administratively down down Vlan10 192.168.10.1 YES manual up up Vlan20 192.168.20.1 YES manual up up FastEthernet0/0 unassigned YES unset up up FastEthernet0/1 unassigned YES unset up up FastEthernet0/2 unassigned YES unset up up FastEthernet0/3 unassigned YES unset up up FastEthernet0/4 unassigned YES unset up up FastEthernet0/5 unassigned YES unset up up FastEthernet0/6 unassigned YES unset up upFastEthernet0/7 unassigned YES unset up upFastEthernet0/8 unassigned YES unset up up FastEthernet0/9 unassigned YES unset up up FastEthernet0/10 unassigned YES unset up up FastEthernet0/11 unassigned YES unset up up FastEthernet0/12 unassigned YES unset up up FastEthernet0/13 unassigned YES unset up up FastEthernet0/14 unassigned YES unset up up FastEthernet0/15 unassigned YES unset up up FastEthernet0/16 unassigned YES unset up up FastEthernet0/17 unassigned YES unset up up FastEthernet0/18 unassigned YES unset up up FastEthernet0/19 unassigned YES unset up up FastEthernet0/20 unassigned YES unset up up FastEthernet0/21 unassigned YES unset up up FastEthernet0/22 unassigned YES unset up up FastEthernet0/23 unassigned YES unset up upGigabitEthernet0/1 unassigned YES unset down downGigabitEthernet0/2 unassigned YES unset down downLab1# ping 192.168.20.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.20.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms五、实验心得本次实验通过配置交换机的基本配置及 VLAN 配置,实现了 VLAN 间的通信。
交换机实验结果及体会
实验结果及体会:
实验感想:
主机0可以PING通同一网段的不同区域的主机2,也可PING通不同VLAN的相同区域的主机1,也可PING通不同VLAN的不同区域的主机3。
实现不同地区不同VLAN 的通信。
实验注意:注意配置trunk 通道,在真机操作时注意路由与交换机的连接线须为交叉线,由于刚开始我疏忽用直通线连接,主机之间一直不能通信。
实验过程在操作比较简单所需要学习的是关于Vlan理论知识的掌握,本次实验主要是模拟交换机的过程并通过其他操作验证,因此要注重的是理论的了解和掌握。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
在PC0:192.168.10.2上第一次Ping
PC>ping 192.168.10.12
Pinging 192.168.10.12 with 32 bytes of data:
Reply from 192.168.10.12: bytes=32 time=125ms TTL=128
Reply from 192.168.10.12: bytes=32 time=62ms TTL=128
Reply from 192.168.10.12: bytes=32 time=63ms TTL=128
Reply from 192.168.10.12: bytes=32 time=62ms TTL=128
Ping statistics for 192.168.10.12:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 62ms, Maximum = 125ms, Average = 78ms
PC>ping 192.168.10.5
Pinging 192.168.10.5 with 32 bytes of data:
Reply from 192.168.10.5: bytes=32 time=143ms TTL=128
Reply from 192.168.10.5: bytes=32 time=78ms TTL=128
Reply from 192.168.10.5: bytes=32 time=94ms TTL=128
Reply from 192.168.10.5: bytes=32 time=93ms TTL=128
Ping statistics for 192.168.10.5:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 78ms, Maximum = 143ms, Average = 102ms
PC>ping 192.168.10.15
Pinging 192.168.10.15 with 32 bytes of data:
Reply from 192.168.10.15: bytes=32 time=141ms TTL=128
Reply from 192.168.10.15: bytes=32 time=94ms TTL=128
Reply from 192.168.10.15: bytes=32 time=78ms TTL=128
Reply from 192.168.10.15: bytes=32 time=94ms TTL=128
Ping statistics for 192.168.10.15:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 78ms, Maximum = 141ms, Average = 101ms
在PC0:192.168.10.2上第二次Ping
PC>ping 192.168.10.12
Pinging 192.168.10.12 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.10.12:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>ping 192.168.10.5
Pinging 192.168.10.5 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.10.5:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>ping 192.168.10.15
Pinging 192.168.10.15 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.10.15:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>
在PC0:192.168.10.2上第三次Ping
PC>ping 192.168.10.12
Pinging 192.168.10.12 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.10.12:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>ping 192.168.10.5
Pinging 192.168.10.5 with 32 bytes of data:
Reply from 192.168.10.5: bytes=32 time=93ms TTL=128
Reply from 192.168.10.5: bytes=32 time=78ms TTL=128
Reply from 192.168.10.5: bytes=32 time=94ms TTL=128
Reply from 192.168.10.5: bytes=32 time=94ms TTL=128
Ping statistics for 192.168.10.5:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 78ms, Maximum = 94ms, Average = 89ms
PC>ping 192.168.10.15
Pinging 192.168.10.15 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.10.15:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>