vlan划分实例.docx
《vlan划分实例.docx》由会员分享,可在线阅读,更多相关《vlan划分实例.docx(12页珍藏版)》请在冰点文库上搜索。
vlan划分实例
vlan划分实例
3560-24ps三层交换机配置:
core#showrun
Buildingconfiguration...
Currentconfiguration:
1322bytes
!
version12.2
noservicepassword-encryption
!
hostnamecore
!
!
!
!
!
ipsshversion1
!
port-channelload-balancesrc-mac
!
interfaceFastEthernet0/1
switchportmodetrunk(配置f0/1为trunk)
!
interfaceFastEthernet0/2
switchportaccessvlan2(配置f0/2为vlan2)
!
interfaceFastEthernet0/3
switchportmodetrunk
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
!
interfaceGigabitEthernet0/1
!
interfaceGigabitEthernet0/2
!
interfaceVlan1
noipaddress
shutdown
!
interfaceVlan2
ipaddress192.168.1.254255.255.255.0(配置vlan2IP地址)
!
interfaceVlan3
ipaddress192.168.2.254255.255.255.0(vlan3IP地址)
!
interfaceVlan4
ipaddress192.168.3.254255.255.255.0
!
ipclassless
linecon0
linevty04
login
!
!
end
core#showvtpsta
VTPVersion:
2
ConfigurationRevision:
12
MaximumVLANssupportedlocally:
1005
NumberofexistingVLANs:
8
VTPOperatingMode:
Server
VTPDomainName:
abc
VTPPruningMode:
Disabled
VTPV2Mode:
Disabled
VTPTrapsGeneration:
Disabled
MD5digest:
0x9F0xDF0x070xA40xD70x510x520x0A
Configurationlastmodifiedby0.0.0.0at3-1-9300:
00:
00
LocalupdaterIDis192.168.1.254oninterfaceVl2(lowestnumberedVLANinterfacefound)
配置VTP模式,vtpdomainname为abcmode:
Server
2960-24SW2交换机的配置:
Switch>en
Switch#showrun
Buildingconfiguration...
Currentconfiguration:
1000bytes
!
version12.2
noservicepassword-encryption
!
hostnameSwitch
!
!
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2(配置f0/2为trunk模式)
switchportmodetrunk
!
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(配置f0/22端口属于vlan3)
switchportaccessvlan3
!
interfaceFastEthernet0/23(配置f0/23端口属于vlan3)
switchportaccessvlan3
!
interfaceFastEthernet0/24
!
interfaceGigabitEthernet1/1
!
interfaceGigabitEthernet1/2
!
interfaceVlan1
noipaddress
shutdown
!
linecon0
!
linevty04
login
linevty515
login
!
!
end
witch#showvtpstat
VTPVersion:
2
ConfigurationRevision:
12
MaximumVLANssupportedlocally:
255
NumberofexistingVLANs:
8
VTPOperatingMode:
Client
VTPDomainName:
abc
VTPPruningMode:
Disabled
VTPV2Mode:
Disabled
VTPTrapsGeneration:
Disabled
MD5digest:
0x9F0xDF0x070xA40xD70x510x520x0A
Configurationlastmodifiedby0.0.0.0at3-1-9300:
00:
00
配置vtpmode:
Client
VTPDomainName:
abc
2960-24SW3交换机的配置:
Switch>en
Switch#showrun
Buildingconfiguration...
Currentconfiguration:
1000bytes
!
version12.1
noservicepassword-encryption
!
hostnameSwitch
!
!
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2
!
interfaceFastEthernet0/3
switchportmodetrunk
!
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
switchportaccessvlan4
!
interfaceFastEthernet0/23
switchportaccessvlan4
!
interfaceFastEthernet0/24
!
interfaceGigabitEthernet1/1
!
interfaceGigabitEthernet1/2
!
interfaceVlan1
noipaddress
shutdown
!
linecon0
!
linevty04
login
linevty515
login
!
!
end
Switch#showvtpsta
VTPVersion:
2
ConfigurationRevision:
12
MaximumVLANssupportedlocally:
255
NumberofexistingVLANs:
8
VTPOperatingMode:
Client
VTPDomainName:
abc
VTPPruningMode:
Disabled
VTPV2Mode:
Disabled
VTPTrapsGeneration:
Disabled
MD5digest:
0x9F0xDF0x070xA40xD70x510x520x0A
Configurationlastmodifiedby0.0.0.0at3-1-9300:
00:
00
IP地址配置:
Server0:
IP地址:
192.168.1.1
子网掩码:
255.255.255.0
默认网关:
192.168.1.254
PC0:
IP地址:
192.168.2.1
子网掩码:
255.255.255.0
默认网关:
192.168.2.254
PC2:
IP地址:
192.168.2.2
子网掩码:
255.255.255.0
默认网关:
192.168.2.254
PC1:
IP地址:
192.168.3.1
子网掩码:
255.255.255.0
默认网关:
192.168.3.254
PC3:
IP地址:
192.168.3.2
子网掩码:
255.255.255.0
默认网关:
192.168.3.254
经测试3个vlan互相能ping通。
OK!
实验到此结束。