CCNP Route Lab 6-1 , Configuring BGP with Default Routing

CCNP Route Lab 6-1 , Configuring BGP with Default Routing

Topology

ccnp-route-lab-configuring-bgp-default-routing

Objectives

  • Configure BGP to exchange routing information with two ISPs.

Background
The International Travel Agency (ITA) relies extensively on the Internet for sales. For this reason, the ITA has decided to create a multihomed ISP connectivity solution and contracted with two ISPs for Internet connectivity with fault tolerance. Because the ITA is connecting to two different service providers, you must configure BGP, which runs between the ITA boundary router and the two ISP routers.

Note: This lab uses Cisco 1841 routers with Cisco IOS Release 12.4(24)T1 and the Advanced IP Services image c1841 -advipservicesk9-mz.124-24.T1 .bin. You can use other routers (such as a 2801 or 2811) and Cisco IOS Software versions if they have comparable capabilities and features. Depending on the router or switch model and Cisco IOS Software version, the commands available and output produced might vary from what is shown in this lab.

Required Resources

  • 3 routers (Cisco 1841 with Cisco IOS Release 12.4(24)T1 Advanced IP Services or comparable)
  • Serial and console cables

Step 1: Prepare the routers for the lab.
Cable the network as shown in the topology diagram. Erase the startup configuration and reload each router to clear previous configurations.

Step 2: Configure the hostname and interface addresses.
a. Assign the routers hostnames. Using the addressing scheme in the diagram, create the loopback interfaces and apply IP addresses to these and the serial interfaces on ISP1 (R1), ISP2 (R3), and ITA (R2). The ISP loopbacks simulate real networks that can be reached through the ISP. The two loopbacks for the ITA router simulate the connections between the ITA boundary router and their core routers. Set a clock rate on the DCE serial interfaces.

You can copy and paste the following configurations into your routers to begin.

Router R1 (hostname ISP1)

Router R2 (hostname ITA)

Router R3 (hostname ISP2)

b. Use ping to test the connectivity between the directly connected routers. Note that router ISP1 cannot reach router ISP2.

Step 3: Configure BGP on the ISP routers.
On the ISP1 and ISP2 routers, configure BGP to peer with the ITA boundary router and advertise the ISP loopback networks.

Step 4: Configure BGP on the ITA boundary router.
a. Configure the ITA router to run BGP with both Internet providers.

You should see BGP neighbor peering messages on the console similar to the following.

b. To verify the configuration, check the ITA routing table with the show ip route command.

ITA has routes to the loopback networks at each ISP router.

c. Run the following Tcl script on all routers to verify connectivity If these pings are not successful, troubleshoot.

Note: The WAN subnets connecting ITA (R2) to the ISPs (R1 and R3) are not advertised in BGP, so the ISPs will not be able to ping each other’s serial interface address.

Step 5: Verify BGP on the routers.
a. To verify the BGP operation on ITA, issue the show ip bgp command.

What is the local router ID?
The local router ID is 192.168.1.1.

Which table version is displayed?
The table version displayed is 5.

An asterisk (*) next to a route indicates that it is valid. An angle bracket (>) indicates that the route has been selected as the best route.

b. To verify the operation of ISP1, issue the show ip bgp command.

From ISP1, what is the path to network 172.16.1.0/24?
The path is through AS 100 (ITA) and AS 300 (ISP2).

c. On the ISP1 router, issue the shutdown command on Loopback0. Then on ITA, issue the show ip bgp command again.

Which table version is displayed? Why?
The table version displayed is an increment of the last one, which is 6 in the example. The shutdown command causes a routing table update, so the version should be one higher than the last.

What happened to the route for network 10.1.1.0/24?
It is no longer in the BGP table because interface Lo0 on ISP1 is down.

d. Bring ISP1 router Loopback0 back up by issuing the no shutdown command.

e. On ITA, issue the show ip bgp neighbors command. The following is a partial sample output of the command showing neighbor 172.16.0.1.

Based on the output of this command, what is the BGP state between this router and ISP2?
The BGP state is established.

How long has this connection been up?
The connection has been up for 00:16:00.

Step 6: Configure route filters.
a. Check the ISP2 routing table using the show ip route command. ISP2 should have a route that belongs to

If ITA advertises a route belonging to ISP1, ISP2 installs that route in its table. ISP2 might then attempt to route transit traffic through the ITA. Configure the ITA router so that it advertises only ITA networks 192.168.0.0 and 192.168.1.0 to both providers.

b. On the ITA router, configure the following access list.

c. Apply this access list as a route filter using the distribute-list keyword with the BGP neighbor statement.

d. Check the routing table for ISP2 again. The route to 10.1.1.0, ISP1, should still be in the table.

e. Return to ITA and issue the clear ip bgp * command. Wait until the routers reach the established state, which might take several seconds, and then recheck the ISP2 routing table. The route to ISP1, network 10.1.1.0, should no longer be in the routing table for ISP2, and the route to ISP2, network 172.16.1.0, should not be in the routing table for ISP1.

Note: The clear ip bgp * command is disruptive because it completely resets all BGP adjacencies. This is acceptable in a lab environment but could be problematic in a production network. Instead, if only a change of inbound/outbound routing policies is to be performed, it is sufficient to issue the clear ip bgp * in or clear ip bgp * out commands. These commands perform only a new BGP database synchronization without the disruptive effects of a complete BGP adjacency reset. All current Cisco IOS versions support the route refresh capability that replaces the inbound soft reconfiguration feature that previously had to be configured on a per-neighbor basis.

