# Enable DHCP globally. Configure GE 0/0/2 and GE 0/0/4 on the S5328C-EI-24S as a hybrid
interface, and configure frames from VLAN 100 to pass through GE 0/0/2 in untagged
mode.
<Quidway> system-view
[Quidway] dhcp enable
[Quidway] interface gigabitethernet 0/0/2
[Quidway-GigabitEthernet0/0/2] port hybrid pvid vlan 2
[Quidway-GigabitEthernet0/0/2] port hybrid untagged vlan 2 to 100
[Quidway-GigabitEthernet0/0/2] quit
[Quidway] interface gigabitethernet 0/0/4
[Quidway-GigabitEthernet0/0/4] port hybrid pvid vlan 100
[Quidway-GigabitEthernet0/0/4] port hybrid untagged vlan 100
[Quidway-GigabitEthernet0/0/4] quit
# Configure DHCP policy VLAN based on MAC addresses.
<Quidway> system-view
[Quidway] vlan 100
[Quidway-vlan100] dhcp policy-vlan mac-address 001E-9089-C65A priority 5
[Quidway-vlan100] dhcp policy-vlan mac-address 00E0-4C84-0B44 priority 5
[Quidway-vlan100] quit
2. Verify the configuration.
# After PC1 and PC2 go online and obtain IP addresses, ping the DHCP server from PC1
and PC2. The ping operations are successful.
C:\>ping 192.168.31.251
Pinging 192.168.31.251 with 32 bytes of data:
Reply from 192.168.31.251: bytes=32 time=126ms TTL=255
Reply from 192.168.31.251: bytes=32 time=2ms TTL=255
Reply from 192.168.31.251: bytes=32 time=2ms TTL=255
Reply from 192.168.31.251: bytes=32 time=2ms TTL=255
Ping statistics for 192.168.31.251:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum LS-S5352C-EI = 2ms, Maximum = 126ms, Average = 33ms