Lab 3: Layer 2 Switching: DCNI-2
Lab 3: Layer 2 Switching: DCNI-2
Lab 3: Layer 2 Switching: DCNI-2
Activity Objective
In this activity, you will become familiar with the Layer 2 switching features supported by the
Cisco Nexus 7010 and Cisco NX-OS Software. After completing this activity, you will be able
to meet these objectives:
n Configure VLANs and PVST+ within each VDC, and activate and validate spanning tree
parameters
n Create and manage primary and secondary VLANs, assign interfaces to secondary VLANs,
and perform mappings
n Configure MST regions across both Cisco Nexus 7010 Switches
n Enable UDLD on VDC links
n Configure port channels for interswitch VDC links using LACP
Visual Objective
The following diagram shows the logical lab topology diagram.
DCNI-2 Layer 2 Switching Lab Topology
N7K11 N7K12
eth 2/1 eth 2/1
VDC eth 2/2 eth 2/2 VDC
N7K11-pod1 N7K12-pod1
eth 2/4 eth 2/4
eth 1/2 eth 1/1 eth 1/1 eth 1/2
10G
1G
Required Resources
These are the resources and equipment required to complete this activity:
n Two Cisco Nexus 7010 chassis with dual supervisor modules
n Dual power supplies, dual system fans, dual fabric fans, and three fabric modules per
chassis
n One 48-port 1 Gigabit Ethernet I/O module per chassis
n One 32-port 10 Gigabit Ethernet I/O module per chassis with SFP+ SR optical transceivers
installed
n Cisco NX-OS LAN Enterprise License
n Cisco NX-OS LAN Advanced Services License
2 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
Command List
The table lists the commands that are used in this activity.
Command
bandwidth
channel-group
feature interface-vlan
feature lacp
feature private-vlan
feature udld
instance
interface port-channel
interface vlan
name
no vlan
private-vlan community
private-vlan isolated
private-vlan mapping
private-vlan primary
private-vlan synchronize
revision
show interface ethernet slot/port
switchport
show interface brief
show port-channel summary
show running-config spanning-tree
show spanning-tree brief
show spanning-tree mst
show spanning-tree root
show spanning-tree vlan
show vlan private-vlan
show udld neighbors
spanning-tree mode mst
spanning-tree mst configuration
state suspend
switchback
switchport
switchport mode private-vlan host
4 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
To have a painless experience and avoid unnecessary support
requests, it is important to go through the entire Lab Access session
before starting the lab!!!
Lab Access
Identify Your Pod Number: Pod number can be found on the left upper corner **** NX-OS-X ,
where X is your pod number. Make a note of your pod number on a paper.
Note: In this doc, the interfaces referred in most of the output shown in these steps refer to Pod1.
Once your pod number is identified, go to Table 1 POD Information and Access Account and
make a note of the credentials and interfaces assigned to your pod on a paper.
Table 1 POD Information and Access Account
POD Devices Login/Password Assigned Interfaces mgmt0 IP
POD 1
N7K11 admin/pod1nxos 1/1-5, 2/1-8 10.2.8.17
N7K12 admin/pod1nxos 1/1-5, 2/1-8 10.2.8.18
CAT 6K n/a 6/1-2
Nexus 5K admin/1234qwe 10.10.8.15
MDS 9124 admin/1234qwe
VSphere Client cisco/12345qwe localhost
POD 2
N7K11 admin/pod2nxos 1/13-17, 2/9-16 10.2.8.27
N7K12 admin/pod2nxos 1/13-17, 2/9-16 10.2.8.28
CAT 6K n/a 6/1-2
Nexus 5K admin/1234qwe 10.10.8.25
MDS 9124 admin/1234qwe
VSphere Client cisco/12345qwe localhost
POD 3
N7K11 admin/pod3nxos 1/25-29, 2/17-24 10.2.8.37
N7K12 admin/pod3nxos 1/25-29, 2/17-24 10.2.8.38
CAT 6K n/a 6/1-2
Nexus 5K admin/1234qwe 10.10.8.35
MDS 9124 admin/1234qwe
VSphere Client cisco/12345qwe localhost
Dont try to ping these IP addresses from your desktop, they are private addresses.
Note The lab topology includes two Cisco Nexus 7010 platforms. Each Nexus 7010 switch is
shared between the pods and has multiple virtual device contexts (VDCs). You will manage
the VDC assigned to your pod.
Activity Procedure
Step 1 Connect to your assigned N7K11-podX VDC (where X is your pod number) using
the provided access information (username admin with password pod1nxos,
pod2nxos, or pod3nxos, depending on your pod).
Note The output examples are for POD1. The range of interfaces assigned to each POD is
different. Check the LAB Aids or execute show interface brief command from your assigned
VDC to find out which ports are assigned to your VDC
Step 2 Enter VDC global configuration context and change all VDC-assigned physical
interfaces to Layer 2 switch ports.
N7K11-pod1(config)# interface ethernet 1/1-5, ethernet 2/1-8
N7K11-pod1(config-if-range)# switchport
Step 3 Verify that all VDC-assigned interfaces are now Layer 2 switch ports.
1. Are all VDC assigned interfaces configured as Layer 2 trunk switch ports?
6 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
Note On the second N7K on your assigned VDC the VLANs are already configured. You can
verify the configuration of your assigned VDC on the second N7K using the provided access
information
Step 5 Issue the show spanning-tree vlan 1 command from within your VDC pod.
N7K11-pod1# show spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0022.5579.f743
Cost 2
Port 257 (Ethernet2/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
eth 2/
eth 2/
eth 2/
eth 2/
Step 6 Within your pod, create VLAN 10, give it the name TEST and confirm that your
VDC pod contains VLANs 1 and 10.
N7K11-pod1(config)# vlan 10
N7K11-pod1(config-vlan)# name TEST
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 000d.ecb4.457c
Cost 2
Port 259 (Ethernet2/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 32778
Address 0022.5579.f742
Cost 2
Port 257 (Ethernet2/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Step 8 Issue the state suspend command from within the VLAN 10 configuration context.
N7K11-pod1(config-vlan)# state suspend
Step 10 Delete VLAN 10 within your VDC pod and confirm that it has been removed.
N7K11-pod1(config-vlan)# no vlan 10
N7K11-pod1(config)# show vlan
VLAN Type
---- -----
1 enet
8 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
Task 2: Create Private VLANs
In this task you will create private VLANs consisting of primary and secondary (isolated and
community), assign interfaces, and perform the primary to secondary mapping.
Note You will conduct this task on Cisco Nexus 7010 equipment shared between the pods. For
that reason, you will be allowed only to examine the setup and will not be able to change
any parameters if not required by the task.
Activity Procedure
Complete these steps:
Note The output examples are for POD1. The range of interfaces assigned to each POD is
different. Check the LAB Aids or execute show interface brief command from your assigned
VDC to find out which ports are assigned to your VDC
Step 11 On your N7K switch, enter global configuration mode and enable the feature to
create a private VLAN. Private VLAN is a Layer 2 feature that requires activation
before the service will be loaded and run within the VDC. Enter the global
configuration context from within your VDC pod and activate the private VLAN
feature.
N7K11-pod1(config)# feature ?
bfd Bfd
bgp Enable/Disable Border Gateway Protocol (BGP)
cts Enable/Disable CTS
dhcp Enable/Disable DHCP Snooping
dot1x Enable/Disable dot1x
eigrp Enable/Disable Enhanced Interior Gateway Routing Protocol
(EIGRP)
eou Enable/Disable eou(l2nac)
fip-snooping Enable/Disable fip-snooping(FCoE Initializtion Protocol)
glbp Enable/Disable Gateway Load Balancing Protocol (GLBP)
hsrp Enable/Disable Hot Standby Router Protocol (HSRP)
interface-vlan Enable/Disable interface vlan
isis Enable/Disable IS-IS Unicast Routing Protocol (IS-IS)
lacp Enable/Disable LACP
ldap Enable/Disable ldap
lldp Enable/Disable LLDP
msdp Enable/Disable Multicast Source Discovery Protocol (MSDP)
netflow Enable/Disable NetFlow
ospf Enable/Disable Open Shortest Path First Protocol (OSPF)
ospfv3 Enable/Disable Open Shortest Path First Version 3 Protocol
(OSPFv3)
otv Enable/Disable Overlay Transport Virtualization (OTV)
pbr Enable/Disable Policy Based Routing(PBR)
pim Enable/Disable Protocol Independent Multicast (PIM)
pim6 Enable/Disable Protocol Independent Multicast (PIM) for IPv6
port-security Enable/Disable port-security
private-vlan Enable/Disable private-vlan
privilege Enable/Disable IOS type privilege level support
rip Enable/Disable Routing Information Protocol (RIP)
scheduler Enable/Disable scheduler
ssh Enable/Disable ssh
tacacs+ Enable/Disable tacacs+
telnet Enable/Disable telnet
tunnel Enable/Disable Tunnel Manager
udld Enable/Disable UDLD
vpc Enable/Disable VPC (Virtual Port Channel)
vrrp Enable/Disable Virtual Router Redundancy Protocol (VRRP)
vtp Enable/Disable VTP
VLAN Type
---- -----
1 enet
20 enet
10 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
N7K11-pod1(config-vlan)# vlan 40
N7K11-pod1(config-vlan)# name MOE
N7K11-pod1(config-vlan)# private-vlan community
Step 15 Create two additional community VLANs 50 and 60 named LARRY and CURLY.
Confirm that they have been created.
N7K11-pod1# show vlan
Note The isolated and community secondary VLANs are now assigned to the primary VLAN 20.
---------------------------------------------------------------------------------------------------------------
40 eth 1/3
50 eth 1/4
70 eth 1/5
N7K11-pod1(config)# interface ethernet 1/1-2
N7K11-pod1(config-if-range)# switchport mode private-vlan host
N7K11-pod1(config-if-range)# switchport private-vlan host-association ?
<1-3967,4048-4093> Primary VLAN ID
N7K11-pod1(config-if-range)# switchport private-vlan host-association 20 ?
<1-3967,4048-4093> Secondary VLAN ID
N7K11-pod1(config-if-range)# switchport private-vlan host-association 20 30
Step 20 Repeat this procedure for the other interfaces and primary-secondary VLAN
associations.
Step 21 Verify the private VLAN interface assignments.
N7K11-pod1# show interface ethernet 1/1 switchport
Name: Ethernet1/1
Switchport: Enabled
Switchport Monitor: Not enabled
Operational Mode: Private-vlan host
Access Mode VLAN: 30 (LONER)
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: 1-3967,4048-4093
Administrative private-vlan primary host-association: 20
Administrative private-vlan secondary host-association: 30
Administrative private-vlan primary mapping: none
12 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
Administrative private-vlan secondary mapping: none
Administrative private-vlan trunk native VLAN: 1
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: (20,30)
7. Are all of the private VLAN interfaces assignments correct? ___________________
Step 22 Assign interface 2/7 as the promiscuous port for your VDC pod.
N7K11-pod1(config)# interface ethernet 2/7
N7K11-pod1(config-if)# switchport mode private-vlan ?
host Port mode pvlan host
promiscuous Port mode pvlan promiscuous
trunk Private-vlan trunk promiscuous
Note You will conduct this task on Cisco Nexus 7010 equipment shared between the pods. For
that reason, you will be allowed only to examine the setup and will not be able to change
any parameters if not required by the task.
Activity Procedure
Complete these steps:
Step 1 Connect to your N7K11-podX (where X is your pod number).
Note The output examples are for POD1. The range of interfaces assigned to each POD is
different. Check the LAB Aids or execute show interface brief command from your assigned
VDC to find out which ports are assigned to your VDC
Step 4 Within a VDC, either PVST+ or MST may be running, but not both. Enter MST
configuration mode and specify the name according to the following table:
Switch VDC MST Name
14 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
N7K11 N7K11-POD1 region1
N7K11-POD2 region1
N7K11-POD3 region2
Note You must configure your both assigned VDC, on N7K11 and N7K12 according to the
information above
N7K11-pod1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
N7K11-pod1(config)# spanning-tree mode mst
N7K11-pod1(config)# spanning-tree mst configuration
N7K11-pod1(config-mst)# name REGION1
N7K11-pod1(config-mst)# exit
Note Important: MST configuration changes become effective after exiting the specific
configuration context.
Step 6 Assign the MST instance id =1 for VLANs 1 and 20. Assign the MST instance id =2
for VLANs 30, 40, 50, and 70.
N7K11-pod1(config)# spanning-tree mst configuration
N7K11-pod1(config-mst)# instance 1 vlan 1,20
N7K11-pod1(config-mst)# instance 2 vlan 30,40,50,70
N7K11-pod1(config-mst)# exit
MST configuration requires that primary and secondary VLANs be assigned to the same
MST instance.
13. Is the root bridge the same for each MST instance? _______________________________
14. If so, what is the bridge ID? ___________________ If not, what are the two bridge IDs?
Step 8 Assure that the primary and secondary VLANs within your VDC are assigned to the
same MST instance.
N7K11-pod1(config)# spanning-tree mst configuration
N7K11-pod1(config-mst)# private-vlan synchronize
N7K11-pod1(config-mst)# exit
Note Remember to issue the exit command while in MST configuration context to assure that the
commands are successfully compiled.
16 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
Step 9 Verify that Step 7 was successful.
Note You will conduct this task on Cisco Nexus 7010 equipment shared between the pods. For
that reason, you will be allowed only to examine the setup and will not be able to change
any parameters if not required by the task.
Activity Procedure
Complete these steps:
Step 1 Connect to your assigned N7K11-podX (where X is your pod number).
Note The output examples are for POD1. The range of interfaces assigned to each POD is
different. Check the LAB Aids or execute show interface brief command from your assigned
VDC to find out which ports are assigned to your VDC
18 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
Note Repeat this step on the second VDC.
Step 6 Verify the port channel configuration and its member interfaces.
N7K11-pod1(config-if-range)# show port-channel summary
Flags: D - Down P - Up in port-channel (members)
I - Individual H - Hot-standby (LACP only)
s - Suspended r - Module-removed
S - Switched R - Routed
U - Up (port-channel)
------------------------------------------------------------------------------
Group Port- Type Protocol Member Ports
Channel
------------------------------------------------------------------------------
1 Po1(SU) Eth LACP Eth2/1(P) Eth2/2(P)
interface Vlan1
interface Vlan20
private-vlan mapping 30,40,50,70
interface port-channel1
switchport
switchport mode trunk
bandwidth 20000000
interface Ethernet1/1
switchport
switchport mode private-vlan host
switchport private-vlan host-association 20 30
no shutdown
20 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.
interface Ethernet1/2
switchport
switchport mode private-vlan host
switchport private-vlan host-association 20 30
no shutdown
interface Ethernet1/3
description p1-65k
switchport
switchport mode private-vlan host
switchport private-vlan host-association 20 40
no shutdown
interface Ethernet1/4
switchport
switchport mode private-vlan host
switchport private-vlan host-association 20 50
no shutdown
interface Ethernet1/5
switchport
switchport mode private-vlan host
switchport private-vlan host-association 20 70
no shutdown
interface Ethernet2/1
description N7K12-e2/1
switchport
switchport mode trunk
bandwidth 10000000
channel-group 1 mode active
no shutdown
interface Ethernet2/2
description N7K12-e2/2
switchport
switchport mode trunk
bandwidth 10000000
channel-group 1 mode active
no shutdown
interface Ethernet2/3
switchport
switchport mode trunk
no shutdown
interface Ethernet2/4
switchport
switchport mode trunk
no shutdown
interface Ethernet2/5
switchport
switchport mode trunk
no shutdown
interface Ethernet2/6
switchport
switchport mode trunk
no shutdown
interface Ethernet2/7
switchport
switchport mode private-vlan promiscuous
switchport private-vlan mapping 20 30,40,50,70
no shutdown
interface Ethernet2/8
interface mgmt0
no snmp trap link-status
ip address 10.2.8.17/24
When you complete this activity, your answers will be similar to the results here, with
differences that are specific to your device or workgroup:
1. Yes
5. Yes
6. No
8. Yes
11. 32768
13. Yes
22 Implementing Cisco Data Center Networking Infrastructure 2 (DCNI-2) v3.0 2009 Cisco Systems, Inc.