Step 7: Configure primary and backup routes using floating static routes.
With bidirectional communication established with each ISP via BGP, configure the primary and backup routes. This can be done with floating static routes or BGP.

a. Issue the show ip route command on the ITA router.

Notice that there is no gateway of last resort defined. This is a problem because ITA is the border router for the corporate network.

b. Configure static routes to reflect the policy that ISP1 is the primary provider and that ISP2 acts as the backup by specifying a lower distance metric for the route to ISP1 (210) as compared to the backup route to ISP2 (distance metric 220).

c. Verify that a default route is defined using the show ip route command.

d. Test this default route by creating an unadvertised loopback on the router for ISP1.

e. Issue the show ip route command to ensure that the newly added 192.168.100.0 /24 network does not appear in the routing table.

f. In extended ping mode, ping the ISP1 loopback 1 interface 192.168.100.1 with the source originating from the ITA loopback 1 interface 192.168.1.1.

Note: You can bypass extended ping prompted mode and ping while specifying a source address using one of these abbreviated commands:

Note: Testing the default route by creating an unadvertised network on ISP1 and pinging it works only because the default route also points toward ISP1. If the preferred default route pointed toward ISP2, the ping to that unadvertised network on ISP1 would not succeed. If the link to ISP1 failed, the default route to ISP2 would become active, but the pings would be successful only if ISP1 and ISP2 have another working interconnection and appropriate BGP peering between them, which is currently not the case.

Step 8: Configure primary and backup routes using a default network and a static route.
Another method for configuring primary and backup routes is to use the ip default-network command instead of a 0.0.0.0/0 route.
a. Remove the floating static routes configured in Step 7.

b. The network that was added in Step 7, 192.168.100.0/24, should now be advertised on the ISP1 router. You might need to wait a few moments for BGP to advertise the new network.

c. Make sure that the classful network 192.168.100.0 /24 appears in the ITA routing table.

d. On the ITA router, configure the ip default-network statement to reestablish a gateway of last resort.

Note: The behavior of this command is oriented toward legacy classful protocols and should be used only with classful networks.

e. Wait a few moments and then reexamine the routing table on ITA.

This establishes ISP1 as the only default route.

f. Make ISP2 the backup ISP by adding a backup route on ITA to ISP2 serial 0/0/1 interface 172.16.0.1.

EBGP learned routes have an administrative distance of 20 and are preferred over any routes with an administrative distance greater than 20, such as the default route defined above with an administrative distance of 220. The default route acts as a backup if the 192.168.100.0 /24 network is unavailable because of a fault or misconfiguration, or during the short period after a clear ip bgp 10.0.0.1 command is issued.

g. Verify that this newly added route establishes a consistent default route while the BGP conversation between ITA and ISP1 reestablishes. Notice that the routing table includes two candidate default routes (*), only one of which is used because of different administrative distances.

As expected, while the BGP conversation was down between ITA and ISP1, the route to ISP2 was added as the gateway of last resort. However, when BGP reestablished the conversation between ITA and ISP1, the default route of 192.168.100.0 was again set as the gateway of last resort on ITA.

h. Run the following Tcl script on router ITA to verify connectivity.

Should ISP1 and ISP2 be able to ping all networks in the topology?
No. Router ITA has been configured with route filters and does not advertise the ISP1 networks to ISP2 and vice versa. The ITA router advertises only ITA networks 192.168.0.0 and 192.168.1.0 to both providers. Pings from ISP1 to any of the ISP2 172.16.x.x networks will fail. Pings from ISP2 to any of the ISP1 10.x.x.x networks will fail.

Note: Another option for setting up default routing is to inject a default route via BGP. The following example configures the ISP1 router to inject a default route to itself that can be used by the ITA router:

Router Interface Summary Table

Router Interface Summary
Router Model Ethernet Interface
#1
Ethernet Interface
#2
Serial Interface
#1
Serial Interface
#2
1700 Fast Ethernet 0
(Fa0)
Fast Ethernet 1
(Fa1)
Serial 0 (S0) Serial 0/0/1
(S0/0/1)
1800 Fast Ethernet 0/0
(Fa0/0)
Fast Ethernet 0/1
(Fa0/1)
Serial 0/0/0
(S0/0/0)
Serial 0/0/1
(S0/0/1)
2600 Fast Ethernet 0/0
(Fa0/0)
Fast Ethernet 0/1
(Fa0/1)
Serial 0/0 (S0/0) Serial 0/1 (S0/1)
2800 Fast Ethernet 0/0
(Fa0/0)
Fast Ethernet 0/1
(Fa0/1)
Serial 0/0/0
(S0/0/0)
Serial 0/0/1
(S0/0/1)
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many interfaces the router has. Rather than list all combinations of configurations for each router class, this table includes identifiers for the possible combinations of Ethernet and serial interfaces in the device. The table does not include any other type of interface, even though a specific router might contain one. For example, for an ISDN BRI interface, the string in parenthesis is the legal abbreviation that can be used in Cisco IOS commands to represent the interface.

Device Configurations (Instructor version)

Router ISP1 (R1 )

Router ITA (R2)

Router ISP2 (R3)

More Resources

About the author

Scott

Leave a Comment