Cisco N7K-C7018 Configuration Guide - Page 93
Configuring Access Host Ports, switchport host, switchport, access vlan
View all Cisco N7K-C7018 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 93 highlights
Chapter 3 Configuring Layer 2 Interfaces Configuring Access and Trunk Interfaces Send document comments to [email protected] DETAILED STEPS Step 1 Command configure terminal Step 2 Example: switch# configure terminal switch(config)# interface {{type slot/port} | {port-channel number}} Step 3 Example: switch(config)# interface ethernet 3/1 switch(config-if)# switchport mode {access | trunk} Example: switch(config-if)# switchport mode access Step 4 switchport access vlan vlan-id Example: switch(config-if)# switchport access vlan 5 Step 5 exit Step 6 Example: switch(config-if)# exit switch(config)# show interface Step 7 Example: switch# show interface copy running-config startup-config Example: switch(config)# copy running-config startup-config Purpose Enters configuration mode. Specifies an interface to configure, and enters interface configuration mode. Sets the interface as a nontrunking nontagged, single-VLAN Layer 2 interface. An access port can carry traffic in one VLAN only. By default, an access port carries traffic for VLAN1; to set the access port to carry traffic for a different VLAN, use the switchport access vlan command. Specifies the VLAN for which this access port will carry traffic. If you do not enter this command, the access port carries traffic on VLAN1 only; use this command to change the VLAN for which the access port carries traffic. Exits the configuration mode. (Optional) Displays the interface status and information. (Optional) Copies the running configuration to the startup configuration. This example shows how to set Ethernet 3/1 as a Layer 2 access port that carries traffic for VLAN 5 only: switch# configure terminal switch(config)# interface ethernet 3/1 switch(config-if)# switchport mode access switch(config-if)# switchport access vlan 5 switch(config-if)# Configuring Access Host Ports Note You should apply the switchport host command only to interfaces connected to an end station. OL-23435-03 Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 5.x 3-11