SRX Services Gateway
SRX Services Gateway

DHCP server offerring addressed through relay-agent

10.10.11   |  
‎10-10-2011 09:54 AM

I searched almost all the problems in this board, but didn't find a similar one.


I know how to config a dhcp server in srx, but my question is I need to hand out these addresses through a relay-agent to the end user, as SRX need the interface that receiving dhcp-request has the same IP address with the dhcp pool, however this is not workable for my situation.

it's more like I need to configure the receiving interface's ip address in a subnet, and configure the dhcp pool in another subnet as the relay-agent's receiving interface.


|                          |

|pool 10.1.1/24|

|                          |

---------------------                                                    fe0/1                                                                                                    

   SRX---------------------------------------------switch-----------------------PC| expected to acquire etc.|

         fe0/0          fe0/0192.168.1.2        


Anyone has faced this problem? Is it possible to work it out through SRX?

SRX Services Gateway

Re: DHCP server offerring addressed through relay-agent

10.16.11   |  
‎10-16-2011 01:08 PM
this is a complex requirement ...

better and easy way is that you put the switch in layer-2 and forward dhcp-request packets directly to SRX which has an interface (you disliking this ... )

1. configure dhcp relay on switch
2. configure a different dhcp pool on SRX (like
3. Assign a loopback from this subnet e.g.
4. configure switch's default-router as

it should work ...

Hafiz Muhammad Farooq
IBM Qradar Deployment Professional

[Please mark it as Accepted Solution if it works, Kudos if you like]

SRX Services Gateway

Re: DHCP server offerring addressed through relay-agent

10.20.11   |  
‎10-20-2011 01:52 AM


I tried the solution you gave, it didn't work.

the actual topology is more complecated, i just simply it here.

I tried to configure a loopback interface in SRX, and configure a EX4200 to be the dhcp relay, I can't obtain the address from connecting to EX4200 while I can obtain the IP address from connecting to SRX directly. I showed the helper statistics in EX4200, i can see all the packets it received had been forwarded.


I'm not sure if it's because I configured the loopback interface in SRX and the customer facing interface the same IP address, both of them are which is the gateway for the customer.


Anyway, if you have successfully done this before, can you post a sample configuration for me? Thank you!