Hello Jean-Baptiste,
Well, maybe another approach is to add the following command/feature to the aforementioned setup and check if this will suit your needs:
remote-server
Use remote-server to specify DHCP servers for a DHCP relay address pool.
Use undo remote-server to remove DHCP servers from a DHCP relay address pool.
Syntax
remote-server ip-address&<1-8> [ public | vpn-instance
vpn-instance-name ]
undo remote-server [ ip-address&<1-8> ]
Default
No DHCP server is specified for the DHCP relay address pool.
Views
DHCP address pool view
Predefined user roles
network-admin
Parameters
ip-address&<1-8>: Specifies a space-separated list of up to eight DHCP server addresses.
public: Specifies the DHCP servers on the public network.
vpn-instance vpn-instance-name: Specifies the name of the MPLS L3VPN instance to
which the DHCP servers belong. The instance name is a case-sensitive string of 1 to 31 characters.
Usage guidelines
If you execute this command multiple times, the most recent configuration takes effect.
If you do not specify a DHCP server address, the undo remote-server command removes all
DHCP servers in the DHCP address pool.
If neither the public keyword nor the vpn-instance vpn-instance-name option is specified,
DHCP servers on the same network as the DHCP client are selected.
Examples
# Specify DHCP server 10.1.1.1 for DHCP address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] remote-server 10.1.1.1
Hope this helps!
EDIT:
You have to use the following command to apply pool under the interface:
dhcp relay pool
Use dhcp relay pool to specify a DHCP relay address pool for DHCP clients.
Use undo dhcp relay pool to remove a DHCP relay address pool.
Syntax
dhcp relay pool pool-name [ option { 60 [ option-text ] | code } ]
undo dhcp relay pool [ pool-name [ option { 60 [ option-text ] | code } ] ]
Default
No DHCP relay address pool is specified for DHCP clients.
Views
Layer 3 Ethernet interface view
Layer 3 Ethernet subinterface view
Layer 3 aggregate interface view
Layer 3 aggregate subinterface view
Predefined user roles
network-admin
Parameters
pool-name: Specifies a DHCP relay address pool by its name, a case-insensitive string of 1 to 63
characters.
option { 60 [ option-text ] | code }: Specifies the option setting to match DHCP requests.
If you do not specify this option, the DHCP relay address pool can match all DHCP requests.
• The 60 keyword specifies Option 60. The option-text argument specifies Option 60 content, a
case-sensitive string of 1 to 128 characters. This argument is used to match Option 60 content
in DHCP requests and is configurable only when the 60 keyword is specified.
• The code argument specifies an option value in the range of 1 to 59 or 61 to 254.
Usage guidelines
After you configure multiple DHCP relay address pools on a DHCP relay agent, you can specify
these pools on an interface. To match DHCP clients based on options, you can define option settings
when you specify the relay address pools.
If you specify multiple DHCP relay address pools on an interface, the relay agent selects a DHCP
relay address pool for a DHCP client as follows:
1. Compares option values in the DHCP request in descending order against option values in
DHCP relay address pools.
If a match (other than 60) is found, the matching process stops and the relay agent selects
that matching relay address pool.
If the matching option value is 60, the relay agent continues to compare the Option 60
content in the request and the Option 60 string in the relay address pool:
− If the Option 60 content matches the string, the relay address pool is selected.
− If the Option 60 content does not match the string, the relay address pool is not selected.
If another relay address pool is specified to match a request carrying Option 60 but has
no Option 60 string defined, the relay agent selects that relay address pool.
2. If still no DHCP relay address pool is matched, the relay agent selects the DHCP relay address
pool with no options specified.
If you specify DHCP servers by configuring both the following methods on an interface, the DHCP
relay address pool setting takes effect.
• Specify DHCP relay address pools by using the dhcp relay pool command.
• Specify DHCP servers directly on an interface by using the dhcp relay server-address
command.
When you specify a DHCP relay address pool on an interface to define the DHCP servers, make
sure the remote-server command is configured in the DHCP relay address pool. Otherwise, the
relay agent drops DHCP requests. The DHCP requests are not forwarded to any DHCP server even
if the dhcp relay server-address command is configured.
If you execute this command multiple times to specify different DHCP address pools for the same
DHCP client, the most recent configuration takes effect.
If you do not specify a DHCP address pool, the undo dhcp relay pool command removes all
DHCP address pools specified on the interface.
Examples
# Specify DHCP relay address pool pool1 on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] dhcp relay pool pool1
Related commands
dhcp relay server-address
------------------------------
-Alex-
------------------------------
Original Message:
Sent: Apr 25, 2022 11:46 AM
From: Jean-Baptiste PHILIPPIN
Subject: [HPE 5945] - DHCP relay with several DHCP servers
Hello Alex,
Thanks for our answer :)
So the feature allowing to configure a "pool" of DHCP servers isn't available anymore ?
For instance, i have 200 VLAN interfaces to configure with 10 DHCP relay servers each, and of course, not the same relay servers, depending on the VLAN purpose. Is there a simple way to do that ?
Best regards,
JB
------------------------------
Jean-Baptiste PHILIPPIN
Original Message:
Sent: Apr 25, 2022 11:13 AM
From: Alexander Maroukian
Subject: [HPE 5945] - DHCP relay with several DHCP servers
Hello Jean-Baptise,
Please check the example on the following page it is for comware 7 (5130) but it is the same for 5945:
https://techhub.hpe.com/eginfolib/networking/docs/switches/5130ei/5200-3942_l3-ip-svcs_cg/content/483572375.htm
-
Assign IP addresses to interfaces on the switches. (Details not shown.)
-
Configure Switch B and Switch C as DHCP servers. (Details not shown.)
-
Configure the DHCP relay agent on Switch A:
# Enable DHCP.
<SwitchA> system-view[SwitchA] dhcp enable
# Enable the DHCP relay agent on VLAN-interface 2.
[SwitchA] interface vlan-interface 2[SwitchA-Vlan-interface2] dhcp select relay
# Specify the IP addresses of the DHCP servers.
[SwitchA-Vlan-interface2] dhcp relay server-address 1.1.1.1[SwitchA-Vlan-interface2] dhcp relay server-address 2.2.2.2
# Specify the DHCP server selecting algorithm as master-backup.
[SwitchA-Vlan-interface2] dhcp relay server-address algorithm master-backup
# Configure the DHCP relay agent to switch back to the master DHCP server 3 minutes after it switches to the backup DHCP server.
[SwitchA-Vlan-interface2] dhcp relay master-server switch-delay 3
Hope this helps!
------------------------------
-Alex
Original Message:
Sent: Apr 21, 2022 12:07 PM
From: Jean-Baptiste PHILIPPIN
Subject: [HPE 5945] - DHCP relay with several DHCP servers
Switch : HPE FF 5945
COMWARE : 7.1.070 Rel 6607
Hello there,
I'm trying to configure a DHCP relay on a switch with multiple DHCP servers. The previous commands I use to implement was :
dhcp relay server-group 1 ip 12.34.56.78
dhcp relay server-group 1 ip 98.76.54.32
Then, on the vlan interface :
dhcp select relay
dhcp relay server-select 1"
However, this seems not to work anymore with the COMWARE 7. What is the new configuration to implement multiple dhcp server on a dhcp relay ?
------------------------------
Jean-Baptiste PHILIPPIN
------------------------------