构建CCNAVTP与VLAN配置.docx
- 文档编号:28206535
- 上传时间:2023-07-09
- 格式:DOCX
- 页数:12
- 大小:310.79KB
构建CCNAVTP与VLAN配置.docx
《构建CCNAVTP与VLAN配置.docx》由会员分享,可在线阅读,更多相关《构建CCNAVTP与VLAN配置.docx(12页珍藏版)》请在冰豆网上搜索。
构建CCNAVTP与VLAN配置
PacketTracer5.0构建CCNA攻略补充之VTP与VLAN配置
图一 实验拓扑图
配置步骤:
1、配置VTP协议
Cisco3560交换机配置命令,Cisco3560交换机作为VTPServer,是局域网中的核心交换机。
3560(config)#vtpdomainsenya
ChangingVTPdomainnamefromNULLtosenya
3560(config)#vtpserver
3560(config)#vtpmodeserver
DevicemodealreadyVTPSERVER.
查看VTP的配置
3560#shvtpstatus
VTPVersion :
2
ConfigurationRevision :
4
MaximumVLANssupportedlocally:
1005
NumberofexistingVLANs :
7
VTPOperatingMode :
Server
VTPDomainName :
senya
VTPPruningMode :
Disabled
VTPV2Mode :
Disabled
VTPTrapsGeneration :
Disabled
MD5digest :
0x510x270x1E0xD30xC80x550xC10x58
Configurationlastmodifiedby0.0.0.0at3-1-9300:
19:
44
LocalupdaterIDis192.168.1.254oninterfaceVl2(lowestnumberedVLANinterfacefound)
两个作为接入\汇聚层的2950的配置VTP的命令
2950A(config)#vtpdomainsenya
ChangingVTPdomainnamefromNULLtosenya
2950A(config)#vtpmodeclient
SettingdevicetoVTPCLIENTmode.
2950A(config)#
查看VTP的配置
2950A#shvtpstatus
VTPVersion :
2
ConfigurationRevision :
4
MaximumVLANssupportedlocally:
255
NumberofexistingVLANs :
7
VTPOperatingMode :
Client
VTPDomainName :
senya
VTPPruningMode :
Disabled
VTPV2Mode :
Disabled
VTPTrapsGeneration :
Disabled
MD5digest :
0x510x270x1E0xD30xC80x550xC10x58
Configurationlastmodifiedby0.0.0.0at3-1-9300:
19:
44
2、配置trunk链路
两个Cisco2950交换机使用fastthernet0/24端口分别与核心交换机的24、23端口相连,这两条链
路应为trunk,相连的每个端口为trunk类型,配置命令相同,如下:
2950B(config)#interfacefa0/24
2950B(config-if)#switchportmodetrunk
2950B(config-if)#switchporttrunkallowedvlanall
3、在核心交换机Cisco3560上创建两个Vlan:
vlan2名称为math;vlan3名称为chinese。
3560(config)#vlan2
3560(config-vlan)#namemath
3560(config-vlan)#vlan3
3560(config-vlan)#namechinese
在三个交换机上使用shvlan命令均可以查看到如下的vlan信息:
2950A#shvlan
VLANName Status Ports
----------------------------------------------------------------------------
1 default active Fa0/1,Fa0/2,Fa0/3,Fa0/4
Fa0/5,Fa0/6,Fa0/7,Fa0/8
Fa0/9,Fa0/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
2 math active
3 chinese active
1002fddi-default active
1003token-ring-default active
1004fddinet-default active
1005trnet-default active
VLANTypeSAID MTU ParentRingNoBridgeNoStpBrdgModeTrans1Trans2
--------------------------------------------------------------------
1 enet100001 1500- - - - - 0 0
2 enet100002 1500- - - - - 0 0
3 enet100003 1500- - - - - 0 0
1002enet101002 1500- - - - - 0 0
1003enet101003 1500- - - - - 0 0
1004enet101004 1500- - - - - 0 0
1005enet101005 1500- - - - - 0 0
4、把端口划分到相应的Vlan
2950A#conft
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
2950A(config)#interfacefa0/1
2950A(config-if)#switchportmodeaccess
2950A(config-if)#switchportaccessvlan2
2950A(config-if)#interfacefa0/2
2950A(config-if)#switchportmodeaccess
2950A(config-if)#switchportaccessvlan3
2950A(config-if)#quit
2950B#conft
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
2950B(config)#interfacefa0/1
2950B(config-if)#switchportmodeaccess
2950B(config-if)#switchportaccessvlan2
2950B(config-if)#interfacefa0/2
2950B(config-if)#switchportmodeaccess
2950B(config-if)#switchportaccessvlan3
2950B(config-if)#exit
5、配置IP地址信息
vlan2接口的IP地址:
3560(config)#interfacevlan2
%LINK-5-CHANGED:
InterfaceVlan2,changedstatetoup
%LINEPROTO-5-UPDOWN:
LineprotocolonInterfaceVlan2,changedstatetoup3560(config-if)
#ipaddress192.168.1.254255.255.255.0
vlan3接口的IP地址:
3560(config-if)#interfacevlan3
%LINK-5-CHANGED:
InterfaceVlan3,changedstatetoup
%LINEPROTO-5-UPDOWN:
LineprotocolonInterfaceVlan3,changedstatetoup3560(config-if)
#ipaddress192.168.2.254255.255.255.0
3560(config-if)#quit
在图一中pc0与pc2划入了vlan2,因此它们的网关应该为192.168.1.254,ip地址我分别配置为192.168.1.1、192.168.1.2;pc1与pc3属于vlan3,它们的网关应该为192.168.2.254,ip地址我分别配置为192.168.2.1与192.168.2.2。
6、连通性测试
图二
7、每个交换机的配置文件
Cisco3560:
3560#shrun
Buildingconfiguration...
Currentconfiguration:
1144bytes
!
version12.2
noservicepassword-encryption
!
hostname3560
!
!
!
!
!
ipsshversion1
!
port-channelload-balancesrc-mac
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2
!
interfaceFastEthernet0/3
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceFastEthernet0/16
!
interfaceFastEthernet0/17
!
interfaceFastEthernet0/18
!
interfaceFastEthernet0/19
!
interfaceFastEthernet0/20
!
interfaceFastEthernet0/21
!
interfaceFastEthernet0/22
!
interfaceFastEthernet0/23
switchportmodetrunk
!
interfaceFastEthernet0/24
switchportmodetrunk
!
interfaceGigabitEthernet0/1
!
interfaceGigabitEthernet0/2
!
interfaceVlan1
noipaddress
shutdown
!
interfaceVlan2
ipaddress192.168.1.254255.255.255.0
!
interfaceVlan3
ipaddress192.168.2.254255.255.255.0
!
ipclassless
!
!
!
!
!
linecon0
linevty04
login
!
!
end
第一个Cisco2950:
2950A#shrun
Buildingconfiguration...
Currentconfiguration:
985bytes
!
version12.1
noservicepassword-encryption
!
hostname2950A
!
!
!
interfaceFastEthernet0/1
switchportaccessvlan2
switchportmodeaccess
!
interfaceFastEthernet0/2
switchportaccessvlan3
switchportmodeaccess
!
interfaceFastEthernet0/3
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceFastEthernet0/16
!
interfaceFastEthernet0/17
!
interfaceFastEthernet0/18
!
interfaceFastEthernet0/19
!
interfaceFastEthernet0/20
!
interfaceFastEthernet0/21
!
interfaceFastEthernet0/22
!
interfaceFastEthernet0/23
!
interfaceFastEthernet0/24
switchportmodetrunk
!
interfaceVlan1
noipaddress
shutdown
!
linecon0
!
linevty04
login
linevty515
login
!
!
end
第二个Cisco2950:
2950B#shrun
Buildingconfiguration...
Currentconfiguration:
985bytes
!
version12.1
noservicepassword-encryption
!
hostname2950B
!
!
!
interfaceFastEthernet0/1
switchportaccessvlan2
switchportmodeaccess
!
interfaceFastEthernet0/2
switchportaccessvlan3
switchportmodeaccess
!
interfaceFastEthernet0/3
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceFastEthernet0/16
!
interfaceFastEthernet0/17
!
interfaceFastEthernet0/18
!
interfaceFastEthernet0/19
!
interfaceFastEthernet0/20
!
interfaceFastEthernet0/21
!
interfaceFastEthernet0/22
!
interfaceFastEthernet0/23
!
interfaceFastEthernet0/24
switchportmodetrunk
!
interfaceVlan1
noipaddress
shutdown
!
linecon0
!
linevty04
login
linevty515
login
!
!
end
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 构建 CCNAVTP VLAN 配置