Basic network connection 'fail-over'

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
So, we have a pretty simple network, two subnets setup with HP Procurve 2626 Switches. They are at two separate physical locations, connected and able to communicate back and fourth with each other via a 10mbit wireless connection. diagram.

Now each location is connected to the internet with a business cable internet package which works great, except the 3-4 times a year the modems drop their connection, and must be rebooted. I'm looking to see if its possible to have a subnet automatically start routing its internet directed traffic to the other modem if the local modem dies. Would these older HP switches be capable of doing that?
Any advice on how to go about doing this?

Thanks
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Routing like that is a Layer 3 issue. Those older layer 2 switches will have no effect on IP routing. You would need to use a dynamic routing protocol [with actual routers not SMB stuff ie linksys] with weights added to "0.0.0.0" so that each LAN would use the local connection via least cost routing and only flip to the other default gateway. Something like OSPF should be able to do this.
 

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
Routing like that is a Layer 3 issue. Those older layer 2 switches will have no effect on IP routing. You would need to use a dynamic routing protocol [with actual routers not SMB stuff ie linksys] with weights added to "0.0.0.0" so that each LAN would use the local connection via least cost routing and only flip to the other default gateway. Something like OSPF should be able to do this.

Pretty much what I was thinking.. I'm still not sure if this switch is just Layer 2. It does have routes on it. To simplify the graph I actually left off of the chart a 2nd connection (to another organization on 172.24.x.x) one on of the subnets. We use one of these switches as our default gateway, here are the routes in it..
Code:
ip route 0.0.0.0 0.0.0.0 172.25.200.2 
ip route 10.0.0.0 255.0.0.0 172.25.200.1 
ip route 172.24.0.0 255.255.0.0 172.25.200.1
So based on what you're saying.. I might be able to add another route of 0.0.0.0 0.0.0.0 172.25.211.2 (other subnet gateway) with a higher cost/metric?

One thing that confuses me is I can ping all computers across the subnets, but I can't ping the gateways on the opposite subnets (only locally) (our internet gateways are 172.25.2xx.2 on each respective subnet)
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Well costing it relative to the routing tables, meaning most OS's won't know or care about it. The routers however will route packets based on weights and link state.

If you can't ping the remote sides gateways, it means your routing isn't converged and likely doesn't have routes to those hosts. My guess is this is what is happening:

Ping [packet path]
"192.168.1.10" -> "192.168.1.254 [router]" -> "192.168.2.254 [router]" -> "192.168.2.2 [remote gateway]" {ping received}
response: "192.168.2.2" "I have no idea where 192.168.1.x is so 0.0.0.0/0 -> "Internet private class C? -> /dev/null [trash]

IE there is likely no return path.

It depends on how the environment is setup. This can happen when you have multiple routers on one IP segment. Odds are the client default gateways are the routers on the wireless bridges and not the internet router. The router often has a different 0.0.0.0/0 than the client OS's so it needs explicit routes, dynamic or static to handle returning packets.
 
Last edited:

drebo

Diamond Member
Feb 24, 2006
7,034
1
81
What model routers do you have?

If Cisco, simple IP SLA failover would handle it.

Basically, the idea is that you create a track object which attempts to ping an Internet address. You then tie that track object to your static route out to the Internet. You'd create a SECOND default route with a higher administrative distance pointing toward the other gateway. If the track object fails, the route its tied to (which is a lower AD) is removed from the routing table and the route with the higher AD becomes active.

Need more information on whether or not this is something that could easily be set up on your network, though. Your diagram doesn't identify if the wireless link is L2 or L3 or how you route between the two subnets.
 

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
Well costing it relative to the routing tables, meaning most OS's won't know or care about it. The routers however will route packets based on weights and link state.

If you can't ping the remote sides gateways, it means your routing isn't converged and likely doesn't have routes to those hosts. My guess is this is what is happening:

Ping [packet path]
"192.168.1.10" -> "192.168.1.254 [router]" -> "192.168.2.254 [router]" -> "192.168.2.2 [remote gateway]" {ping received}
response: "192.168.2.2" "I have no idea where 192.168.1.x is so 0.0.0.0/0 -> "Internet private class C? -> /dev/null [trash]

IE there is likely no return path.

It depends on how the environment is setup. This can happen when you have multiple routers on one IP segment. Odds are the client default gateways are the routers on the wireless bridges and not the internet router. The router often has a different 0.0.0.0/0 than the client OS's so it needs explicit routes, dynamic or static to handle returning packets.

Yup, I wasn't sure what the problem was, but I suspected the ping was reaching the gateway, but it wasnt able to get back.

I'll see if I can add a route to get back out of curiosity.

What model routers do you have?

If Cisco, simple IP SLA failover would handle it.

Basically, the idea is that you create a track object which attempts to ping an Internet address. You then tie that track object to your static route out to the Internet. You'd create a SECOND default route with a higher administrative distance pointing toward the other gateway. If the track object fails, the route its tied to (which is a lower AD) is removed from the routing table and the route with the higher AD becomes active.

Need more information on whether or not this is something that could easily be set up on your network, though. Your diagram doesn't identify if the wireless link is L2 or L3 or how you route between the two subnets.

Our Internet Gateway Routers are actually Untangle boxes. They do have failover but its a paid for app, and I suspect it only fails over to another NIC in the box (I guess we could set up a VLAN and fail over to the other gateway via a VLAN.. dirty!)

I believe the wireless link is L2.. just a dumb little antenna with nothing to it.. the only management interface is via a serial cable and they have no IP's.

So my computer uses one of our 'switches' as its default gateway.. (172.25.200.4) which is set to send 0.0.0.0 out to our local gateway 172.25.200.2 (with a metric of 1). Would it then make sense that if I added 0.0.0.0 to 172.25.211.2 with a metric of 5 (?), would these switches be smart enough to switch over if 172.25.200.2 wasn't responding?

Edit: after further research, looks like this switch might not be able to do it.. just does basic routing. As was mentioned, I'd probably need a switch with something like OSPF to learn dynamically that the one gateway is down. Just setting a 2nd gateway with a higher metric on this switch probably wont cut it?

Thanks guys.. still in the learning process here..! trying!
 
Last edited: