Page 45
6.1.22 VLAN Interface Configuration (SWITCHPORT)
The
switchport
command provides the ability to configure VLAN interfaces on the switch.
To configure the VLAN interfaces, use the
switchport
command from the CLI prompt. A list of options is
displayed when the
switchport -h
command is entered.
>switchport
Description:
switchport - vlan interface configuration
Syntax:
switchport [-h]
switchport [-p pNum] -s
switchport -p pNum -mode {access|tunnel|trunk}
switchport -p pNum -vid vlanId
switchport -p pNum -nvlan vlanId
switchport -p pNum {-add|-rem|-allow} vlanList
Switches:
-add trunk port add VLAN ID, [vlanList]: {1..4095|all}
-allow trunk port replace current list, [vlanlist]: {1..4095|all}
-h display help information
-mode port mode type: {access|tunnel|trunk}
[access] access port type
[trunk] trunk port type
[tunnel] tunnel port type
-nvlan native vlan assignment for trunk port, [vlanId]: {0..4095}
vlanId set to 0 removes the native vlan configuration
-p port number, [pNum]: {F1|F2|1..8|mgt1}
-rem trunk port remove VLAN ID, [vlanList]: {1..4095|all}
-s show current configuration
-vid vlan id assignment for access/tunnel port, [vlanId]: {1..4095}
>
NOTE: Port number selection will vary depending on the model.
The options available using the
switchport
command are shown below.
The
-add
switch adds one or more VLANs to an existing trunk port VLAN list.
The
-allow
switch replaces the current VLANs on a trunk port with the provided VLAN list.
The
-h
switch displays the help screen presented above. It is static and provides help information for the
specific command.
The
-mode
switch configures the port type; access, trunk or tunnel.
The
-nvlan
configures the trunk port with native VLAN assignment.
The
-p
switch selects the port number for assignment.
The
-rem
switch removes one or more VLANs from an existing trunk port VLAN list.
The
-s
switch displays the VAN configuration.
The
-vid
switch configures a VLAN ID to an access or tunnel port.
When a native VLAN is configured, all untagged traffic on the trunk port is set to the VLAN ID associated
with the native VLAN. Traffic assigned to a native VLAN when transmitted on a trunk port will be untagged.
Untagged traffic received on a trunk port will be assigned to the VLAN associated with the native VLAN.