KB ID 0001008
Problem
It takes me seconds to do this on an ASA, on every occasion I’ve had to do the same on a Juniper firewall I’ve had to research how to do it again.
Here I’m setting up the ‘default’ route to the Internet, but the syntax is the same for setting up any static route.
Solution
1. Connect to the firewall either by console cable or via SSH, go to CLI mode then configuration mode.
[box]login: PeteL
Password: ************
— JUNOS 12.1X47-D10.4 built 2014-08-14 22:21:50 UTC
PeteL@Petes-SRX> cli
PeteL@Petes-SRX> configure
Entering configuration mode
[edit]
PeteL@Petes-SRX#
[/box]
2.Here is the syntax for adding a route, (0.0.0.0/0 denotes the default route or GOLR).
[box][edit]
PeteL@Petes-SRX# set routing-options static route 0.0.0.0/0 next-hop 123.123.123.123[/box]
3. Save the changes.
[box][edit]
PeteL@Petes-SRX# commit
commit complete[/box]
Related Articles, References, Credits, or External Links
NA