DHCP address assignment gives out an IP from another network pool than expected
Steps to reproduce:
Problem follows the steps below:
DHCP Client is set on access port with vlan 26. DHCP client has a vlan26 ip address and works fine
The DHCP client is moved to a port with a different vlan 32. DHCP client gets an ip address as expected on vlan32.
The customer changes the vlan32 on the port where the DHCP client was connected to the access vlan26 on the previous port. Here the DHCP client remains with an ip address on the vlan32 even though the switch's access port was set for vlan26. Up to here it is expected, since the client has no way of knowing the vlan has been changed, hence no new DHCP discover is sent after the configuration change.
Then after doing /release and /renew on the dhcp client, an option-50 is sent from the client to the server asking for the wrong vlan32 and is unable to get an ip address from the DHCP server on the vlan26 as expected, flapping the port or using release/renew did not resolve the problem, option-50 on the client's DHCP discovery packet is included by the client and prevents this from getting to the right vlan's ip address pool.
Summary:
The DHCP client is connected to EX switch in vlan B. It requests the same IP address that was previously assigned to it in vlan A (this behavior is explained in RFC 2131 , section 3.2). At this point, the EX4650 DHCP server will provide an IP address of the pool related to vlan A even though the request will reach the EX4650 via vlan B.
Configuring the following command will address this problem.
The command will keep the EX from providing an IP address from an incorrect pool just because the end-user device is requesting it.
set system services dhcp-local-server requested-ip-interface-match
https://supportportal.juniper.net/s/article/SRX-SRX-assigns-an-IP-address-from-a-wrong-DHCP-pool-to-DHCP-client-in-certain-scenario