We have introduced the configuration of the DHCP Server of the H3C switch. I wonder if you have a clear idea. Here, we will continue with the previous article to explain the content of the DHCP Relay configuration of the H3C switch.
H3C switch DHCP Relay configuration 1> Configure Environment Parameters
1. the IP address of the DHCP Server is 192.168.0.10/24.
2. the DHCP Server is connected to port G1/1 of the vswitch and belongs to vlan100. The Gateway is the IP address 192.168.0.1/24 of vlan Interface 100 of the vswitch.
3. E0/1-E0/10 belongs to vlan10, And the CIDR block address is 10.10.1.1/24.
4. E0/11-E0/20 belongs to vlan20 and its cidr block address is 10.10.2.1/24.
H3C switch DHCP Relay configuration 2> networking requirements
1. Configure DHCP Relay on SwitchA so that the following users can dynamically obtain the IP address of the specified CIDR block.
2. Both PC1 and PC2 can ping their own gateways, while PC1 and PC2 can communicate with each other.
H3C switch DHCP Relay configuration 3> switch DHCP Relay configuration process
DHCP Relay is used to adapt to situations where the client and Server are not in the same network segment. Through Relay, users of different subnets can apply for an IP address from the same DHCP Server, this facilitates the management and maintenance of the address pool.
H3C switch DHCP Relay configuration 4> SwitchA Configuration
1. DHCP is enabled by default)
[SwitchA] dhcp enable
2. Create and enter) VLAN100
[SwitchA] vlan 100
3. Add G1/1 to VLAN100
[SwitchA-vlan100] port GigabitEthernet 1/1
4. Create and enter) VLAN Interface 100
[SwitchA] interface Vlan-interface 100
5. Configure IP addresses for VLAN Interface 100
[SwitchA-Vlan-interface100] ip address 192.168.0.1 255.255.255.0
6. Create and enter) VLAN10
[SwitchA] vlan 10
7. Add E0/1-E0/10 to VLAN10
[SwitchA-vlan10] port Ethernet 0/1 to Ethernet 0/10
8. Create and enter) VLAN Interface 10
[SwitchA] interface Vlan-interface 10
9. Configure IP addresses for VLAN 10
[SwitchA-Vlan-interface10] ip address 10.10.1.1 255.255.255.0
10. enable DHCP relay for VLAN Interface 10
[SwitchA-Vlan-interface10] dhcp select relay
11. Configure the IP address of the DHCP server for VLAN 10.
[SwitchA-Vlan-interface10] ip relay address 192.168.0.10
12. Create and enter) VLAN20
[SwitchA-vlan10] vlan 20
13. Add E0/11-E0/20 to VLAN20
[SwitchA-vlan20] port Ethernet 0/11 to Ethernet 0/20
14. Create and enter) VLAN Interface 20
[SwitchA] interface Vlan-interface 20
15. Configure IP addresses for VLAN Interface 20
[SwitchA-Vlan-interface20] ip address 10.10.2.1 255.255.255.0
16. DHCP relay function enabling VLAN Interface 20
[SwitchA-Vlan-interface20] dhcp select relay
17. Configure the IP address of the DHCP server for VLAN 20
[SwitchA-Vlan-interface20] ip relay address 192.168.0.10
H3C switch DHCP Relay configuration 5> additional instructions
You can also enable the DHCP relay function on one or more VLAN interfaces in global configuration mode. For example, [SwitchA] dhcp select relay interface Vlan-interface 10