beautypg.com

Configuration example, Network requirements – H3C Technologies H3C WX5500E Series Access Controllers User Manual

Page 135

background image

124

Step Command

Remarks

2.

Associate MAC
addresses with a VLAN.

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

With dynamic MAC-based VLAN
assignment enabled, a port is
automatically assigned to the VLAN

in the MAC address-to-VLAN entry

that is exactly matched by the source
MAC address of the packet received

on the port.

3.

Enter 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.

Configure VLAN
matching precedence.

vlan precedence mac-vlan

Optional.
By default, VLANs are preferentially

matched based on MAC addresses.

8.

Disable the PVID of the
port from forwarding

packets with unknown
source MAC addresses

that do not match any

MAC address-to-VLAN
entry.

port pvid disable

Optional.
By default, when a port receives a
packet with an unknown source MAC

address that does not match any
MAC address-to-VLAN entry, it

forwards the packet in its PVID.

When you use the mac-vlan trigger enable command to enable dynamic MAC-based VLAN assignment,

H3C recommends that you configure the vlan precedence mac-vlan command, so that VLANs are

assigned based on single MAC addresses preferentially. When dynamic MAC-based VLAN assignment

is enabled, H3C does not recommend configuring the vlan precedence ip-subnet-vlan command, which
will make the system assign VLANs based on IP subnets, because the configuration does not take effect.
Dynamic MAC-based VLAN assignment works only when an exact match is found, or in other words,

when the source MAC address of an untagged incoming packet matches a MAC address-to-VLAN entry

whose mask is all Fs. In this case, the port adds the source MAC address to its MAC address table, and
automatically joins the matched VLAN. Dynamic MAC-based VLAN assignment does not work when no

match or a fuzzy match (mask of the matched entry is not all Fs) is found.

Configuration example

Network requirements

As shown in

Figure 38

:

GigabitEthernet 1/0/1 of Device A and Device C are each connected to a meeting room. Laptop
1 and Laptop 2 are used for meetings and might be used in either of the two meeting rooms.

Different departments own Laptop 1 and Laptop 2. The two departments use VLAN 100 and VLAN
200, respectively.

The MAC address of Laptop 1 is 000D-88F8-4E71, and that of Laptop 2 is 0014-222C-AA69.