Comware Based
1751797 Members
5703 Online
108781 Solutions
New Discussion

Default Route in HP 5120 EI Switches

 
aali
Frequent Advisor

Default Route in HP 5120 EI Switches

Is it possible to configure two static default routes pointing to two different routers so if primary default route fails, the switch will insert the back-up default route automatically.

 

Regards,

 

 

3 REPLIES 3
Trinh_Nguyen
Advisor

Re: Default Route in HP 5120 EI Switches

It is a good idea if it can be done that easy. For the same purpose of default gateway redundancy, I configured Virtual Router Redundancy Protocol (VRRP) or if you use Cisco it is Hot Standby Router Protocol
paulgear
Esteemed Contributor

Re: Default Route in HP 5120 EI Switches

Hi aali,

Try this:

ip route-static 0.0.0.0 0.0.0.0 192.168.1.2 preference 65 description Floating default route

The default preference for static routes is 60 (see the table in the "IP Routing Configuration Gude" for your switch model). If you add another at a higher preference (e.g. 65 like i've shown above), then it should only become active if the first one fails.

You probably should also look at BFD or FFR in the same manual to ensure that a dead default gateway is detected in a timely fashion. Or, as Trinh suggested, look into a more dynamic protocol such as VRRP or OSPF.
Regards,
Paul
Peter_Debruyne
Honored Contributor

Re: Default Route in HP 5120 EI Switches

Hi,

 

the hsrp/vrrp options must be set on the actual gateways, in this case these are the ISP routers, so they will typically not do hsrp/vrrp with each other, so the control has to take place on the upstream router (in this case the 5120).

Same applies to BFD, which must have support of both sides, so given the ISP routers, this will not be an option.

 

The 5120 also supports the NQA feature (like Cisco IP SLA), which can be linked to track objects and then to routing applications (like static routes).


So the 5120 can try to ping the next hops and based on these pings, the route will be up/down.

 

This would be a sample config, assuming 100.1.1.1 and 100.1.1.2 are the 2 internet gw IPs.


# send icmp echo to 100.1.1.1, every 200 ms, max wait for each echo-reply is 10ms
# when 5 consecutive echos fail (5*200ms=1sec), the object reaction 1 will change status
nqa entry internetlink gw1
 type icmp-echo
  destination ip 100.1.1.1
  frequency 200
  probe timeout 10
  reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only
nqa entry internetlink gw2
 type icmp-echo
  destination ip 100.1.1.2
  frequency 200
  probe timeout 10
  reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only

# Define the general track objects (can be used in many applications, vrrp/static routes are just examples) and link it to nqa

 track 1 nqa entry internetlink gw1 reaction 1
 track 2 nqa entry internetlink gw2 reaction 1


# Activate the nqa object (schedule)
 nqa schedule internetlink gw1 start-time now lifetime forever
 nqa schedule internetlink gw2 start-time now lifetime forever

# option 1/ Add static routes and link them to the track objects - both up - loadbalance ( ip hash based on L3 switches, not packet based)
ip route-static 0.0.0.0 0 100.1.1.1 track 1 description GW1
ip route-static 0.0.0.0 0 100.1.1.2 track 2 description GW2

# option 2/ Add static routes and link them to the track objects - failover (like previous post)
ip route-static 0.0.0.0 0 100.1.1.1 track 1 description GW1
ip route-static 0.0.0.0 0 100.1.1.2 track 2 preference 65 description GW2

In case of failover, you can just skip the entire ping test /track for GW2, since it will not be used anyway under normal conditions.

 

Best regards,Peter