You are on page 1of 4

20/01/2016

CiscoNexus5000SeriesNXOSSoftwareConfigurationGuideConfiguringVLANs[CiscoNexus5000SeriesSwitches]Cisco
CiscoNexus5000SeriesNXOSSoftwareConfigurationGuide

ConfiguringVLANs
CiscoNexus5000SeriesNXOS
SoftwareConfigurationGuide
Index
Preface
ProductOverview
ConfigurationFundamentals
LANSwitching
ConfiguringEthernet
Interfaces
ConfiguringVLANs
ConfiguringPrivateVLANs
ConfiguringRapidPVST+
ConfiguringMultiple
SpanningTree
ConfiguringSTPExtensions
ConfiguringPortChannels
ConfiguringAccessand
TrunkInterfaces
ConfiguringtheMACAddress
Table
ConfiguringIGMPSnooping
ConfiguringTrafficStorm
Control
SwitchSecurityFeatures
SystemManagement
FibreChanneloverEthernet
QualityofService
SANSwitching
Troubleshooting

Downloads:Thischapter

(PDF154.0KB)Thecompletebook

(PDF4.36MB)| Feedback

TableofContents
ConfiguringVLANs
InformationAboutVLANs
UnderstandingVLANs
UnderstandingVLANRanges
Creating,Deleting,andModifyingVLANs
ConfiguringaVLAN
CreatingandDeletingaVLAN
EnteringtheVLANSubmodeandConfiguringtheVLAN
AddingPortstoaVLAN
VerifyingVLANConfiguration

ConfiguringVLANs
YoucanusevirtualLANs(VLANs)todividethenetworkintoseparatelogicalareas.VLANscanalsobeconsideredasbroadcastdomains.
AnyswitchportcanbelongtoaVLAN,andunicast,broadcast,andmulticastpacketsareforwardedandfloodedonlytoendstationsinthatVLAN.Each
VLANisconsideredalogicalnetwork,andpacketsdestinedforstationsthatdonotbelongtotheVLANmustbeforwardedthrougharouter.
Thischapterincludesthefollowingsections:
InformationAboutVLANs
ConfiguringaVLAN
VerifyingVLANConfiguration

InformationAboutVLANs
Thissectionincludesthefollowingtopics:
UnderstandingVLANs
UnderstandingVLANRanges
Creating,Deleting,andModifyingVLANs

UnderstandingVLANs

Note VLANTrunkingProtocol(VTP)modeisOFF.VTPBPDUsaredroppedonallinterfacesofaCiscoNexus5000Seriesswitch,whichpartitionsVTP
domainsifotherswitcheshaveVTPturnedon.
AVLANisagroupofendstationsinaswitchednetworkthatislogicallysegmentedbyfunction,projectteam,orapplication,withoutregardtothephysical
locationsoftheusers.VLANshavethesameattributesasphysicalLANs,butyoucangroupendstationseveniftheyarenotphysicallylocatedonthe
sameLANsegment.
AnyportcanbelongtoaVLAN,andunicast,broadcast,andmulticastpacketsareforwardedandfloodedonlytoendstationsinthatVLAN.EachVLANis
consideredalogicalnetwork.PacketsdestinedforstationsthatdonotbelongtotheVLANmustbeforwardedthrougharouter.
Figure11showsVLANsaslogicalnetworks.Inthisdiagram,thestationsintheengineeringdepartmentareassignedtooneVLAN,thestationsinthe
marketingdepartmentareassignedtoanotherVLAN,andthestationsintheaccountingdepartmentareassignedtoyetanotherVLAN.
Figure11VLANsasLogicallyDefinedNetworks

VLANsareusuallyassociatedwithIPsubnetworks.Forexample,alltheendstationsinaparticularIPsubnetbelongtothesameVLAN.Tocommunicate
betweenVLANs,youmustroutethetraffic.
Bydefault,anewlycreatedVLANisoperationalthatis,theVLANisinthenoshutdowncondition.Additionally,youcanconfigureVLANstobeinthe
activestate,whichispassingtraffic,orthesuspendedstate,inwhichtheVLANsarenotpassingpackets.Bydefault,theVLANsareintheactivestateand
passtraffic.

UnderstandingVLANRanges
TheCiscoNexus5000SeriesswitchsupportsVLANnumbers1to4094inaccordancewiththeIEEE802.1Qstandard.TheseVLANsareorganizedinto
ranges.Youuseeachrangeslightlydifferently.TheswitchisphysicallylimitedinthenumberofVLANsitcansupport.Thehardwarealsosharesthis
availablerangewithitsVSANs.FordetailsofthenumberofsupportedVLANsandVSANs,seetheConfigurationLimitssection.
Table11describesthedetailsoftheVLANranges.

Table11VLANRanges

VLANs
Numbers

Range

Usage

http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli/CLIConfigurationGuide/VLANs.html

1/4

20/01/2016

CiscoNexus5000SeriesNXOSSoftwareConfigurationGuideConfiguringVLANs[CiscoNexus5000SeriesSwitches]Cisco
1

