DHCP RelayThe binding process between the IP address and the MAC address is as follows:
One Networking requirement:
1. Bind IP + MAC + Port to PC1 on the vswitch so that only the PC PC1 can access the Internet at Port 0/1 of the vswitch;
2. Use the DHCP Relay function of the Switch to enable address-check on SwitchB. the mac address of PC1 is 000f-1fb8-fcb8, And the IP address of PC1 is set to 10.1.1.2.
2. Networking diagram:
Step 3:
1. Create and enter) VLAN10
[H3C] vlan 10
2. Add E0/1 to VLAN10
A [H3C-vlan10] port Ethernet 0/1
3. Create and enter) VLAN Interface 10
[H3C] interface Vlan-interface 10
4. Configure IP addresses for VLAN 10
[H3C-Vlan-interface10] ip address 10.1.1.1 255.255.255.0
5. configure a hypothetical DHCP server address for VLAN 10
[H3C-Vlan-interface10] ip relay address 1.1.1.1
6. Security Features of DHCP Relay enabling VLAN Interface 10 for user address legality check
[H3C-Vlan-interface10] dhcp relay security address-check enable
7. Configure the security address table for DHCP Relay
[H3C] dhcp relay security 10.1.1.2 000f-1fb8-fcb8 static
Four key points of Configuration:
1. After the above configuration, You can bind the IP address of PC1 to the MAC address statically;
2. if you want to complete access to PC1 with the IP address 10.1.1.2 and MAC address 000f-1fb8-fcb8 under port 0/1 of the vswitch, the PCs using other IP addresses or MAC addresses cannot access the Internet through port 0/1, manually bind the MAC address of PC1 to port 0/1, and configure the maximum number of MAC addresses on port 0/1 as 0:
- [H3C]mac-address static 000f-1fb8-fcb8 interface Ethernet 0/1 vlan 10
-
- [H3C]interface Ethernet 0/1
-
- [H3C-Ethernet0/1]mac-address max-mac-count 0
If you want to allow only PC1 to access the Internet through port 0/1, You need to bind other ports on the switch to the MAC address of other PCs;
3. devices that support this function include: H3C 3600, H3C 5600, Quidway S3500, Quidway S3900, Quidway S5600, and Quidway S3526 series switches.
DHCP Relay is used to bind the IP address to the MAC address.