
Router |
Interface |
IP Address |
2 |
Fa0/0 |
192.168.0.250/24 |
Fa0/1 |
172.168.0.254/24 |
|
| 3 |
Fa0/0 |
192.168.0.251/24 |
Fa0/1 |
172.16.0.253/24 |
|
4 |
eth0 |
172.16.0.1/24 |












Router |
Purpose |
Interface |
IP Address |
P5R3
|
LAN Gateway 2 |
Fa0/1
|
192.168.0.251/24
|
S1/0
|
192.168.42.2/24
|
||
|
P6R3
|
LAN Gateway 1 |
Fa0/1
|
192.168.0.250/24
|
S1/0
|
192.168.31.1/24
|
||
P5R4
|
LAN Client |
eth0
|
192.168.0.1/24
|
P5R1 |
ISP B - Router |
S1/0 |
192.168.64.4/24 |
S1/3 |
192.168.42.4/24 |
||
P6R1 |
ISP A - Router |
S1/0 |
192.168.63.3/24 |
S1/3 |
192.168.31.3/24 |
||
BB1 |
External Internet Host |
[?] |
192.168.63.4/24 |
[?] |
192.168.64.6/24 |
The IP addresses used in the table match those in the original diagram (except for the LAN). You should be able to visualize how the diagram fits over our pod configuration. If you cannot, try drawing it. Don't continue the lab until you understand how the setup fits the picture!
The LAN client should be configured as a client, not a router. Turn off ip routing and give it the default gateway of your HSRP gateway address. Obviously, the interfaces used on the backbone will vary depending on which pods you use. Just make sure to match up the subnet numbers. Finally, make sure your LAN machines can see each other over the switching fabric. If they can't, you may need to reset your switches.
The first step in achieving our objectives is to enable HSRP for the LAN. This is your third time working with HSRP so I won't walk through it all again. If you get stuck, scroll up to the previous sections as it's all covered in detail there. Create a single HSRP group with gateway address 192.168.0.254 on both R3 routers . Give the HSRP router connected to ISP A higher priority, and set it to track its ISP interface (S1/0).
That's all there is to the HSRP configuration for outgoing traffic. Now we have to add BGP to the routers. This serves as the routing protocol, and will allow incoming traffic to select the ISP we choose based on availability.
Add your LAN routers to BGP AS 100. Use the network commands to identify the subnets to which the routers belong. The neighbor command identifies connected routers and their AS. Specify next-hop-self for the internal neighbors. Finally, add no synchronization to allow BGP to work as an iBGP without a full mesh.
P6R3(config)#router bgp 100
P6R3(config-router)#network 192.168.0.0 mask 255.255.255.0
P6R3(config-router)#neighbor 192.168.0.251 remote-as 100
P6R3(config-router)#neighbor 192.168.0.251
next-hop-self
P6R3(config-router)#neighbor 192.168.31.3 remote-as 300
P6R3(config-router)#no synchronization
P5R3(config)#router bgp 100
P5R3(config-router)#network 192.168.0.0 mask 255.255.255.0
P5R3(config-router)#neighbor 192.168.0.250 remote-as 100
P5R3(config-router)#neighbor 192.168.0.250 next-hop-self
P5R3(config-router)#neighbor 192.168.42.4 remote-as 400
P5R3(config-router)#no synchronization
Add your ISP A router to BGP AS 300, and your ISP B router to AS 400:
P6R1(config)#router bgp 300
P6R1(config-router)#neighbor 192.168.31.1 remote-as 100
P6R1(config-router)#neighbor 192.168.63.4 remote-as 600
P5R1(config)#router bgp 400
P5R1(config-router)#neighbor 192.168.42.2 remote-as 100
P5R1(config-router)#neighbor 192.168.64.6 remote-as 600
Add your remote host router, the backbone, to AS 600:
BB1(config)#router bgp 600
BB1(config-router)#network 192.168.63.0 mask 255.255.255.0
BB1(config-router)#network 192.168.64.0 mask 255.255.255.0
BB1(config-router)#neighbor 192.168.63.3 remote-as 300
BB1(config-router)#neighbor 192.168.64.4 remote-as 400
This should complete the basic BGP configuration, but there's one more step required to achieve our goal of choosing one ISP over the other. One of the major benefits of BGP is it allows network designers to specify specific routes for traffic. We're going to change the as-path attribute of our backup connection on ISP B to make the path "longer" than the connection through ISP A. This configuration takes place on our backup HSRP router connected to ISP B. First, we add an access list which defines the destination network:
P5R3(config)#access-list 1 permit 192.168.0.0
Now, we create a route-map for this route with the route-map command. We use the match ip address 1 command to specify that the route map should match the addresses stored in access-list 1 (above). Finally, we tell the map that we want to prepend AS number 100 to the as-path attribute for this map. Notice this is the same AS number as the router belongs to. Essentially we're just increasing the path size here, but this same method can be used to redirect traffic.
P5R3(config)#route-map foo permit 10
P5R3(config-route-map)#match ip address 1
P5R3(config-route-map)#set as-path prepend 100
That's the end of the configuration! Now, give BGP a few seconds to synchronize and test your results. Try pinging between client and backbone or backbone to client. If you're having a problem with the connection, use normal troubleshooting steps. First, verify up and up on all the interfaces. Use show ip route and show ip bgp to verify where bgp is working (or NOT working). Try debug ip bgp commands as well. If all else fails, ask a TA for assistance...they're probably bored anyway. ;)
Once you've got connectivity it's time to verify our path selections. Do a traceroute from the client to the server to make sure it's using ISP A.