Normal

Ciscodefault.YoucanusethisVLAN,butyoucannotmodifyordeleteit.

21005

Normal

Youcancreate,use,modify,anddeletetheseVLANs.

10064094

Extended

Youcancreate,name,andusetheseVLANs.Youcannotchangethefollowingparameters:
Stateisalwaysactive.
VLANisalwaysenabled.YoucannotshutdowntheseVLANs.

39684047
and4094

Internally
allocated

These80VLANs,plusVLAN4094,areallocatedforinternaluse.Youcannotcreate,delete,ormodifyanyVLANs
withintheblockreservedforinternaluse.

Note VLANs3968to4047and4094arereservedforinternalusetheseVLANscannotbechangedorused.
CiscoNXOSallocatesagroupof80VLANnumbersforthosefeatures,suchasmulticastanddiagnostics,thatneedtouseinternalVLANsfortheir
operation.Bydefault,thesystemallocatesVLANsnumbered3968to4047forinternaluse.VLAN4094isalsoreservedforinternalusebytheswitch.
Youcannotuse,modify,ordeleteanyoftheVLANsinthereservedgroup.YoucandisplaytheVLANsthatareallocatedinternallyandtheirassociated
use.

Creating,Deleting,andModifyingVLANs
VLANsarenumberedfrom1to4094.AllconfiguredportsbelongtothedefaultVLANwhenyoufirstbringuptheswitch.ThedefaultVLAN(VLAN1)uses
onlydefaultvalues,andyoucannotcreate,delete,orsuspendactivityinthedefaultVLAN.
YoucreateaVLANbyassigninganumbertoityoucandeleteVLANsaswellasmovingthemfromtheactiveoperationalstatetothesuspended
operationalstate.IfyouattempttocreateaVLANwithanexistingVLANID,theswitchgoesintotheVLANsubmodebutdoesnotcreatethesameVLAN
again.
NewlycreatedVLANsremainunuseduntilportsareassignedtothespecificVLAN.AlltheportsareassignedtoVLAN1bydefault.
DependingontherangeoftheVLAN,youcanconfigurethefollowingparametersforVLANs(exceptthedefaultVLAN):
VLANname
Shutdownornotshutdown
WhenyoudeleteaspecifiedVLAN,theportsassociatedtothatVLANareshutdownandnotrafficflows.However,thesystemretainsalltheVLANtoport
mappingforthatVLAN,andwhenyoureenable,orrecreate,thespecifiedVLAN,thesystemautomaticallyreinstatesalltheoriginalportstothatVLAN.

Note CommandsenteredintheVLANconfigurationsubmodeareimmediatelyexecuted.

Note VLANs3968to4047and4094arereservedforinternalusetheseVLANscannotbechangedorused.

ConfiguringaVLAN
Thissectionincludesthefollowingtopics:
CreatingandDeletingaVLAN
EnteringtheVLANSubmodeandConfiguringtheVLAN
AddingPortstoaVLAN

CreatingandDeletingaVLAN
YoucancreateordeleteallVLANsexceptthedefaultVLANandthoseVLANsthatareinternallyallocatedforusebytheswitch.
OnceaVLANiscreated,itisautomaticallyintheactivestate.

Note WhenyoudeleteaVLAN,portsassociatedtothatVLANshutdown.Thetrafficdoesnotflowandthepacketsaredropped.
TocreateaVLAN,performthistask:

Command

Purpose

Step1

switch#
configure
terminal

Entersconfigurationmode.

Step2

switch(config)# CreatesaVLANorarangeorVLANs.
vlan{vlanid
IfyouenteranumberthatisalreadyassignedtoaVLAN,theswitchputsyouintotheVLANconfiguration
|vlanrange}

submodeforthatVLAN.IfyouenteranumberthatisassignedtoaninternallyallocatedVLAN,thesystem
returnsanerrormessage.However,ifyouenterarangeofVLANsandoneormoreofthespecifiedVLANsis
outsidetherangeofinternallyallocatedVLANs,thecommandtakeseffectononlythoseVLANsoutsidethe
range.Therangeisfrom2to4094VLAN1isthedefaultVLANandcannotbecreatedordeleted.Youcannot
createordeletethoseVLANsthatarereservedforinternaluse.

ThisexampleshowshowtocreatearangeofVLANsfrom15to20:

switch#configureterminal
switch(config)#vlan1520
Note YoucanalsocreateanddeleteVLANsintheVLANconfigurationsubmode.
TodeleteaVLAN,performthistask:

Command

Purpose

switch(configvlan)#novlan{
vlanid|vlanrange}

DeletesthespecifiedVLANorrangeofVLANsandremovesyoufromtheVLANconfiguration
submode.YoucannotdeleteVLAN1ortheinternallyallocatedVLANs.

EnteringtheVLANSubmodeandConfiguringtheVLAN
ToconfigureormodifytheVLANforthefollowingparameters,youmustbeintheVLANconfigurationsubmode:
Name
Shutdown

