Comware Based
cancel
Showing results for 
Search instead for 
Did you mean: 

HPE 5130 El Switch- DHCP Relay

 
SOLVED
Go to solution
Blackpepper
Frequent Visitor

HPE 5130 El Switch- DHCP Relay

Hi @ALL,

Site 1: 5130 el with multi Vlan Setting, and Auto Voice enabled.

dhcp relay on each VLan.

MPLS------> Site 0, DHCP Server enabled

Through MPLS Nertwork to Site 0 the DHCP Discover has the Source IP from the output Interface which directs to the MPLS Network, ( we use a transfer-net)., TCPDUMP checked.

I think the source IP must be the vlan-interface IP from the relay request ist started.

But, how can I do this?

dhcp relay  source-address , I know

Is there a global command, take all vlan interfaces for relay actions?

I ve 30 HPE el switches in place, but this one has always the false source.

------------------------------

JG937A Description HPE Comware Platform Software, Software Version 7.1.070, Release 3506P02 HPE 5130 48G PoE+ 4SFP+ EI Switch Copyright

 

 

  • #
  • interface Vlan-interface1
  • ip address 192.168.2.120 255.255.255.0
  • #
  • interface Vlan-interface2
  • ip address 10.4.1.254 255.255.255.0
  • dhcp select relay
  • dhcp relay server-address 10.1.254.10
  • dhcp relay server-address 10.15.245.10
  • dhcp relay server-address 10.0.5.30
  • #
  • interface Vlan-interface11
  • ip address 10.4.11.254 255.255.255.0
  • dhcp select relay
  • dhcp relay server-address 10.1.254.10
  • dhcp relay server-address 10.15.245.10
  • dhcp relay server-address 10.0.5.30
  • #
  • interface Vlan-interface30
  • ip address 10.4.30.254 255.255.255.0
  • dhcp select relay
  • dhcp relay server-address 10.1.254.10
  • dhcp relay server-address 10.15.245.10
  • dhcp relay server-address 10.0.5.30
  • #
  • interface Vlan-interface40
  • ip address 10.4.40.254 255.255.255.0
  • dhcp select relay
  • dhcp relay server-address 10.1.254.10
  • dhcp relay server-address 10.15.245.10
  • dhcp relay server-address 10.0.5.30
  • #
  • interface Vlan-interface51
  • ip address 10.4.51.254 255.255.255.0
  • dhcp select relay
  • dhcp relay server-address 10.1.254.10
  • dhcp relay server-address 10.15.245.10
  • dhcp relay server-address 10.0.5.30
  • #
  • interface Vlan-interface65
  • ip address 10.4.65.254 255.255.255.0
  • dhcp select relay
  • dhcp relay server-address 10.1.254.10
  • dhcp relay server-address 10.15.245.10
  • #
  • interface Vlan-interface100
  • ip address 10.4.100.254 255.255.255.0
  • #
  • interface Vlan-interface239
  • ip address 10.4.239.254 255.255.255.0
  • #
  • interface Vlan-interface250
  • ip address 10.4.250.254 255.255.255.0
  • dhcp select relay
  • dhcp relay server-address 10.1.254.10
  • dhcp relay server-address 10.15.245.10
  • #
  • interface Vlan-interface255
  • ip address 10.4.255.254 255.255.255.0
  • #
  • interface Vlan-interface930
  • ip address 172.30.0.30 255.255.255.248
  • #

 

4 REPLIES 4
Ivan_B
HPE Pro

Re: HPE 5130 El Switch- DHCP Relay

Hi @Blackpepper !

I am afraid "I think the source IP must be the vlan-interface IP from the relay request ist started." is pretty wrong assumption. The default and standard behavior is this one:

The DHCP relay agent uses the IP address of the interface that connects to the DHCP server as the source IP address for relayed DHCP requests.

"the interface that connects to the DHCP server" in your case is the closest interface to the DHCP server, e.g. the uplink interface to MPLS. So your switch should send relayed messages from DHCP client using MPLS-facing interface's IP address as source IP, but your DHCP Server when sends DHCP Offer or Ack it uses IP address of internal interface that faces DHCP client. Look at this example here (sourced from https://www.netmanias.com/en/post/techdocs/6000/dhcp-network-protocol/understanding-dhcp-relay-agents:  

image.png
 

Source IP address means nothing to DHCP server, it just serves one role - a destination were the server should send its replies, transport address for DHCP messages. The identification of source interface from which DHCP Discover and Request come is only one - 'giaddr' field (Relay Agent IP address) in the DHCP packet sent by the switch. It should contain IP address of internal interface where original DHCP message was received from the DHCP Client. Only this field should be used by your server to decide which DHCP pool to use for address assignment. If your server does something else, it does it wrong. You can check RFC 2131 https://tools.ietf.org/html/rfc2131#page-26:

A new address allocated from the server's pool of available addresses; the address is selected based on the subnet from which the message was received (if 'giaddr' is 0) or on the address of the relay agent that forwarded the message ('giaddr' when not 0).

If due to some reason you need to override source IP address selection for DHCP Relay, you already know how to do it - using interface-view command "dhcp relay source-address" command, but there is no global command to overrride the standard source IP address se for all interfaces.

 

 

I am an HPE employee

Accept or Kudo

Blackpepper
Frequent Visitor

Re: HPE 5130 El Switch- DHCP Relay

Thanks, for your time ivan. The dhcp guidline is very helpful. We have the same switches 5130 el on many sites.

A few were with the "transfer-net" in place, but the source ist not the tranfernet interface, rather the vlan-interface!

thats why the dhcp works properly. No one has made a "deeper" config for each vlan interface.


interface Vlan-interface250
ip address 10.16.250.254 255.255.255.0
dhcp select relay
dhcp relay server-address 10.1.254.10
dhcp relay server-address 10.15.245.10
#
return

 

Thats similar to the other vlans. Now I ve the switch i descriped yesteerday who sends the uplink ip as souce.

The other 5130 devices with transfernet not. Which part could be a false default vlan in an uplink?

version info who works:
BOARD TYPE: 5130-24G-SFP-4SFP+ EI
DRAM: 1024M bytes
FLASH: 512M bytes
PCB 1 Version: VER.B
Bootrom Version: 147
CPLD 1 Version: 002
Release Version: HPE 5130 24G SFP 4SFP+ EI JG933A-3116P05
Patch Version : None
Reboot Cause : ColdReboot

Ivan_B
HPE Pro
Solution

Re: HPE 5130 El Switch- DHCP Relay

Oh, now I see where is the root cause of this discrepancy - since 3207 release this behavior has been changed and now DHCP Relay 5130 uses IP address of the interface which is outgoing interface for the route to DHCP Server. In previous versions, like 31xx it was different - they used IP address of the client-facing interface, the one where broadcast messages from DHCP Client arrive. I double checked it in my lab using 3208P18 (new behavior) and 3116P05 (old behavior).

This switch that you are complaining about is running 3506P02, the rest 30 that work "fine" are running 3116P05 (at least according the information from your last message). So, if you find the old behavior as more suitable for your puproses (which is strange, because I don't really understand what's the whole point to stick to it) you can just use "dhcp relay  source-address" command under each client's Vlan-interface context or downgrade your switch to 3116P05 (which I don't recommend) and it will start behaving according your expectations.

 

 

I am an HPE employee

Accept or Kudo

Blackpepper
Frequent Visitor

Re: HPE 5130 El Switch- DHCP Relay

Hi Ivan,

thx a lot for your great help. Now its clear and I know there isnt a config error. Downgrade is no solution, I would like to edit the vlan interfaces at all.

/closed

regards.