Now traceroute in the other direction from backbone to client. Does it take ISP A again? It should, this is where the modified as-path is at work. On the backbone, issue a show ip bgp 192.168.0.0 to get specifics about BGP's route to the client LAN. Notice that it knows both paths, but the route through ISP B will have a longer path.

Finally, test the backup link on ISP B. Manually shut down HSRP1's external interface to ISP A. Give the protocols a few seconds to catch up. Two things should happen at once:
1) HSRP tracking sees the interface go down and changes the priority, letting HSRP2 takeover as LAN gateway.
2) BGP sees the connection to AS 100 disappear from that route and removes it from the routing table. Now the only route is through ISP B and the size of the path no longer matters.
Test by doing two traceroutes again, one in each direction. Which path does traffic take now? If either direction fails, and you've given the protocols time to synchronize, check your configuration.


Bring the HSRP1 interface back online. ISP A should automatically take over the routing. That's it! Pretty cool, huh?
[Sample Configs]
Part 4: Gateway Load Balancing Protocol
[http://www.cisco.com/en/US/tech/tk869/tk769/technologies_white_paper0900aecd801790a3.shtml]
This section is currently optional. Not all the routers in our lab support GLBP yet. If you can find two pods that do, try this section. Otherwise, just read through the material so you're familiar with the concepts and commands involved.
This section requires the use of two adjacent pods whose switches are connected.
As was previously discussed, HSRP is effective for providing network redundancy, but it is not a very efficient technology. With a single group, redundant links sit idle. With multiple groups, very basic load balancing is possible, but it requires additional planning and administration, and does not guarantee any sort of even balancing of traffic. Gateway Load Balancing Protocol (GLBP) is an alternative to HSRP, which can provide additional load balancing features on top of redundancy.
We will use the same switch layout as we did in parts one and two, with two vlans, one for clients and one for servers. Routers 2, 3, and 4 will still be in VLAN 30 with R2 and R3 as the GLBP routers and R4 is the server. R1 will again be a client. The difference here is that we will need more clients to test our GLBP implementation. We can use routers connected to an adjacent switch to accomplish this, as long as they can reach the GLBP routers via the switching fabric. Add the inter-switch ports (usually Fa0/23 and Fa0/24) to the client VLAN (20). Connect to your adjacent pod, and add the routers there to VLAN 20 as well. For the purpose of this lab, I'll be using Pods 3 and 4. It's important that you can visualize the logical layout we're using here. Router 1 and all the routers in the second pod are acting as clients on a single ethernet LAN. Routers 2 and 3 are acting as the gateways to this LAN, and R4 is a destination outside the LAN. It can be confusing, so if you don't understand the layout, try drawing it on paper or ask a TA.
Enough talk, let's configure. Start off with the same IP addressing scheme as Parts 1 and 2. Set up all the interface IP addresses, and configure EIGRP. Use 192.168.0.254 as the client's default-gateway again. Do not configure any of the HSRP from the previous sections.
Now for the new part. GLBP is configured at the interface level using the glbp commands. First, set up the virtual gateway IP address as you did before, using glbp [group number] ip [virtual ip address]. Do this on both gateway routers:
P3R2(config)#int Fa0/0
P3R2(config-if)#glbp 1 ip 192.168.0.254
P3R3(config)#int Fa0/0
P3R3(config-if)#glbp 1 ip 192.168.0.254
In GLBP, one router is determined as the "Active Virtual Gateway." While all gateways process traffic, the AVG is responsible for assigning virtual MAC addresses, and responds to all ARP requests on behalf of the other gateways. The AVG is determined the same way as the active router is determined with HSRP, using priorities. Again, the default priority is 100, and the higher priority wins. Make R2 the AVG by lowering the priority on R3:
P3R3(config)#int Fa0/0
P3R3(config-if)#glbp 1 priority 95
Since GLBP load balances the routers, we can specify the weight of different routers based on how much of the load we want them to handle. This is accomplished with the glbp [group number] weighting [maximum] (lower [minimum]) command. If the weight of a router falls below its minimum (due to a tracked interface going down), the device will become inactive. Give each router an equal maximum weight of 100 with a minimum weight of 95.
P3R2(config)#int Fa0/0
P3R2(config-if)#glbp 1 weighting 100 lower 95
P3R3(config)#int Fa0/0
P3R3(config-if)#glbp 1 weighting 100 lower 95
GLBP uses a more advanced tracking mechanism than we used with HSRP. You use the track configuration command to create a tracking object. Here, 30 identifies the tracking object (they're numbered like access lists), interface Fa0/1 specifies what we're tracking, and line-protocol specifies what aspect of that interface we're tracking. The delay up [time] command specifies the wait time before a notification of the object coming online is sent.
P3R2(config)#track 30 interface Fa0/1 line-protocol
P3R2(config)#delay up 30
P3R3(config)#track 30 interface Fa0/1 line-protocol
P3R3(config)#delay up 30
Now we apply the track object to our glbp group.
P3R2(config)#int Fa0/0
P3R2(config-if)#glbp 1 weighting track 30
P3R3(config)#int Fa0/0
P3R3(config-if)#glbp 1 weighting track 30
Notice that this doesn't mean tracking drops the priority by 30 points like it did in HSRP, it means we're using tracking object 30. The priority deduction here will be the default 10 points when an interface goes down. Since we specified a minimum weight of 95, this is still enough to take our routers into standby mode. Finally, we have the equivalent of the HSRP preempt command: the glbp [group number] forwarder preempt (delay minimum [delay]) command. This tells the router to take over role of active forwarder after delay seconds if it has a higher priority than the current active forwarder.
P3R2(config)#int Fa0/0
P3R2(config-if)#glbp 1 forwarder preempt delay minimum 0
P3R3(config)#int Fa0/0
P3R3(config-if)#glbp 1 forwarder preempt delay minimum 0
That's the end of the configuration. By default, GLBP uses round-robin load balancing. To change this, use the glbp [group number] load-balancing [type] command. Finally, test your configuration. Ping from any one of the clients to the server, and do a traceroute.

Now do a traceroute from a different client to the server. You should notice that it used the opposite router the first client did. Round-robin load-balancing is alternating between gateways. If you test with a third client, it should alternate back to the first gateway, and so on.



Use
show glbp on each gateway. It should show how many ARP responses the router has sent. Note that since the load balancing is based on ARP responses, doing multiple traceroutes from the same client will all go through the same gateway. This is why we need multiple client machines to test the configuration.


Finally, shut one of the gateway interfaces. The remaining gateway should take over the full traffic load now. Confirm this with a few traceroutes. Write erase, reload, relax...it's over!
[Sample Configs]