SRX Services Gateway
Reply
Contributor
shinyviolet
Posts: 23
Registered: ‎08-05-2009
0

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 10.1.1.1                                                                                                    

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

         fe0/0 192.168.1.1/30          fe0/0192.168.1.2        

 

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

Recognized Expert
rasmus
Posts: 377
Registered: ‎02-28-2010
0

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 10.1.1.1 (you disliking this ... )

otherwise,
1. configure dhcp relay on switch
2. configure a different dhcp pool on SRX (like 10.2.2.0/24)
3. Assign a loopback from this subnet e.g. 10.2.2.1/24
4. configure switch's default-router as 192.168.1.1

it should work ...

regards
Hafiz Muhammad Farooq
JNCIE-SEC, JNCIP-SEC, JNCIS-SEC, JNCIS-FWV
JNCIS-SP, JNCIS-SA, JNCIA-JUNOS
IBM Qradar Deployment Professional

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

Contributor
shinyviolet
Posts: 23
Registered: ‎08-05-2009
0

Re: DHCP server offerring addressed through relay-agent

Hi,

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 10.1.1.1./24 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-2013 Juniper Networks, Inc. All rights reserved.