When you are using dhcp on an interface there literally is no configuration at all of the static route.
This is simply learned from the dhcp server parameter gateway during the dhcp process.
Now if you want a second default route out a different interface as a backup, then you would configure that static route out the alternative interface. The routing preference of the dhcp one will come first by default.
------------------------------
Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
http://puluka.com/home------------------------------
Original Message:
Sent: 01-04-2022 02:32
From: Unknown User
Subject: Default route question/issue
Hi Steve, thank you for your reply, as always.
So, I wish the dhcp assigned gateway on this interface i.e. ge-0/0/7.0, to be the backup route (qualified-next-hop), so are you saying I do not need to specify anything other than the primary route (next-hop #.#.#.#;) for this design to work?
i.e.
routing-options { static { route 0.0.0.0/0 { next-hop #.#.#.#; } } router-id #.#.#.#;}
Original Message:
Sent: 01-01-2022 07:15
From: STEVE PULUKA
Subject: Default route question/issue
When you configure an interface to be a dhcp client, the client will get the gateway address as part of the dhcp response from the upstream server. If there is a gateway in the response then the associated default route for that gateway will be installed.
You don't need to configure one.
------------------------------
Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
http://puluka.com/home
Original Message:
Sent: 12-31-2021 09:55
From: Unknown User
Subject: Default route question/issue
With regard to 'routing-options' on an SRX device I believe I cannot specify a physical interface as a hop under 'static' > 'route 0.0.0.0/0', is this correct? The interface in question carries a DHCP assigned address, and this cannot be changed to a static. If I am correct, how can I get around this please?
i.e.
routing-options { static { route 0.0.0.0/0 { next-hop #.#.#.#; qualified-next-hop ge-0/0/7.0 { preference 25; } } } router-id #.#.#.#;}