- Preface
- Configuration Management
- Administering the Cisco ME 1200 NID
- Configuring Notifications
- Zero Touch Provisioning
- Configuring Synchronous Ethernet
- Configuring Ethernet Virtual Connections
- Configuring Switch Ports
- Configuring Spanning-Tree Protocol
- Configuring Link Aggregation Control Protocol (LACP)
- Provisioning Link Layer Discovery Protocol
- Configuring SNMP
- Configuring PTP
- Configuring ACLs
- Configuring Quality of Service (QoS)
- Configuring Ethernet OAM, Link OAM, and CFM
- Configuring Performance Monitoring
- Configuring EPS
- Configuring ERPS
- Configuring L2CP
- Configuring MAC Security
- Configuring NTP
- Configuring Storm Control
- Configuring Syslog
- Configuring Dedicated Debug Shell
- Configuring SPAN
- Configuring RSPAN
- Configuring RFC 2544
- Configuring sFlow
- Configuring UDLD
- Configuring Flex Links
- Configuring Y.1564
- Configuring LST
- Configuring Security Access Control Lists
- Multicast Vlan Register
- Double-tagged management VLAN using IVID parameter
- Configuring LAG Aggregation
Configuring Switch Ports
This document describes various virtual LAN (VLAN) configuration you can perform on the switch ports, such as creating layer 2 and layer 3 VLANs, creating VLAN mapping, VLAN translation groups, and modifying software ports.
How To Configure Switch Ports
Creating Layer 2 VLANs
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# createVlanCommand createVlanReq vlan_list 100-4095 Switch(config-controller-ProvisionPortVlanPortType)# createVlanCommand review Commands in queue: createVlanCommand createVlanReq vlan_list 100-4095 Switch(config-controller-ProvisionPortVlanPortType)# createVlanCommand commit Vlan Creation Commit Success!!!
Verifying Layer 2 VLAN Configuration
The following is a sample output of the command that displays in brief the configured layer 2 VLAN list:
Switch(config-controller-ProvisionPortVlanPortType)# showVlans showVlanRequest brief
Commands in queue: showVlans showVlanRequest brief
Switch(config-controller-ProvisionPortVlanPortType)# showVlans commit
Configured Vlan List: 1 Show Vlans Commit Success!!!
Deleting Layer 2 VLANs
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanCommand deleteVlanReq vlan_list 100-4095 Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanCommand review Commands in queue: deleteVlanCommand deleteVlanReq vlan_list 100-4095 Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanCommand commit DeleteVlanCommand_Output.deleteVlanResp = 0 Vlan Deletion Commit Success!!!
Creating Layer 3 VLANs
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan createIntVlanReq vlan_Id 22 Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan createIntVlanReq address ipv4 ipv4_address address 22.22.22.3 Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan createIntVlanReq address ipv4 ipv4_address mask 255.255.255.0 Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan review Commands in queue: createIntVlan createIntVlanReq vlan_id 22 createIntVlan createIntVlanReq address ipv4 ipv4_address address 22.22.22.3 createIntVlan createIntVlanReq address ipv4 ipv4_address mask 255.255.255.0 Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan commit CreateIntVlan_Output.createIntVlanResp = 0 Create Interface Vlan Commit Success!!!
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan createIntVlanReq vlan_Id 22 Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan createIntVlanReq address ipv6 ipv6_address 2001:4::1/64 Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan review Commands in queue: createIntVlan createIntVlanReq vlan_id 22 createIntVlan createIntVlanReq address ipv6 ipv6_address 2001:4::1/64 Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan commit CreateIntVlan_Output.createIntVlanResp = 0 Create Interface Vlan Commit Success!!!
Creating Layer 3 VLANs With Dynamic IP Address
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan createIntVlanReq vlan_Id 23 Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan createIntVlanReq address ipv4 dhcp Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan review Commands in queue: createIntVlan createIntVlanReq vlan_id 23 createIntVlan createIntVlanReq address ipv4 dhcp Switch(config-controller-ProvisionPortVlanPortType)# createIntVlan commit CreateIntVlan_Output.createIntVlanResp = 0 Create Interface Vlan Commit Success!!!
Verifying Layer 3 VLANs With Dynamic IP Address
The following is a sample output to display the layer 3 VLANs configured with a dynamic IP address:
Switch(config-controller-ProvisionPortVlanPortType)# showIntVlan showIntVlanReq vlan_list 23
Commands in queue: showIntVlan showIntVlanReq vlan_list 23
Switch(config-controller-ProvisionPortVlanPortType)# showIntVlan commit
ShowIntVlan_Output.showIntVlanResp.vlan_list[0].vlan_id = 23 ShowIntVlan_Output.showIntVlanResp.vlan_list[0].Link = 'LINK: 00-3a-99-fd-4d-05 Mtu:1500' ShowIntVlan_Output.showIntVlanResp.vlan_list[0].dhcp = 'DHCP' ShowIntVlan_Output.showIntVlanResp.vlan_list[0].ipv6_address = 'IPv6 Address not configured' Show Interface Vlan Commit Success!!!
Deleting Layer 3 VLANs
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# deleteIntVlan deleteIntVlanReq vlan_list 23 Switch(config-controller-ProvisionPortVlanPortType)# deleteIntVlan review Commands in queue: deleteIntVlan deleteIntVlanReq vlan_list 23 Switch(config-controller-ProvisionPortVlanPortType)# deleteIntVlan commit DeleteIntVlan_Output.deleteIntVlanResp = 0 Delete Interface Vlan Commit Success!!!
Creating a VLAN Translation Group
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# createVlanTranslationGroup createVlanTranslationGroupReq group_Id 3 Switch(config-controller-ProvisionPortVlanPortType)# createVlanTranslationGroup createVlanTranslationGroupReq vlan_id 22 Switch(config-controller-ProvisionPortVlanPortType)# createVlanTranslationGroup createVlanTranslationGroupReq vlan_list 100,101,102 Switch(config-controller-ProvisionPortVlanPortType)# createVlanTranslationGroup review Commands in queue: createVlanTranslationGroup createVlanTranslationGroupReq group_Id 3 createVlanTranslationGroup createVlanTranslationGroupReq vlan_id 22 createVlanTranslationGroup createVlanTranslationGroupReq vlan_list 100,101,102 Switch(config-controller-ProvisionPortVlanPortType)# createVlanTranslationGroup commit CreateVlanTranslationGroup_Output.createVlanTranslationGroupResp = 0 Create VlanTranslation Commit Success!!!
Deleting VLAN Translation Groups
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanTranslation deleteVlanTranslationGroupReq group_id 3 Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanTranslation deleteVlanTranslationGroupReq vlan_list 100,101,102 Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanTranslation review Commands in queue: deleteVlanTranslation deleteVlanTranslationGroupReq group_id 3 deleteVlanTranslation deleteVlanTranslationGroupReq vlan_list 100,101,102 Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanTranslation commit DeleteVlanTranslation_Output.deleteVlanTranslationGroupResp = 0 Delete VlanTranslation Commit Success!!!
Verifying VLAN Translation Group
The following is a sample output of the command to verify the VLAN translation group configuration:
Switch(config-controller-ProvisionPortVlanPortType)# showVlanTranslation showVlanTranslationGroupReq
all
Commands in queue: showVlanTranslation showVlanTranslationGroupReq all
Switch(config-controller-ProvisionPortVlanPortType)# showVlanTranslation commit
ShowVlanTranslation_Output.showVlanTranslationGroupResp[0].group_id = 3 ShowVlanTranslation_Output.showVlanTranslationGroupResp[0].vlan_list = 100 ShowVlanTranslation_Output.showVlanTranslationGroupResp[0].transvlan_id = 22 ShowVlanTranslation_Output.showVlanTranslationGroupResp[1].group_id = 3 ShowVlanTranslation_Output.showVlanTranslationGroupResp[1].vlan_list = 101 ShowVlanTranslation_Output.showVlanTranslationGroupResp[1].transvlan_id = 22 ShowVlanTranslation_Output.showVlanTranslationGroupResp[2].group_id = 3 ShowVlanTranslation_Output.showVlanTranslationGroupResp[2].vlan_list = 102 ShowVlanTranslation_Output.showVlanTranslationGroupResp[2].transvlan_id = 22 Show VlanTranslation Commit Success!!!
Creating VLAN Mapping
VLAN Mapping should be created for the VLAN translation group, and the mapping interface should be bound to that translation group.
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# createVlanMapping createVlanMappingReq group_id 3 Switch(config-controller-ProvisionPortVlanPortType)# createVlanMapping createVlanMappingReq interface 5 Switch(config-controller-ProvisionPortVlanPortType)# createVlanMapping review Commands in queue: createVlanMapping createVlanMappingReq group_id 3 createVlanMapping createVlanMappingReq interface 5 Switch(config-controller-ProvisionPortVlanPortType)# createVlanMapping commit CreateVlanMapping_Output.createVlanMappingResp = 0 Create VlanMapping Commit Success!!!
Deleting VLAN Mapping
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanMapping deleteVlanMappingReq interface 5 Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanMapping review Commands in queue: deleteVlanMapping deleteVlanMappingReq interface 5 Switch(config-controller-ProvisionPortVlanPortType)# deleteVlanMapping commit DeleteVlanMapping_Output.deleteVlanMappingResp = 0 Delete Vlan Mapping Commit Success!!!
Modifying Switch Ports
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort modifySWPortConfig interaface 4 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort modifySWPortConfig mode trunk native vlan 2 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort modifySWPortConfig mode trunk allowed vlan add vlan_list 200-225 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort review Commands in queue: modifySwPort modifySWPortConfig interaface 4 modifySwPort modifySWPortConfig mode trunk native vlan 2 modifySwPort modifySWPortConfig mode trunk allowed vlan add vlan_list 200-225 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort commit ModifySwPort_Output.modifySwPortConfigResp = 0 Modify SwitchPort Commit Success!!!
![]() Note |
The following example shows how to configure Switch Port mode as hybrid using modifySwPort_v2.
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 modifySWConfig interaface 1 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 modifySWConfig mode hybrid allowed vlan remove vlan_list 1-100 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort-v2 modifySWConfig mode hybrid port_type c_port Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 modifySWConfig mode hybrid ingress_filtering enable Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 modifySWConfig mode hybrid ingress_acceptance tagged Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 modifySWConfig mode hybrid egress_tag all Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 modifySWConfig mode hybrid native vlan 10 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 review Commands in queue: modifySwPort_v2 modifySWConfig interaface 1 modifySwPort_v2 modifySWConfig mode hybrid allowed vlan remove vlan_list 1-100 modifySwPort_v2 modifySWConfig mode hybrid port_type c_port modifySwPort_v2 modifySWConfig mode hybrid ingress_filtering enable modifySwPort_v2 modifySWConfig mode hybrid ingress_acceptance tagged modifySwPort_v2 modifySWConfig mode hybrid egress_tag all modifySwPort_v2 modifySWConfig mode hybrid native vlan 10 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 commit
The following example shows how to configure interface description using modifySwPort_v2.
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 modifySWConfig interaface 1 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 modifySWConfig intf_description description connected_to_r1 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 review Commands in queue: modifySwPort_v2 modifySWConfig interaface 1 modifySwPort_v2 modifySWConfig intf_description description connected_to_r1 Switch(config-controller-ProvisionPortVlanPortType)# modifySwPort_v2 commit
Deleting Switch Ports
Example
Switch# configure terminal Switch(config)# controller nid 1/1 Switch(config-controller)# ProvisionPortVlanPortType Switch(config-controller-ProvisionPortVlanPortType)# deleteSwPort deleteSwPortReq interaface 5 Switch(config-controller-ProvisionPortVlanPortType)# deleteSwPort deleteSwPortReq mode access Switch(config-controller-ProvisionPortVlanPortType)# deleteSwPort review Commands in queue: deleteSwPort deleteSwPortReq interaface 5 deleteSwPort deleteSwPortReq mode access Switch(config-controller-ProvisionPortVlanPortType)# deleteSwPort commit DeleteSwPort_Output.deleteSwPortResp = 0 Delete SwitchPort Commit Success!!!
Verifying Switch Port Details
The following is a sample output to verify all details of the switch ports:
Switch(config-controller-ProvisionPortVlanPortType)# showSwPort showSwPortReq all all
Commands in queue: showSwPort showSwPortReq all all
Switch(config-controller-ProvisionPortVlanPortType)# showSwPort commit
ShowSwPort_Output.showSwPortResp.interface_list[0].name = 'GigabitEthernet 1/1' ShowSwPort_Output.showSwPortResp.interface_list[0].admin_mode = 'trunk' ShowSwPort_Output.showSwPortResp.interface_list[0].access_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[0].trunk_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[0].trunk_members = '1-4095' ShowSwPort_Output.showSwPortResp.interface_list[1].name = 'GigabitEthernet 1/2' ShowSwPort_Output.showSwPortResp.interface_list[1].admin_mode = 'trunk' ShowSwPort_Output.showSwPortResp.interface_list[1].access_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[1].trunk_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[1].trunk_members = '1-4095' ShowSwPort_Output.showSwPortResp.interface_list[2].name = 'GigabitEthernet 1/3' ShowSwPort_Output.showSwPortResp.interface_list[2].admin_mode = 'trunk' ShowSwPort_Output.showSwPortResp.interface_list[2].access_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[2].trunk_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[2].trunk_members = '1-4095' ShowSwPort_Output.showSwPortResp.interface_list[3].name = 'GigabitEthernet 1/4' ShowSwPort_Output.showSwPortResp.interface_list[3].admin_mode = 'trunk' ShowSwPort_Output.showSwPortResp.interface_list[3].access_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[3].trunk_mode = 2 ShowSwPort_Output.showSwPortResp.interface_list[3].trunk_members = '1-4095' ShowSwPort_Output.showSwPortResp.interface_list[4].name = 'GigabitEthernet 1/5' ShowSwPort_Output.showSwPortResp.interface_list[4].admin_mode = 'access' ShowSwPort_Output.showSwPortResp.interface_list[4].access_mode = 120 ShowSwPort_Output.showSwPortResp.interface_list[4].trunk_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[4].trunk_members = '1-4095' ShowSwPort_Output.showSwPortResp.interface_list[5].name = 'GigabitEthernet 1/6' ShowSwPort_Output.showSwPortResp.interface_list[5].admin_mode = 'access' ShowSwPort_Output.showSwPortResp.interface_list[5].access_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[5].trunk_mode = 1 ShowSwPort_Output.showSwPortResp.interface_list[5].trunk_members = '1-4095' Show SwitchPort Commit Success!!!