Junos
Reply
Contributor
polskino
Posts: 10
Registered: ‎03-19-2009
0

DHCP default route

Hi All,

I have an SRX 210 in a lab environment that is getting a DHCP address on the public interface, how do I set a default route pointing to the IP address of the public interface.  The address changes every time the DHCP lease is renewed, i'm looking for a permenant method to set the default route.

 

P.

Distinguished Expert
Screenie
Posts: 1,076
Registered: ‎01-10-2008
0

Re: DHCP default route

set routing options static route 0.0.0.0/0 next-hop <ip gateway>  ???

 

Just to set a static route?  Or do I understand your question wrong

best regards,

Screenie.
Juniper Ambassador,
JNCIA IDP AC WX JNCIS FW SSL JNCIP SEC ENT SP JNCI

If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.
Distinguished Expert
muttbarker
Posts: 2,346
Registered: ‎01-29-2008
0

Re: DHCP default route

Screenie is correct - even though the IP address may change every time the lease is renewed I would think that the gateway address would always be the same. It is just the DHCP address that changes.

 

So pointing to the remote gateway address as he showed you should work.

Kevin Barker
JNCIP-SEC
JNCIS-ENT, FWV, SSL, WLAN
JNCIA-ER, EX, IDP, UAC, WX
Juniper Networks Certified Instructor
Juniper Networks Ambassador

Juniper Elite Reseller
J-Partner Service Specialist - Implementation

If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.
Distinguished Expert
rkim
Posts: 755
Registered: ‎11-06-2007

Re: DHCP default route

FYI, if you lease an address via DHCP then you will also learn the default route. But in this scenario you will not see the default route when you run "show route". To see the learned default route you will need to run "show route forwarding".

 

-Richard

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