Chapter 4 - Lab 4-1 - Configuring BGP With Default Routing
Chapter 4 - Lab 4-1 - Configuring BGP With Default Routing
Chapter 4 - Lab 4-1 - Configuring BGP With Default Routing
Topology
Objectives
Configure BGP to exchange routing information with two ISPs.
Background
Note: This lab uses Cisco 1941 routers with Cisco IOS Release 15.4 with IP Base. The switches are
Cisco WS-C2960-24TT-L with Fast Ethernet interfaces, therefore the router will use routing metrics
associated with a 100 Mb/s interface. 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 IOS Release 15.2 or comparable)
Serial and Ethernet cables
Router(config)# no ip domain-lookup
Router(config-line)# exec-timeout 0 0
ISP1(config-if)# exit
ISP1(config-if)# no shutdown
ISP1(config-if)# end
ISP1#
ITA(config)# interface Lo0
ITA(config)# exit
ITA(config-if)# exit
ITA(config-if)# no shutdown
ITA(config-if)# exit
ITA(config-if)# no shutdown
ITA(config-if)# end
ITA#
ISP2(config-if)# no shutdown
ISP2(config-if)# end
ISP2#
b. Use ping to test the connectivity between the directly connected routers. Note that router ISP1 cannot
reach router ISP2.
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.
a - application route
ITA#
ITA has BGP 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. Use exit to exit the Tcl script.
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.
ITA# tclsh
foreach address {
10.0.0.1
10.0.0.2
10.1.1.1
172.16.0.1
172.16.0.2
172.16.1.1
192.168.0.1
192.168.1.1
} {
ping $address }
Step 4: Verify BGP on the routers.
a. To verify the BGP operation on ITA, issue the show ip bgp command.
ITA#
ISP1#
Which table version is displayed and is it the same as the BGP table version for ITA?
________________________________________________________________
From ISP1, what is the path to network 172.16.1.0/24?
________________________________________________________________
c. On the ISP1 router, issue the shutdown command on Loopback0. Then on ITA, issue the show ip bgp
command again.
ISP1(config-if)# shutdown
ISP1(config-if)#
ITA#
ISP1(config-if)# no shutdown
ISP1(config-if)#
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.
Last read 00:00:49, last write 00:00:41, hold time is 180, keepalive interval is
60 seconds
Neighbor sessions:
Multisession Capability:
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 5 1
Keepalives: 15 17
Route Refresh: 0 0
Total: 21 19
Based on the output of this command, what is the BGP state between this router and ISP2?
__________________________________________________________________
How long has this connection been up?
__________________________________________________________________
ISP2#
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. This would make ITA a transit router. A traceroute to ISP1’s Lo0
interface illustrates this issue.
2 * * *
3 * * *
4 * * *
ISP2#
The traceroute 10.1.1.1 fails because ISP1 does not have a route to the source IPv4 address of the
traceroute, 172.16.0.1. It is common in BGP networks not to advertise the links between providers in
BGP. A traceroute using the source IPv4 address of ISP2’ Lo0 interface is successful, showing that ITA
is a transit router for this network.
ISP2#
b. Configure the ITA router so that it advertises only ITA networks 192.168.0.0 and 192.168.1.0 to both
providers. 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.
ISP2#
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.
ITA#
ITA#
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.
ISP2#
ISP1#
ITA#
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.
ISP1# config t
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.
ITA#
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.
ITA# ping
Protocol [ip]:
!!!!!
ITA#
Note: You can bypass extended ping prompted mode and ping while specifying a source address using
one of these abbreviated commands:
or
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.
b. Next, configure the ISP1 router to send a default route to its neighbor, the ITA router. This command
does not require the presence of 0.0.0.0 in the local ISP1 router.
ISP1(config-router)#
c. Verify that the default route was received by ITA using BGP.