beautypg.com

Configuring dynamic mac-based vlan assignment – H3C Technologies H3C S5560 Series Switches User Manual

Page 165

background image

131

Step Command

Remarks

5.

Configure the hybrid port

to forward packets from
the MAC-based VLANs.

port hybrid vlan vlan-id-list { tagged |
untagged }

By default, a hybrid port is an
untagged member of the VLAN to
which the port belongs when its

link type is access.

6.

Enable the MAC-based
VLAN feature.

mac-vlan enable

By default, this feature is disabled.

7.

(Optional.) Configure
VLAN matching order.

vlan precedence { mac-vlan |
ip-subnet-vlan }

By default, the system assigns
VLANs based on the MAC

address preferentially.

Configuring dynamic MAC-based VLAN assignment

Step Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Create a MAC-to-VLAN
entry.

mac-vlan mac-address mac-address
vlan vlan-id [ dot1q priority ]

The VLAN assignment for a port is
triggered only when the source
MAC address of its receiving packet

exactly matches the MAC address

in the MAC-to-VLAN entry.

3.

Enter Layer 2 Ethernet
interface view.

interface interface-type
interface-number

N/A

4.

Configure the link type of
the port as hybrid.

port link-type hybrid

By default, all ports are access
ports.

5.

Enable the MAC-based
VLAN feature.

mac-vlan enable

By default, MAC-based VLAN is
disabled.

6.

Enable dynamic
MAC-based VLAN

assignment.

mac-vlan trigger enable

By default, dynamic MAC-based
VLAN assignment is disabled.

7.

(Optional.) Configure
VLAN matching order.

vlan precedence { mac-vlan |
ip-subnet-vlan }

By default, the system assigns
VLANs based on the MAC address

preferentially..
When you enable dynamic
MAC-based VLAN assignment,

H3C recommends that you

configure the vlan precedence
mac-vlan command to ensure the

priority of MAC-based VLAN

matching. If you execute the vlan
precedence ip-subnet-vlan

command, the command will not

take effect.

8.

(Optional.) Disable the port
from forwarding packets

that fail the exact MAC

address match in its PVID.

port pvid forbidden

By default, when a port receives
packets whose source MAC

addresses fail the exact match, the
port forwards them in its PVID.