Configure Dual ISP Link Failover in Juniper SRX

Share This Article: Share on Facebook0Share on Google+1Tweet about this on TwitterShare on LinkedIn1Pin on Pinterest0Email this to someone

If you have two ISPs or two different links for same destination, then you can configure floating static route. Floating static route allows you to failover the link if the primary link fails. This is accomplished by using preference and qualified-next hop feature available in JunOS operating system. To configure dual ISP link failover in Juniper SRX you need two ISP links. This technique is not just for ISP links. You can apply this technique to any dual link scenario that have same destination network. SRX series, MX series and J series devices are mostly used in these types of scenario.

Configure Dual ISP Link Failover in Juniper SRX

Below is our scenario. We have two ISPs, ISP A and ISP B. What we want to accomplish is, if primary ISP’s link fail, then switch the link through secondary link to ISP B. So, let’s get started.

Configure Dual ISP Link Failover in Juniper SRX

We need to configure the routing table under [routing-options] hierarchy.

[edit routing-options]
user@SRX240# set static route 0.0.0.0/0 next-hop 1.1.1.1 preference 5 [Next hop 1.1.1.1 is the primary next-hop for 0.0.0.0/0 destination network. Note, 0.0.0.0/0 means default gateway. Preference 5 is the default preference for static routes. Even if you don’t put preference 5 in this command, it is automatically there.]
[edit routing-options]
user@SRX240# set static route 0.0.0.0/0 qualified-next-hop 2.2.2.1 preference 7 [Now next-hop 2.2.2.1 is the secondary next-hop for 0.0.0.0/0 network. It has the preference of 7. If the primary link is to go down, this link will be the gateway for the default route.]
[edit routing-options]
user@SRX240# show
static {
route 0.0.0.0/0 {
next-hop 1.1.1.1;
qualified-next-hop 2.2.2.1 {
preference 7;
}
preference 5;
}
}

In this way you can configure floating static route in JunOS systems.

 

The following two tabs change content below.
Bipin is a freelance Network and System Engineer with expertise on Cisco, Juniper, Microsoft, VMware, and other technologies. You can hire him on UpWork . Follow Bipin Giri on Google+. Bipin enjoys writing articles and tutorials related to Network technologies. Some of his certifications are, MCSE:Messaging, JNCIP-SEC, JNCIS-ENT, and others.