10-31-2009 09:20 PM
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.
11-01-2009 04:21 AM
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
11-01-2009 08:32 AM
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.
11-05-2009 10:04 PM
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".