Native VLAN configuration for Mellanox switches

I know the default native vlan on hybrid port is VLAN 1.

Do we have a command to configure/change this default native vlan on Mellanox switch?

See the below commands:

[standalone: master] > enable

[standalone: master] # configure terminal

[standalone: master] (config) # vlan 3

[standalone: master] (config vlan 3) exit

[standalone: master] (config) # interface ethernet 1/1

[standalone: master] (config interface ethernet 1/1) # switchport mode hybrid

[standalone: master] (config interface ethernet 1/1) # switchport access vlan 3

Verify with the following command:

config) # show interface switchport

Interface Mode Access vlan Allowed vlans

Eth1/1 hybrid 3



You need to create new VLAN, and assign it to the relevant ports.



Could you clarify when we use “hybrid” mode? I am rather familiar with Cisco and know mode like “access”, or “trunk”.

Also, if Mellanox Switches have another new switchport mode?

See here:

HowTo Configure Switch Port Types with MLNX-OS


I don’t understand your comment.

in case you send tagged packets from the server/host, you can configured trunk port on the switch.

in case you send only untagged packets, you can configure the switch to swichmode access.

in case you send tagged and untagged traffic to the switch, you can configured to hybrid.


Hmm … “Hybrid - packets are sent tagged or untagged”, so we can set hybrid mode to the switch, for example, for connection like this [Switch] → [IP Phone] → [PC] ?

In Cisco, it’s switchport mode trunk + native vlan

On Mellanox, it’s hybrid + access