Note Youcannotcreate,delete,ormodifythedefaultVLANortheinternallyallocatedVLANs.Additionally,someoftheseparameterscannotbemodifiedon
someVLANsseetheUnderstandingVLANRangessectionforcompleteinformation.
ToenterthesubmodeandconfiguretheVLAN,performthistask:

http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli/CLIConfigurationGuide/VLANs.html

2/4

20/01/2016

CiscoNexus5000SeriesNXOSSoftwareConfigurationGuideConfiguringVLANs[CiscoNexus5000SeriesSwitches]Cisco
Command

Purpose

Step1

switch#
configure
terminal

Entersconfigurationmode.

Step2

switch(config)#
EntersVLANconfigurationsubmode.IftheVLANdoesnotexist,thesystemfirstcreatesthespecifiedVLAN.
vlan{vlanid|
vlanrange}

Step3

switch(config
vlan)#name
vlanname

NamestheVLAN.Youcanenterupto32alphanumericcharacterstonametheVLAN.Youcannotchange
thenameofVLAN1ortheinternallyallocatedVLANs.ThedefaultvalueisVLANxxxxwherexxxxrepresent
fournumericdigits(includingleadingzeroes)equaltotheVLANIDnumber.

Step4

switch(config
vlan)#no
shutdown

EnablestheVLAN.Thedefaultvalueisnoshutdown(orenabled).YoucannotshutdownthedefaultVLAN,
VLAN1,orVLANs1006to4094.

ThisexampleshowshowtoconfigureoptionalparametersforVLAN5:

switch#configureterminal
switch(config)#vlan5
switch(configvlan)#nameaccounting
switch(configvlan)#stateactive
switch(configvlan)#noshutdown
AddingPortstoaVLAN
AfteryouhavecompletedtheconfigurationofaVLAN,assignportstoit.Toaddports,performthistask:

Command

Purpose

Step1

switch#configureterminal

Entersconfigurationmode.

Step2

switch(config)#interface{type
slot/port|portchannelnumber}

Specifiestheinterfacetoconfigure,andenterstheinterfaceconfigurationmode.
TheinterfacecanbeaphysicalEthernetportoraportchannel.

Step3

switch(configif)#switchportaccess
vlanvlanid

SetstheaccessmodeoftheinterfacetothespecifiedVLAN.

ThisexampleshowshowtoconfigureanEthernetinterfacetojoinVLAN5:

switch#configureterminal
switch(config)#interfaceethernet1/13
switch(configif)#switchportaccessvlan5

VerifyingVLANConfiguration
TodisplayVLANconfigurationinformation,performoneofthesetasks:

Command

Purpose

switch#showrunningconfigvlan[vlan_id|vlan_range]

DisplaysVLANinformation.

switch#showvlan[brief|id[vlan_id|vlan_range]|namename Displaysselectedconfigurationinformationforthe
|summary]
definedVLAN(s).

ThefollowingexampleshowsallVLANsdefinedintherangeof121.

switch#showrunningconfigvlan121
version4.0(0)
vlan1
vlan5

ThefollowingexampleshowstheVLANscreatedontheswitchandtheirstatus:

switch#showvlan

VLANNameStatusPorts

1defaultactiveEth1/1,Eth1/2,Eth1/3,Eth1/4
Eth1/5,Eth1/6,Eth1/7,Eth1/8
Eth1/9,Eth1/10,Eth1/11
Eth1/12,Eth1/15,Eth1/16
Eth1/17,Eth1/18,Eth1/19
Eth1/20,Eth1/21,Eth1/22
Eth1/23,Eth1/24,Eth1/25
Eth1/26,Eth1/27,Eth1/28
Eth1/29,Eth1/30,Eth1/31
Eth1/32,Eth1/33,Eth1/34
Eth1/35,Eth1/36,Eth1/37
Eth1/38,Eth1/39,Eth1/40
Eth3/1,Eth3/2,Eth3/3,Eth3/4
veth1/1
13VLAN0005activeEth1/13,Eth1/14

ThefollowingexampleshowsthedetailsofVLAN13includingitsmemberports:

switch#showvlanid13

VLANNameStatusPorts

13VLAN0005activeEth1/13,Eth1/14

VLANTypeMTU

13enet576

RemoteSPANVLAN

Disabled

http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli/CLIConfigurationGuide/VLANs.html

3/4

20/01/2016

CiscoNexus5000SeriesNXOSSoftwareConfigurationGuideConfiguringVLANs[CiscoNexus5000SeriesSwitches]Cisco
PrimarySecondaryTypePorts

ThefollowingexampleshowstheVLANsettingssummary:

switch#showvlansummary

NumberofexistingVLANs:2
NumberofexistingVTPVLANs:2
NumberofexistingextendedVLANs:0

Terms&Conditions|PrivacyStatement|CookiePolicy|Trademarks

http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli/CLIConfigurationGuide/VLANs.html

4/4

You might also like