Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

What gets checked first, GLBP or Static Route?

I have 2 routers doing GLBP. The virtual IP is given to the workstations as their Default Gateway.

When a packet hits the default gateway, it'll go to RTR-A. Then the second packet request will go to RTR-B. This is all good via GLBP.

The question is, if RTR-A has a static route to 66.66.66.66 and the next hop for this destination is via RTR-B, how will RTR-A treat this packet when RTR-A is the router that needs to route the packet to the internet? I mean, how is this treated?

Will GLBP look at the packet and then determine that it is now RTR-A turn to take it, then gives it to RTR-A and then this router will look at its local routing table and then gives it to RTR-B because the destination is 66.66.66.66?

Or will the static route take precedence over GLBP? but again, only RTR-A will have this static route entry as the network admin is forcing everyting destined to 66.66.66.66 to go out of RTR-B. The confusion is the GLBP thing.

thank you for the help

2 ACCEPTED SOLUTIONS

Accepted Solutions
New Member

Re: What gets checked first, GLBP or Static Route?

Hi

GLBP works on per host basis and not per packet basis. What I mean is when host looks for the gateway for first time, it is that time when it is decided which  router will actually be forwarding the packets for host.

Consider this example

Three Host X, Y, Z

Two routers with GLBP RTR A and RTR B operating in Round Robin Basis

  1. Host X boots gets IP address through DHCP or statically configured, it will send ARP query for gateway. ARP query is served by RTR A and it sends it MAC address. Now Host X will use RTR A as gateway
  2. Host Y boots gets IP address through DHCP or statically configured, it will send ARP query for gateway. ARP query this time is served by RTR B bcoz GLBP is configure to be in round robin mode. RTR B sends it MAC address to host Y. Now Host Y will use RTR B as gateway
  3. Host Z boots gets IP address through DHCP or statically configured, it will send ARP query for gateway. ARP query is this time will  served by RTR A and it sends it MAC address. Now Host X will use RTR A as gateway

RTR A has reachability to 66.66.66.66 network and RTR B also has reachability. So packet can be forwarded.

Host X ( RTR A as gateway) sends packet destined to 66.66.66.66 it goes to RTR A, which will send it to RTR B because of static route.

Host Y ( RTR B as gateway) sends packet destined to 66.66.66.66 it goes to RTR B, which will process it according to its routing table

Hope this helps.

Cheers

New Member

Re: What gets checked first, GLBP or Static Route?

Again, even though GLBP answers per-host, it will still send out ICMP redirects with your setup, and Rtr-B will be used for _that_ destination if the end-host responds to redirects.

As to your question you can use the track function in IOS to do what you want, but to have:

ip route 66.66.66.66 255.255.255.255 RTR-B and ip route 66.66.66.66 255.255.255.255 RTR-B 200 doesn't make much sense. If you want to send everything to primary router RtR-B for 66.66.66.66 and if that goes down use RtR-X, then use:

ip sla 1 
icmp-echo x.x.x.x ! some loopback or interface on RtR-B
timeout 500
frequency 3
ip sla schedule 1 start-time now life forever
track 1 rtr 1 reachability


ip route 66.66.66.66 255.255.255.255 RtR-B track 1

ip route 66.66.66.66 255.255.255.255 RTR-X 200

5 REPLIES
New Member

Re: What gets checked first, GLBP or Static Route?

anyone?

New Member

Re: What gets checked first, GLBP or Static Route?

The GLBP-process will just answer with a MAC-address for one of the routers in a round-robin fashion - doesn't matter who has the routes to where. However Rtr-A will send an ICMP-redirect since the packet goes out an interface to another router where the client is also located. If the client responds to ICMP-redirects, packets for 66.66.66.66 in the future will go to Rtr-B.

New Member

Re: What gets checked first, GLBP or Static Route?

Hi

GLBP works on per host basis and not per packet basis. What I mean is when host looks for the gateway for first time, it is that time when it is decided which  router will actually be forwarding the packets for host.

Consider this example

Three Host X, Y, Z

Two routers with GLBP RTR A and RTR B operating in Round Robin Basis

  1. Host X boots gets IP address through DHCP or statically configured, it will send ARP query for gateway. ARP query is served by RTR A and it sends it MAC address. Now Host X will use RTR A as gateway
  2. Host Y boots gets IP address through DHCP or statically configured, it will send ARP query for gateway. ARP query this time is served by RTR B bcoz GLBP is configure to be in round robin mode. RTR B sends it MAC address to host Y. Now Host Y will use RTR B as gateway
  3. Host Z boots gets IP address through DHCP or statically configured, it will send ARP query for gateway. ARP query is this time will  served by RTR A and it sends it MAC address. Now Host X will use RTR A as gateway

RTR A has reachability to 66.66.66.66 network and RTR B also has reachability. So packet can be forwarded.

Host X ( RTR A as gateway) sends packet destined to 66.66.66.66 it goes to RTR A, which will send it to RTR B because of static route.

Host Y ( RTR B as gateway) sends packet destined to 66.66.66.66 it goes to RTR B, which will process it according to its routing table

Hope this helps.

Cheers

New Member

Re: What gets checked first, GLBP or Static Route?

Hi Deepak,

It looks like this answers my question. In your example, when Host X (which has its Default Gateway with RTR-A) sends a packet to 66.66.66.66, before sending this packet it will look at its routing table and according to the static entry here, it will give send the packet over to RTR-B.

Actually this is very good explanation. Very clear and to the point. GLBP then really never is a problem or an obstacle. The hosts that have RTR-A as their Default Gateway will still send anything destined to 66.66.66.66 to RTR-A and then RTR-A will follow its routing table entries.

This redirection is then very transparent to the internal hosts, especially to the ones that have RTR-A as their Default Gateway.

Now, to take this a bit deeper, can we perhaps to some failover stuff here for anything destined to 66.66.66.66? I mean, can RTR-A have 2 static routing entries for this 66.66.66.66 network? one being "ip route 66.66.66.66 255.255.255.255 RTR-B"  and the second statement looking like "ip route 66.66.66.66 255.255.255.255 RTR-B 200" ???

The end result that we are trying to accomplish here is that for RTR-A to notice if there is an outage in RTR-B. If this is the case, then RTR-A will be smart enough to not send anything destined for 66.66.66.66 to RTR-B and instead send the packet using its own default gateway (RTR-A own gateway of last resort)?

can this be done?

New Member

Re: What gets checked first, GLBP or Static Route?

Again, even though GLBP answers per-host, it will still send out ICMP redirects with your setup, and Rtr-B will be used for _that_ destination if the end-host responds to redirects.

As to your question you can use the track function in IOS to do what you want, but to have:

ip route 66.66.66.66 255.255.255.255 RTR-B and ip route 66.66.66.66 255.255.255.255 RTR-B 200 doesn't make much sense. If you want to send everything to primary router RtR-B for 66.66.66.66 and if that goes down use RtR-X, then use:

ip sla 1 
icmp-echo x.x.x.x ! some loopback or interface on RtR-B
timeout 500
frequency 3
ip sla schedule 1 start-time now life forever
track 1 rtr 1 reachability


ip route 66.66.66.66 255.255.255.255 RtR-B track 1

ip route 66.66.66.66 255.255.255.255 RTR-X 200

732
Views
0
Helpful
5
Replies