set interface gigabit-ethernet family ethernet-switching port-mode


The set interface gigabit-ethernet family ethernet-switching port-mode command configures the port mode of a switch port.


Command Syntax

set interface gigabit-ethernet <interface-name> family ethernet-switching port-mode <port-mode>


Parameter

Parameter

Description

gigabit-ethernet <interface-name>

Specifies a physical port name. The value is like ge-1/1/1, te-1/1/3.

port-mode <port-mode>

Specifies the port mode. The value could be access, trunk, pvlan-host, pvlan-secondary-trunk, pvlan-promiscuous or pvlan-promiscuous-trunk.

  •   access: Configures the port mode to access.
  •   trunk: Configures the port mode to trunk.
  •   pvlan-host: Configures the port mode to pvlan-host.
  •   pvlan-secondary-trunk: Configures the port mode to pvlan-secondary-trunk.
  •   pvlan-promiscuous: Configures the port mode to pvlan-promiscuous.
  •   pvlan-promiscuous-trunk: Configures the port mode to pvlan-promiscuous-trunk.

By default, the port mode is access.


Usage Guidelines

There are six port modes, the last four of these modes are used for PVLAN. Only when configured with a PVLAN port mode, a port can be added into a private VLAN.

NOTE:

After modifying the port mode, the port will be restarted automatically.

The characteristics of different port modes:

  • Access Port

An access interface connects to a user device. It can connect only to an access link, and Ethernet frames transmitted on the access link are untagged. An access interface adds a VLAN tag to packets and sets the VID field in the VLAN tag to the native VLAN ID.

  • Trunk Port

A trunk interface connects to a switch and can connect only to a trunk link. A trunk interface allows frames from multiple VLANs to pass.

  • PVLAN Host Port

A PVLAN host port connects to a user device. For host mode ports, make sure that their native VLAN is a secondary VLAN, otherwise the ports won’t be able to forward packets from primary VLAN. One host port can be added into only one secondary VLAN.

Packets sent from this port are untagged.

  • PVLAN Secondary Trunk Port

A PVLAN secondary trunk port is used to connect to the downstream devices. One secondary trunk port can be added into more than one secondary VLAN. Secondary trunk mode is applicable to scenarios where multiple secondary VLANs need to pass through the downlink port while Host mode is applicable to cases where only one secondary VLAN passes through the downlink port.

The primary VLAN ID carried by the packets is replaced with the corresponding secondary VLAN ID on the outbound side of the secondary trunk mode port, thus masking the primary VLAN for the downstream device. By default, packets sent from this port will be tagged (tagged/untagged can be configured through CLI command).

NOTE:

  • Secondary trunk mode ports can be added to only one secondary VLAN of the same primary VLAN, but can be added to multiple secondary VLANs associated with different primary VLANs.
  • PVLAN secondary trunk port can also be added to normal VLANs in addition to the secondary VLANs.
  • PVLAN Promiscuous Port

PVLAN promiscuous ports are used to connect to the uplink devices. Uplinks are typically ports that connect to routers, firewalls, servers or provider networks.

Promiscuous ports belong to the primary VLAN, which can communicate with all PVLAN ports, including host/secondary trunk ports and other promiscuous/promiscuous trunk ports within the same primary VLAN.

A promiscuous port can serve only one primary VLAN, one isolated VLAN, and multiple community VLANs.

Make sure that the native VLAN of the promiscuous port is the primary VLAN, otherwise the port will not forward packets sent from a secondary VLAN.

Promiscuous port mode is used when there is only one primary VLAN passing through the uplink port. Packets sent from this port are untagged.

  • PVLAN Promiscuous Trunk Port

PVLAN promiscuous trunk ports are used to connect to the uplink devices. Promiscuous trunk port mode is used when there are more than one primary VLAN passing through the uplink port.

The secondary VLAN ID carried by the message is replaced with the corresponding primary VLAN ID on the outbound side of the port, thus masking the secondary VLAN for the uplink device. By default, packets sent from this port will be tagged (tagged/untagged can be configured through CLI command).

NOTE:

PVLAN Promiscuous trunk ports can also be added to normal VLANs in addition to the primary VLANs.


Example

  • Configure the port mode of ge-1/1/1 to access.
admin@Xorplus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching port-mode access
admin@Xorplus# commit

Copyright © 2024 Pica8 Inc. All Rights Reserved.