SRX Services Gateway
Posts: 23
Registered: ‎08-05-2009

DHCP server offerring addressed through relay-agent

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?

Recognized Expert
Posts: 379
Registered: ‎02-28-2010

Re: DHCP server offerring addressed through relay-agent

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]

Posts: 23
Registered: ‎08-05-2009

Re: DHCP server offerring addressed through relay-agent


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!

Copyright© 1999-2015 Juniper Networks, Inc. All rights reserved.