switch-port
Supported in the following platforms:
- Switches — EX3524, EX3548
- Wireless Controllers — RFS4000
- Service Platforms — NX7500, NX7510, NX7520, NX7530, NX9500, NX9510, NX9600
Syntax
switchport [allowed|l2protocol-tunnel|mode|native]
switchport allowed [add <VLAN-ID>|none|remove <VLAN-ID>]
switchport l2protocol-tunnel [cdp|lldp|pvst+|spanning-tree|vtp]
switchport mode [access|hybrid|trunk]
switchport native
Parameters
switchport allowed [add <VLAN-ID>|none|remove <VLAN-ID>]
switchport allowed [add <VLAN-ID>|
none| remove <VLAN-ID>] |
Configures VLAN groups on the selected interface.
- add <VLAN-ID> – Configures the list of VLAN identifiers to add. When the add option is used, the interface is assigned to the specified VLANs, and membership in all previous VLANs is retained.
- <VLAN-ID> – Specify the list of VLANs to add.
- none – Removes all VLANs from the current list
- remove <VLAN-ID> – Configures the list of VLAN identifiers to remove. When the remove option is used, the specified VLANs are removed from the current list.
- <VLAN-ID> – Specify the list of VLANs to remove.
|
switchport l2protocol-tunnel [cdp|lldp|pvst+|spanning-tree|vtp]
switchport l2protocol-tunnel
[cdp|lldp|pvst+| spanning-tree|vtp] |
Enables layer 2 protocol tunneling (L2PT) for the specified protocol. Specify the protocol:
- cdp – Cisco Discovery Protocol
- lldp – Link Layer Discovery Protocol
- pvst+ – Cisco Per VLAN Spanning Tree Plus
- spanning-tree – Spanning Tree (STP, RSTP, MSTP)
- vtp – Cisco VLAN Trunking Protocol
L2PT is disabled for all of the above specified protocols by default.
|
switchport mode [access|hybrid|trunk]
switchport mode [access|hybrid|
trunk] |
Configures the VLAN membership mode for this port
- access – The port is configured as an access VLAN interface. It transmits and receives packets untagged frames on a single VLAN.
- trunk
– Configures the selected port as an end-point for
a VLAN trunk. A trunk link is configured between
two switches, and it carries frames on more than
one VLANs. These frames are tagged in order to
identify the source VLAN. Frames belonging to the
port‘s default VLAN are also transmitted as tagged
frames.
- hybrid
– Configures the selected port as a hybrid VLAN
interface. When configured as hybrid, the port can
transmit either tagged or untagged frames. This is
the default setting.
|
switchport native vlan <1-4094>
switchport native vlan <1-4094>
in |
Configures the VLAN membership mode for this port
- native vlan <1-4094> – Configures the port‘s VLAN ID (PVID) (this is the port‘s default VLAN ID). Frames from the specified VLAN ingress untagged at this port. The default value is 1.
When using access mode, and an interface is assigned to a new VLAN, the port‘s VLAN ID (PVID) is automatically set to the identifier for that VLAN. When using hybrid mode, the PVID for an interface can be set to any VLAN for which it is an untagged member.
|
Example
nx9500-6C8809(config-profile-testEX3524-if-ge1-20)#switchport mode access
nx9500-6C8809(config-profile-testEX3524-if-ge1-20)#show context
interface ge 1 20
shutdown
speed-duplex 100half
switchport mode access
power inline maximum allocation milliwatts 30000
power inline priority critical
power inline time-range EX3500_TimeRange_01
access-group ex3500-ext-access-list EX3500_ACL_EXT_1 in time-range EX3500_TimeRange_01
port monitor vlan 20
nx9500-6C8809(config-profile-testEX3524-if-ge1-20)#
Related Commands
no |
Removes the selected port‘s switchport characteristics |