Escolar Documentos
Profissional Documentos
Cultura Documentos
VLANTrunks(3.2.2)>CiscoNetworkingAcademy'sIntroductiontoVLANs
AccountSignIn
ViewYourCart
Search
Home
Store
CertificationInfo
CiscoNetworkingAcademy
Safari
Authors
Chapters&Articles
Explore
Home>Articles>CiscoNetworkTechnology>GeneralNetworking>CiscoNetworkingAcademy'sIntroductiontoVLANs
CiscoNetworkingAcademy'sIntroductionto
VLANs
ByCiscoNetworkingAcademy.
SampleChapterisprovidedcourtesyofCiscoPress.
Date:Apr7,2014.
Save
Digg
Del.icio.us
1.Objectives
2.KeyTerms
3.Introduction(3.0.1.1)
4.VLANSegmentation(3.1)
5.VLANsinaMultiswitched
Environment(3.1.2)
6.VLANImplementations(3.2)
7.VLANTrunks(3.2.2)
8.DynamicTrunkingProtocol
(3.2.3)
9.TroubleshootVLANsand
Trunks(3.2.4)
10.VLANSecurityandDesign
(3.3)
11.DesignBestPracticesfor
VLANs(3.3.2)
12.Summary(3.4)
13.Practice
14.ClassActivities
15.Labs
16.PacketTracerActivities
17.CheckYourUnderstanding
Questions
CiscoProgrammableFabricUsingVXLANwithBGPEVPN
ByDavidJansen,LukasKrattiger
Feb9,2016
SpanningTreeProtocol(STP)Walkthrough
BySeanWilkins
Sep3,2015
Email
TrunkingMechanicsofCiscoNetworkSwitches
BySeanWilkins
Aug27,2015
ChapterInformation
Contents
YouMayAlsoLike
ChapterDescription
Thischapterwillcoverhowtoconfigure,
manage,andtroubleshootVLANsandVLAN
trunks.Itwillalsoexaminesecurity
considerationsandstrategiesrelatingtoVLANs
andtrunks,andbestpracticesforVLANdesign.
FromtheBook
RoutingandSwitchingEssentials
CompanionGuide
SeeAllRelatedArticles
SearchRelatedSafariBooks
Searchelectronicversionsofover1500technicalbooks:
$60.00(Save10%)
Search
VLANTrunks(3.2.2)
Trunksarecommonlyusedbetweenswitchesandothernetworkdevicessuchasa
router,anotherswitch,oraserver.Anetworktechnicianmustbeveryfamiliarwith
configuringatrunkandensuringitworksproperly.
ConfiguringIEEE802.1QTrunkLinks(3.2.2.1)
AVLANtrunkisanOSILayer2linkbetweentwoswitchesthatcarriestrafficforallVLANs
(unlesstheallowedVLANlistisrestrictedmanuallyordynamically).Toenabletrunk
links,configuretheportsoneitherendofthephysicallinkwithparallelsetsofcommands.
Toconfigureaswitchportononeendofatrunklink,usetheswitchportmodetrunk
command.Withthiscommand,theinterfacechangestopermanenttrunkingmode.The
portentersintoaDynamicTrunkingProtocol(DTP)negotiationtoconvertthelinkintoa
trunklinkeveniftheinterfaceconnectingtoitdoesnotagreetothechange.DTPis
describedinthenexttopic.Inthiscourse,theswitchportmodetrunkcommandisthe
onlymethodimplementedfortrunkconfiguration.
TheCiscoIOScommandsyntaxtospecifyanativeVLAN(otherthanVLAN1)isshownin
Table36.Intheexample,VLAN99isconfiguredasthenativeVLANusingthe
switchporttrunknativevlan99command.
Table36SwitchPortTrunkCommands
http://www.ciscopress.com/articles/article.asp?p=2181837&seqNum=7
1/4
3/10/2016
VLANTrunks(3.2.2)>CiscoNetworkingAcademy'sIntroductiontoVLANs
Enterglobalconfigurationmode.
S1#configureterminal
Enterinterfaceconfigurationmodeforaparticularport S1(config)#interface
number.
interface_id
Optionally,putthetrunkintheappropriatetrunking
modeiftheswitchsupportsmorethanonemode.
S1(configif)#switchporttrunk
encapsulation[dot1q|isl]
Forcethelinktobeatrunklink.
S1(configif)#switchportmode
trunk
SpecifyanativeVLANforuntagged802.1Qframes.
S1(configif)#switchporttrunk
nativevlanvlan_id
SpecifythelistofVLANstobeallowedonthetrunk
link.
S1(configif)#switchporttrunk
allowedvlanvlanlist
ReturntotheprivilegedEXECmode.
S1(configif)#end
UsetheCiscoIOSswitchporttrunkallowedvlanvlanlistcommandtospecifythelistof
VLANstobeallowedonthetrunklink.
InFigure319,VLANs10,20,and30supporttheFaculty,Student,andGuestcomputers
(PC1,PC2,andPC3).TheF0/1portonswitchS1isconfiguredasatrunkportand
forwardstrafficforVLANs10,20,and30.VLAN99isconfiguredasthenativeVLAN.
Figure319SampleVLANDesign
LookattheconfigurationofportF0/1onswitchS1asatrunkport.ThenativeVLANis
changedtoVLAN99andtheallowedVLANlistisrestrictedto10,20,and30.Ifthenative
VLANisnotallowedonthetrunklink,thetrunkwillnotallowanydatatrafficforthenative
VLAN.
S1(config)#interfacefastethernet0/1
S1(configif)#switchportmodetrunk
S1(configif)#switchporttrunknativevlan99
S1(configif)#switchporttrunkallowedvlan10,20,30
S1(configif)#end
NOTE
ThisconfigurationassumestheuseofCiscoCatalyst2960switches,which
automaticallyuse802.1Qencapsulationontrunklinks.Otherswitchesmayrequire
manualconfigurationoftheencapsulation.Alwaysconfigurebothendsofatrunk
linkwiththesamenativeVLAN.If802.1Qtrunkconfigurationisnotthesameon
bothends,CiscoIOSSoftwarereportserrors.
ResettingtheTrunktoDefaultState(3.2.2.2)
Table37showsthecommandstoremovetheallowedVLANsandresetthenativeVLAN
ofthetrunk.Whenresettothedefaultstate,thetrunkallowsallVLANsandusesVLAN1
http://www.ciscopress.com/articles/article.asp?p=2181837&seqNum=7
2/4
3/10/2016
VLANTrunks(3.2.2)>CiscoNetworkingAcademy'sIntroductiontoVLANs
asthenativeVLAN.
Table37ResettingConfiguresValuesonTrunkLines
Enterglobalconfigurationmode.
S1#configureterminal
Enterinterfaceconfigurationmodefora
particularportnumber.
S1(config)#interfaceinterface_id
SettrunktoallowallVLANs.
S1(configif)#noswitchporttrunkallowed
vlan
ResetthenativeVLANtothedefault.
S1(configif)#noswitchporttrunkallowed
vlan
Configuretheportinaccessmode.
S1(configif)#switchportmodeaccess
Optionally,removethetrunkmodeifitwas
entered.
S1(configif)#noswitchporttrunk
encapsulation[dot1q|isl]
ReturntotheprivilegedEXECmode.
S1(configif)#end
Thecommandtoresettheswitchporttoanaccessportand,ineffect,deletethetrunk
configurationisalsoshown.
Thefollowingoutputshowsthecommandsusedtoresetalltrunkingcharacteristicsofa
trunkinginterfacetothedefaultsettings.Theshowinterfacesf0/1switchportcommand
revealsthatthetrunkhasbeenreconfiguredtoadefaultstate.
S1(config)#interfacef0/1
S1(configif)#noswitchporttrunkallowedvlan
S1(configif)#noswitchporttrunknativevlan
S1(configif)#end
S1#showinterfacesf0/1switchport
Name:Fa0/1
Switchport:Enabled
AdministrativeMode:trunk
OperationalMode:trunk
AdministrativeTrunkingEncapsulation:dot1q
OperationalTrunkingEncapsulation:dot1q
NegotiationofTrunking:On
AccessModeVLAN:1(default)
TrunkingNativeModeVLAN:1(default)
AdministrativeNativeVLANtagging:enabled
<outputomitted>
Administrativeprivatevlantrunkmappings:none
Operationalprivatevlan:none
TrunkingVLANsEnabled:All
PruningVLANsEnabled:21001
<outputomitted>
Thefollowingsampleoutputshowsthecommandsusedtoremovethetrunkfeaturefrom
theF0/1switchportonswitchS1.Theshowinterfacesf0/1switchportcommand
revealsthattheF0/1interfaceisnowinstaticaccessmode.
S1(config)#interfacef0/1
S1(configif)#switchportmodeaccess
S1(configif)#end
S1#showinterfacesf0/1switchport
Name:Fa0/1
Switchport:Enabled
AdministrativeMode:staticaccess
OperationalMode:staticaccess
AdministrativeTrunkingEncapsulation:dot1q
OperationalTrunkingEncapsulation:native
NegotiationofTrunking:Off
AccessModeVLAN:1(default)
TrunkingNativeModeVLAN:1(default)
AdministrativeNativeVLANtagging:enabled
<outputomitted>
VerifyingTrunkConfiguration(3.2.2.3)
ThefollowingoutputdisplaystheconfigurationofswitchportF0/1onswitchS1.The
configurationisverifiedwiththeshowinterfacesinterfaceIDswitchportcommand.
S1(config)#interfacef0/1
http://www.ciscopress.com/articles/article.asp?p=2181837&seqNum=7
3/4
3/10/2016
VLANTrunks(3.2.2)>CiscoNetworkingAcademy'sIntroductiontoVLANs
S1(configif)#switchportmodetrunk
S1(configif)#switchporttrunknativevlan99
S1(configif)#end
S1#showinterfacesf0/1switchport
Name:Fa0/1
Switchport:Enabled
AdministrativeMode:trunk
OperationalMode:trunk
AdministrativeTrunkingEncapsulation:dot1q
OperationalTrunkingEncapsulation:dot1q
NegotiationofTrunking:On
AccessModeVLAN:1(default)
TrunkingNativeModeVLAN:99(VLAN0099)
AdministrativeNativeVLANtagging:enabled
VoiceVLAN:none
Administrativeprivatevlanhostassociation:none
Administrativeprivatevlanmapping:none
AdministrativeprivatevlantrunknativeVLAN:none
AdministrativeprivatevlantrunkNativeVLANtagging:enabled
AdministrativeprivatevlantrunknormalVLANs:none
Administrativeprivatevlantrunkassociations:none
Administrativeprivatevlantrunkmappings:none
Operationalprivatevlan:none
TrunkingVLANsEnabled:All
PruningVLANsEnabled:21001
<outputomitted>
ThetophighlightedareashowsthatportF0/1hasitsadministrativemodesettotrunk.
Theportisintrunkingmode.ThenexthighlightedareaverifiesthatthenativeVLANis
VLAN99.Furtherdownintheoutput,thebottomhighlightedareashowsthatallVLANs
areenabledonthetrunk.
Activity3.2.2.3:ConfiguringandVerifyingaTrunk
GototheonlinecurriculumandselectthesecondgraphictousetheSyntax
CheckertoconfigureatrunksupportingallVLANsoninterfaceF0/1,withnative
VLAN99.Verifythetrunkconfigurationwiththeshowinterfacesf0/1switchport
command.
PacketTracerActivity3.2.2.4:ConfiguringTrunks
VLANtrunksarerequiredtopassVLANinformationbetweenswitches.Aportona
switchiseitheranaccessportoratrunkport.Accessportscarrytrafficfroma
specificVLANassignedtotheport.AtrunkportbydefaultisamemberofallVLANs
therefore,itcarriestrafficforallVLANs.Thisactivityfocusesoncreatingtrunkports
andassigningthemtoanativeVLANotherthanthedefault.
Lab3.2.2.5:ConfiguringVLANsandTrunking
Inthislab,youwillcompletethefollowingobjectives:
Part1:BuildtheNetworkandConfigureBasicDeviceSettings
Part2:CreateVLANsandAssignSwitchPorts
Part3:MaintainVLANPortAssignmentsandtheVLANDatabase
Part4:Configurean802.1QTrunkBetweentheSwitches
Part5:DeletetheVLANDatabase
PreviousSection
About
Affiliates
8.DynamicTrunkingProtocol(3.2.3)|Next
Section
CiscoSystems,Inc.
ContactUs
FAQ
Jobs
LegalNotice
PrivacyPolicy
SiteHelp
SiteMap
WriteforUs
2016PearsonEducation,CiscoPress.Allrightsreserved.
800East96thStreet,Indianapolis,Indiana46240
http://www.ciscopress.com/articles/article.asp?p=2181837&seqNum=7
4/4