You are on page 1of 71

BGP Case Studies

Document ID: 26634

Introduction
Prerequisites
Requirements
Components Used
Conventions
BGP Case Studies 1
How Does BGP Work?
eBGP and iBGP
Enable BGP Routing
Form BGP Neighbors
BGP and Loopback Interfaces
eBGP Multihop
eBGP Multihop (Load Balancing)
Route Maps
match and set Configuration Commands
network Command
Redistribution
Static Routes and Redistribution
iBGP
The BGP Decision Algorithm
BGP Case Studies 2
AS_PATH Attribute
Origin Attribute
BGP Next Hop Attribute
BGP Backdoor
Synchronization
Weight Attribute
Local Preference Attribute
Metric Attribute
Community Attribute
BGP Case Studies 3
BGP Filtering
AS Regular Expression
BGP Neighbors and Route Maps
BGP Case Studies 4
CIDR and Aggregate Addresses
BGP Confederation
Route Reflectors
Route Flap Dampening
How BGP Selects a Path
BGP Case Studies 5
Practical Design Example
NetPro Discussion Forums − Featured Conversations
Related Information

Introduction
This document contains five Border Gateway Protocol (BGP) case studies.

Prerequisites
Requirements
There are no specific requirements for this document.

Components Used
This document is not restricted to specific software and hardware versions.

Conventions
Refer to Cisco Technical Tips Conventions for more information on document conventions.

BGP Case Studies 1
The BGP, which RFC 1771 defines, allows you to create loop−free interdomain routing between autonomous
systems (ASs). An AS is a set of routers under a single technical administration. Routers in an AS can use
multiple Interior Gateway Protocols (IGPs) to exchange routing information inside the AS. The routers can
use an exterior gateway protocol to route packets outside the AS.

How Does BGP Work?
BGP uses TCP as the transport protocol, on port 179. Two BGP routers form a TCP connection between one
another. These routers are peer routers. The peer routers exchange messages to open and confirm the
connection parameters.

BGP routers exchange network reachability information. This information is mainly an indication of the full
paths that a route must take in order to reach the destination network. The paths are BGP AS numbers. This
information helps in the construction of a graph of ASs that are loop−free. The graph also shows where to
apply routing policies in order to enforce some restrictions on the routing behavior.

Any two routers that form a TCP connection in order to exchange BGP routing information are "peers" or
"neighbors". BGP peers initially exchange the full BGP routing tables. After this exchange, the peers send
incremental updates as the routing table changes. BGP keeps a version number of the BGP table. The version
number is the same for all the BGP peers. The version number changes whenever BGP updates the table with
routing information changes. The send of keepalive packets ensures that the connection between the BGP
peers is alive. Notification packets go out in response to errors or special conditions.

eBGP and iBGP
If an AS has multiple BGP speakers, the AS can serve as a transit service for other ASs. As the diagram in this
section shows, AS200 is a transit AS for AS100 and AS300.

In order to send the information to external ASs, there must be an assurance of the reachability for networks.
In order to assure network reachability, these processes take place:

• Internal BGP (iBGP) peering between routers inside an AS
• Redistribution of BGP information to IGPs that run in the AS

When BGP runs between routers that belong to two different ASs, this is called exterior BGP (eBGP). When
BGP runs between routers in the same AS, this is called iBGP.

Enable BGP Routing
Complete these steps in order to enable and configure BGP.

Assume that you want to have two routers, RTA and RTB, talk via BGP. In the first example, RTA and RTB
are in different ASs. In the second example, both routers belong to the same AS.

1. Define the router process and the AS number to which the routers belong.

Issue this command to enable BGP on a router:

router bgp autonomous−system

RTA#
router bgp 100

RTB#
router bgp 200

These statements indicate that RTA runs BGP and belongs to AS100. RTB runs BGP and belongs to
AS200.
2. Define BGP neighbors.

The BGP neighbor formation indicates the routers that attempt to talk via BGP. The section Form
BGP Neighbors explains this process.

Form BGP Neighbors
Two BGP routers become neighbors after the routers establish a TCP connection between each other. The
TCP connection is essential in order for the two peer routers to start the exchange of routing updates.

After the TCP connection is up, the routers send open messages in order to exchange values. The values that
the routers exchange include the AS number, the BGP version that the routers run, the BGP router ID, and the
keepalive hold time. After the confirmation and acceptance of these values, establishment of the neighbor

• clear ip bgp * This command clears all neighbor connections. you must reset the neighbor connection to allow the new parameters to take effect. The two IP addresses that you use in the neighbor command of the peer routers must be able to reach one another. Any state other than Established is an indication that the two routers did not become neighbors and that the routers cannot exchange BGP updates. The ip−address is the next hop address with direct connection for eBGP. ip−address is any IP address on the other router. if necessary. You can prevent negotiations and force the BGP version that the routers use to communicate with a neighbor. The router must use this address rather than the IP address of the interface from which the packet goes. One way to verify reachability is an extended ping between the two IP addresses. • clear ip bgp address Note: The address is the neighbor address. If there are any BGP configuration changes. The extended ping forces the pinging router to use as source the IP address that the neighbor command specifies. Issue this neighbor command to establish a TCP connection: neighbor ip−address remote−as number The number in the command is the AS number of the router to which you want to connect with BGP. BGP sessions begin with the use of BGP version 4 and negotiate downward to earlier versions. Issue this command in router configuration mode: neighbor {ip address | peer−group−name} version value Here is an example of the neighbor command configuration: .connection occurs. By default. For iBGP.

In the case of eBGP.1.213.1. issue this command: neighbor ip−address update−source interface . there must be some IGP that runs and allows the two neighbors to reach one another. RTA# router bgp 100 neighbor 129. peer routers frequently have direct connection. 0 notifications.1.1 remote−as 200 RTB# router bgp 200 neighbor 129. 0 in queue Connections established 11. Note: Also. If you use the IP address of a loopback interface in the neighbor command. remote AS 200.1 remote−as 200 In this example. the eBGP peers have direct connection. you use the loopback interface to make sure that the IP address of the neighbor stays up and is independent of hardware that functions properly.220. which indicates either eBGP or iBGP. But. This section provides an example of the information that the show ip bgp neighbors command displays. dropped 10 BGP and Loopback Interfaces The use of a loopback interface to define neighbors is common with iBGP. iBGP routers do not need to have direct connection. 0 in queue Sent 2826 messages. Note: Pay special attention to the BGP state. you need some extra configuration on the neighbor router.1. Normally. table version = 3. RTA and RTB run eBGP.1 BGP state = Established.1.213.2 remote−as 100 neighbor 175. notice these items: • The BGP version. A version that continues to increment indicates that there is some route flap that causes the continuous update of routes.2 remote−as 200 RTC# router bgp 200 neighbor 175.213. • The table version The table version provides the state of the table. keepalive interval is 60 seconds Minimum time between advertisement runs is 30 seconds Received 2828 messages. and loopback does not apply. 0 notifications.12. Also. but the iBGP peers do not have direct connection. external link BGP version 4. which is 4 • The remote router ID This number is the highest IP address on the router or the highest loopback interface.212.220. Any time that new information comes in. if existent. RTB and RTC run iBGP.220. but is not common with eBGP. The remote AS number points to either an external or an internal AS. # show ip bgp neighbors BGP neighbor is 129. hold time is 180. Anything other than the state Established indicates that the peers are not up. In order to indicate a loopback interface. the table increases the version. The neighbor router needs to inform BGP of the use of a loopback interface rather than a physical interface to initiate the BGP neighbor TCP connection. remote router ID 175. up for 0:10:59 Last read 0:00:29.

225. To achieve the connection.11. RTA must force BGP to use the loopback IP address as the source in the TCP neighbor connection. Refer to Sample Configuration for iBGP and eBGP With or Without a Loopback Address for a complete network scenario sample configuration.11. This statement forces BGP to use the IP address of the loopback interface when BGP talks to neighbor 190.11. Use of this IP address is why RTB does not need any special configuration.This example illustrates the use of this command: RTA# router bgp 100 neighbor 190.1 update−source loopback 1. RTA and RTB run iBGP inside AS100.225. The multihop is only for eBGP and not for iBGP.1 update−source loopback 1 RTB# router bgp 100 neighbor 150. In this case.212. Note: RTA has used the physical interface IP address of RTB.212.1 remote−as 100 neighbor 190.11.1.1.1. The eBGP multihop allows a neighbor connection between two external peers that do not have direct connection. RTA adds update−source interface−type interface−number so that the command is neighbor 190. 190.1 remote−as 100 In this example. 150. RTB uses the loopback interface of RTA. a Cisco router can run eBGP with a third−party router that does not allow direct connection of the two external peers.225. In the neighbor command. This example illustrates eBGP multihop: RTA# .11.225.1. In order to force this action. eBGP Multihop In some cases. as a neighbor.1. you can use eBGP multihop.225.

1.10.225.1 ebgp−multihop network 160.1 255.10. update−source. With the introduction of loopback interfaces.1 This example illustrates the use of loopback interfaces.2 ip route 160.10.0. Because of this direct connection. the next hop for eBGP is the loopback interface.1 update−source loopback 0 network 150.0 255.10.255.255.1.0 255.2 remote−as 100 RTA indicates an external neighbor that does not have direct connection.1. The example in the eBGP Multihop (Load Balancing) section shows how to achieve load balancing with BGP in a case where you have eBGP over parallel lines.0 255.255.1 ip route 150.255.0 router bgp 200 neighbor 150.1.2.2.225. router bgp 100 neighbor 180. which is 129.1 remote−as 100 neighbor 150.0. RTA has two choices to reach next hop 160.1 255. On the other hand. eBGP Multihop (Load Balancing) RTA# int loopback 0 ip address 150.1.10.1.2 and the other path via 2. and ebgp−multihop.1 ebgp−multihop neighbor 160.2.0.1.1.0 2.0.10.0.10.0 router bgp 100 neighbor 160.1.1: one path via 1.1. You should also configure an IGP or static routing to allow the neighbors without connection to reach each other.2 RTB# int loopback 0 ip address 160.255.1 ebgp−multihop RTB# router bgp 300 neighbor 129.10.1.1.1 update−source loopback 0 neighbor 150.10.0.2. RTB indicates a neighbor that has direct connection.1.0 1.255.1. to introduce two equal−cost paths to reach the destination.0. RTB has the same choices.1.1. In normal situations. and load balancing does not happen.0 1.0 2. .10.0 ip route 160.0 ip route 150.255.10. BGP picks one of the lines on which to send packets.2.2.213. RTB does not need the ebgp−multihop command.0 255.1 remote−as 300 neighbor 180.0.10.10.10.1.213.11. You use static routes. or an IGP.1 remote−as 200 neighbor 160.255. The example is a workaround in order to achieve load balancing between two eBGP speakers over parallel serial lines.0.0.2.11.10. RTA needs to indicate its use of the ebgp−multihop command.2.

The related commands for match are: • match as−path • match community . Cisco IOS Software Release 11.1. the first set of conditions are applied via instance 10. • route−map MYMAP permit 10 (The first set of conditions goes here. the route is not accepted nor forwarded. match and set Configuration Commands Each route map consists of a list of match and set configuration commands. you proceed to a higher instance of the route map. the route map is a method to control and modify routing information. as the set action specifies. The first instance has a sequence number of 10. If you finish the list without a match. if the match criteria are met and you have a permit. when you use route maps to filter BGP updates rather than redistribute between protocols. there is a redistribution or control of the routes. If the match criteria are not met and you have a permit or deny. In this example. If the match criteria are met and you have a deny. The control and modification of routing information occurs through the definition of conditions for route redistribution from one routing protocol to another.2 and later releases do not have this restriction.) • route−map MYMAP permit 20 (The second set of conditions goes here.1. or the same name tag. The sequence number is simply an indication of the position that a new route map is to have in the list of route maps that you have already configured with the same name. there are two instances of the route map defined. If there is a match for IP address 1. The format of the route map follows: route−map map−tag [[permit | deny] | [sequence−number]] The map tag is simply a name that you give to the route map.) When you apply route map MYMAP to incoming or outgoing routes.1.2. For example. and the second has a sequence number of 20. with the name MYMAP. You break out of the list. These commands illustrate the example: match ip address 1. you can define a route map that checks outgoing updates.1 set metric 5 Now. This next−instance check continues until you either break out or finish all the instances of the route map.Route Maps There is heavy use of route maps with BGP. the next instance of the route map is checked.1. you cannot filter on the inbound when you use a match command on the IP address. instance 20 is checked. A filter on the outbound is acceptable. You break out of the list. and set specifies a set action if the criteria that the match command enforces are met. Or the control of routing information can occur at injection in and out of BGP.1. The match specifies a match criteria. You can define multiple instances of the same route map. In Cisco IOS® Software releases earlier than Cisco IOS Software Release 11. the metric for that update is set to 5. If the first set of conditions is not met. there is no redistribution or control of the route. For example. In the BGP context.

• match clns • match interface • match ip address • match ip next−hop • match ip route−source • match metric • match route−type • match tag The related commands for set are: • set as−path • set clns • set automatic−tag • set community • set interface • set default interface • set ip default next−hop • set level • set local−preference • set metric • set metric−type • set next−hop • set origin • set tag • set weight Look at some route map examples: .

0. If there is no match. You cannot apply route maps on the inbound when you match with an IP address as the basis.10.0. Then.255. Suppose that RTA wants to redistribute to RTB routes about 170.0 0.2.2. you can use this configuration: RTA# router rip network 3.0.10.10.0 neighbor 2.0.2 remote−as 100 neighbor 2.0 network 2.0.0.10. the route has a metric of 2.0 255. Therefore.255 Now that you feel more comfortable with how to start BGP and how to define a neighbor.0.0. which indicates setting everything else to metric 5. you must use an outbound route map on RTC: RTC# router bgp 300 network 170. Note: Always ask the question "What happens to routes that do not match any of the match statements?" These routes drop.0.0.0 route−map SETMETRIC permit 10 match ip−address 1 set metric 2 route−map SETMETRIC permit 20 set metric 5 access−list 1 permit 170.255 access−list 1 permit 0. you do not want AS100 to accept updates about 170. look at how to start the exchange of network information.0. In this case.2. These sections go through the methods one by one: .0. you proceed down the route map list.0.2. in Example 1.2.0. if a route matches the IP address 170.Example 1 Assume that RTA and RTB run Routing Information Protocol (RIP).0 passive−interface Serial0 redistribute bgp 100 route−map SETMETRIC router bgp 100 neighbor 2.255.255 In this example.2.0.10.255. by default.0 0.0.10.3 remote−as 300 network 150.10.0 with a metric of 2 and all other routes with a metric of 5. There are multiple ways to send network information with use of BGP. Example 2 Suppose that.0.0.10.255. and RTA and RTC run BGP. you break out of the route map list. RTA gets updates via BGP and redistributes the updates to RIP.0 network 150.2 route−map STOPUPDATES out route−map STOPUPDATES permit 10 match ip address 1 access−list 1 deny 170.

0/16. you do not try to run BGP on a certain interface.213. some of these routes can have been learned via BGP and you do not need to send them out again.213.1. The network command works if the router knows the network that you attempt to advertise. Redistribution The network command is one way to advertise your networks via BGP. or first 16 bits.0.0. whether connected.0.0 mask 255. An example of the network command is: RTA# router bgp 1 network 192. or another protocol.0. With this command. you try to indicate to BGP what networks BGP should originate from this box.213.0.0 255. This concept is different than the familiar configuration with Interior Gateway Routing Protocol (IGRP) and RIP.213. Here is an example: RTA announces 129.0 because the static route puts a matching entry in the routing table. Your IGP can be IGRP. Instead.0. or learned dynamically. Apply careful filtering to make sure that you send to the Internet−only routes that you want to advertise and not to all the routes that you have. Note: You need the static route to get the router to generate 192. • network Command • Redistribution • Static Routes and Redistribution network Command The format of the network command is: network network−number [mask network−mask] The network command controls the networks that originate from this box.220.255. The command uses a mask portion because BGP version 4 (BGP4) can handle subnetting and supernetting. A maximum of 200 entries of the network command are acceptable.0 null 0 This example indicates that router A generates a network entry for 192. Another way is to redistribute your IGP into BGP. Look at the RTC configuration: . Open Shortest Path First (OSPF) protocol. This redistribution can seem scary because now you dump all your internal routes into BGP.0. The /16 indicates that you use a supernet of the class C address and you advertise the first two octets.0 ip route 192. RIP. Enhanced Interior Gateway Routing Protocol (EIGRP).0 and RTC announces 175.0.255. static.213.

1.0 redistribute bgp 200 default−metric 1000 100 250 100 1500 . AS100 is the source.1.1.213.0 mask 255. So you have to use filters to prevent the source out of that network by your AS. If you use redistribution instead.0 redistribute bgp 200 default−metric 1000 100 250 100 1500 router bgp 200 neighbor 1.220.If you issue the network command.0.0.0.0.220.1 remote−as 300 redistribute eigrp 10 !−−− EIGRP injects 129.0 again into BGP. This redistribution causes the origination of 129.213.255. you have: RTC# router eigrp 10 network 175.0 by your AS.220.0.220.0. The correct configuration is: RTC# router eigrp 10 network 175.0 redistribute bgp 200 default−metric 1000 100 250 100 1500 router bgp 200 neighbor 1. you have: RTC# router eigrp 10 network 175.1.1.0.220.0.1.213.1 remote−as 300 network 175. You are not the source of 129.0 !−−− This limits the networks that your AS originates to 175.1.

0.0. The null0 interface means disregard the packet.1. which exists. The only difference is that BGP considers these routes to have an origin that is incomplete. The difference is that routes that generate from the network command. Specific keywords such as internal.255 You use the access−list command to control the networks that originate from AS200. Here is an example: .1 remote−as 300 redistribute static . router bgp 200 neighbor 1.1.255. Static Routes and Redistribution You can always use static routes to originate a network or a subnet. external. The simple issue of redistribute ospf 1 under router bgp does not work..0. BGP passes on information that BGP learns from one peer to other peers. This document has discussed how you can use different methods to originate routes out of your AS.220. ip route 175.0 null0 .255.0 255. the router sends the packet to the specific match.220. So if you get the packet and there is a more specific match than 175. This method is a nice way to advertise a supernet.0 redistribute bgp 200 default−metric 1000 100 250 100 1500 router bgp 200 neighbor 1.1. and nssa−external are necessary to redistribute respective routes. Redistribution of OSPF into BGP is slightly different than redistribution for other IGPs. or static indicate your AS as the origin of these networks..1 remote−as 300 neighbor 1.0.255. Refer to Understanding Redistribution of OSPF Routes into BGP for more details.1.220. Remember that these routes are generated in addition to other BGP routes that BGP has learned via neighbors. Redistribution is always the method for injection of BGP into IGP.1 distribute−list 1 out redistribute eigrp 10 access−list 1 permit 175.0..220.1.0 0. Otherwise. or unknown. either internal or external.. You can accomplish the same result that the example in the Redistribution section accomplished with this: RTC# router eigrp 10 network 175.1. redistribution..0. the router disregards the packet.

10. This refusal ensures a loop−free interdomain topology.2 remote−as 300 network 150.10. has a direct BGP connection into AS100. which indicates that AS300 is also an origin for these routes.0.10. Note: Remember that BGP does not accept updates that have originated from its own AS. RTA# router bgp 100 neighbor 150. Is it true that you can do the same thing by learning via eBGP. the difference is that the network command adds an extra advertisement for these same networks.1 remote−as 200 network 170. redistributing into IGP.20.0 in RTC unless you want RTC to generate these networks as well as pass on these networks as they come in from AS100 and AS200. The section Local Preference Attribute provides more information about local preference.10.0. iBGP You use iBGP if an AS wants to act as a transit system to other ASs. from the example in this section. RTA generates a route 150.20.0. Then.00 Note: You do not need network 150.10.20.0 RTC# router bgp 300 neighbor 150.20.10.0 and sends the route to AS300.10.0.10.0 RTB# router bgp 200 neighbor 160. but iBGP offers more flexibility and more efficient ways to exchange information within an AS.2 remote−as 300 network 160. RTA notices that the update has originated from its own AS and ignores the update.10. RTC passes this route to AS200 and keeps the origin as AS100. iBGP provides ways to control the best exit point out of the AS with use of local preference.0.1 remote−as 100 neighbor 160. For example. .0 or network 160.10.10.0 to AS100 with the origin still AS100.0. Again. assume that AS200. and then redistributing again into another AS? Yes. RTB passes 150. For example.

10.10.2 remote−as 300 network 150. Therefore.1 remote−as 100 neighbor 170.0.1 remote−as 100 neighbor 175. administrative weights.10. The BGP speaker that receives the update redistributes the information to other BGP speakers outside of its AS. RTA and RTB run iBGP. make an iBGP peering between RTB and RTD in order to not break the flow of the updates. RTA# router bgp 100 neighbor 190. The BGP Decision Algorithm After BGP receives updates about different destinations from different autonomous systems.30. The BGP updates that come from RTB to RTA transmit to RTE.10.0. and other attributes.1 remote−as 400 network 190. origin code.40.10. RTA and RTD also run iBGP. the BGP speaker that receives the update does not redistribute that information to other BGP speakers in its own AS. path length. . which is outside the AS. such as next hop.10. metric.10. which is inside the AS.50.0 RTB# router bgp 100 neighbor 150. BGP bases the decision on different attributes. In the diagram in this section.40.10.0 Note: Remember that when a BGP speaker receives an update from other BGP speakers in its own AS (iBGP). The updates do not transmit to RTD.0 RTC# router bgp 400 neighbor 175. BGP chooses only a single path to reach a specific destination.20. sustain a full mesh between the iBGP speakers within an AS.2 remote−as 100 network 175. local preference. Therefore. the protocol must choose paths to reach a specific destination.50. route origin.

10. The section BGP Case Studies 2 explains these attributes and their use. When that route traverses AS300.0 and path (100) in order to reach 170.BGP always propagates the best path to the neighbors.10.0. • EGPNLRI is learned via exterior gateway protocol (EGP).0. RTB advertises network 190. The origin attribute can assume three values: • IGPNetwork Layer Reachability Information (NLRI) is interior to the AS of origination.0. An ? in the BGP table indicates INCOMPLETE. the network has two AS numbers attached: first 200. INCOMPLETE usually occurs when you redistribute routes from other routing protocols into BGP and the origin of the route is incomplete. An e in the BGP table indicates EGP.10.0 is (300. then 300.10. 100). RTB has to take path (300. the path to reach 190.0. The CIDR Example 2 (as−set) section of this document provides an example of AS_SET.0. RTB traverses AS300 and then AS100 in order to reach 170. An i in the BGP table indicates IGP.10. The AS_PATH attribute is actually the list of AS numbers that a route has traversed in order to reach a destination.0. . The same process applies to 170. Refer to BGP Best Path Selection Algorithm for more information.0. So when 190.0.0 and 180.10.0. For RTA. the AS number is prepended to that update.0. Origin Attribute The origin is a mandatory attribute that defines the origin of the path information. 200).0. • INCOMPLETENLRI is unknown or learned via some other means. RTC appends its own AS number to the network. RTC has to traverse path (200) in order to reach 190. BGP Case Studies 2 AS_PATH Attribute Whenever a route update passes through an AS. An AS_SET is an ordered mathematical set {} of all the ASs that have been traversed.0 in AS200. In the example in this section.10.10.0 reaches RTA. This normally happens when you issue the bgp network command .

0.10. RTE reaches 150.1 remote−as 100 neighbor 170.10.10.255.1 remote−as 100 network 170.50.20.0 via 100 i.30.10. RTE also reaches 190.0 RTA reaches 170.2 remote−as 300 network 150.0 via 300 i.20. RTA# router bgp 100 neighbor 190.10.0 redistribute static ip route 190.1 remote−as 100 network 190.0 via i.0.10.0 255.10.10.0.10.10.0.0 RTE# router bgp 300 neighbor 170.0. The "100 ?" means that the next AS is 100 and that the origin is incomplete and comes from a static route.0. The "100 i" means that the next AS is 100 and the origin is IGP.50. The "300 i" means that the next AS path is 300 and the origin of the route is IGP.0 via 100 ?.50.0.0 null0 RTB# router bgp 100 neighbor 150. This "i" means that the entry is in the same AS and the origin is IGP.10. BGP Next Hop Attribute .10. RTA also reaches 190.

2. For example.10. So.20.10.2.10.10. The eBGP next hop is carried in iBGP.2.0 to RTB with a next hop equal to 170.20.0.10.0.0 RTB# router bgp 100 neighbor 150. For iBGP.50.10. Because of this rule.The BGP next hop attribute is the next hop IP address to use in order to reach a certain destination.10. In the example in this section. according to RTB.10.2.10.0.0 Note: RTC advertises 170.1 remote−as 100 network 150. RTA# router bgp 100 neighbor 170.2 via IGP. if RTB runs iGRP. RTC advertises 170.1.10.0 because the next hop address is inaccessible. RTA advertises 170.0. you can also run iGRP on RTA network 170.0 is 170.2 remote−as 300 neighbor 150. the next hop is always the IP address of the neighbor that the neighbor command specifies.20.0.0.1.1 remote−as 100 RTC# router bgp 300 neighbor 170.0.20.0 to RTA with a next hop of 170. Make sure that RTB can reach 170.20.10.10.0. For eBGP.0 to RTA with a next hop equal to 170. the next hop to reach 170.20.10.0 to its iBGP peer RTB with a next hop of 170.30.20. the protocol states that the next hop that eBGP advertises should be carried into iBGP. Otherwise.1 remote−as 100 network 170. RTA advertises 150.0 to RTC with a next hop of 170.10. You want to make iGRP passive on the link to RTC so that BGP is only exchanged.0.10. .10.10.30.2 and not 150.10.10.0.0.20.20.10. RTB drops packets with the destination of 170. Note: RTA advertises 170.10.10.

Take special care when you deal with multiaccess and nonbroadcast multiaccess (NBMA) networks.20.0 to RTA with a next hop 170. Assume that RTC and RTD in AS300 run OSPF. RTC uses as next hop 170. and RTD is a multiaccess network.0.0.3. Note: RTC advertises 180. but NBMA.10.10.0 is more sensible than the extra hop via RTC. RTC runs BGP with RTA. RTC uses this address because the network between RTA.0 via 170.0. The sections BGP Next Hop (Multiaccess Networks) and BGP Next Hop (NBMA) provide more details. 170.20. BGP Next Hop (Multiaccess Networks) This example shows how the next hop behaves on a multiaccess network such as Ethernet. BGP Next Hop (NBMA) . RTC.10. RTC does not use its own IP address. and RTD is not multiaccess.20.20.20. further complications occur. When RTC sends a BGP update to RTA with regard to 180.3. RTC can reach network 180.0.0.20. The RTA use of RTD as a next hop to reach 180. RTC.10. If the common medium to RTA.20.3.2.20.

The syntax is: neighbor {ip−address | peer−group−name} next−hop−self The next−hop−self command allows you to force BGP to use a specific IP address as the next hop.10.20.0. the exact behavior is as if you have connection via Ethernet.1 next−hop−self RTC advertises 180. this configuration solves the problem: RTC# router bgp 300 neighbor 170. The next−hop−self command remedies this situation.3.10.20.20.0. For the BGP Next Hop (NBMA) example.The common medium appears as a cloud in the diagram. next−hop−self Command For situations with the next hop.20. If the common medium is a frame relay or any NBMA cloud.1 remote−as 100 neighbor 170.0 with a next hop equal to 170. In this case. routing fails.10.20.0 to RTA with a next hop of 170. .10. as in the BGP Next Hop (NBMA) example. you can use the next−hop−self command.2. RTC advertises 180. The problem is that RTA does not have a direct permanent virtual circuit (PVC) to RTD and cannot reach the next hop.20.

10. • Use BGP backdoor. The default distances are: • 120 for RIP • 100 for IGRP • 90 for EIGRP • 110 for OSPF RTA receives updates about 160.BGP Backdoor In this diagram. or another protocol.0 via RTB (IGP). then you have two options: • Change the external distance of eBGP or the IGP distance. RTA and RTC run eBGP. RTA and RTB run some kind of IGP. . BGP has these distances: • External distance¢0 • Internal distance¢00 • Local distance¢00 But you can use the distance command to change the default distances: distance bgp external−distance internal−distance local−distance RTA picks eBGP via RTC because of the shorter distance.10. If you want RTA to learn about 160. RTB and RTC run eBGP. IGRP. which is less than the IGP distances.0. either RIP.0 via two routing protocols: • eBGP with a distance of 20 • IGP with a distance that is greater than 20 By default.0. eBGP updates have a distance of 20. By definition. Note: This change is not recommended.

EIGRP is the preference. Synchronization Before the discussion of synchronization. except BGP updates do not advertise this network. . Remember that the next hop is carried via iBGP.10.BGP backdoor makes the IGP route the preferred route. but because of the backdoor command.10.0.0.10. RTA# router eigrp 10 network 150. Normally eBGP is the preference.0.2.0 is treated as a local entry. RTA also learns the address from RTC via eBGP with distance 20. look at this scenario. RTA and RTB run iBGP.0.10.0 router bgp 100 neighbor 2.0. this network gets the same treatment as a locally assigned network. In order to reach the next hop. Issue the network address backdoor command.10. RTB must send the traffic to RTE.0 from RTB via EIGRP with distance 90. The configured network is the network that you want to reach via IGP. For BGP.2. RTC in AS300 sends updates about 170.0 backdoor Network 160.1.0 via next hop 2. but is not advertised as a normal network entry.2.2.1 remote−as 300 network 160.0. so RTB gets the update and is able to reach 170.0. RTA learns 160.10.

0 into IGP. you can disable synchronization. Synchronization states that. In the example in this section. You can make RTB think that IGP has propagated the information if you add a static route in RTB that points to 170. BGP should not advertise a route before all the routers in your AS have learned about the route via IGP.Assume that RTA has not redistributed network 170. Your router waits indefinitely for an IGP update about a certain route before the router sends the route to external peers.0 flows in and drops at RTE.0.10. BGP waits until IGP has propagated the route within the AS.0. You have to disable synchronization manually in this case so that routing can work correctly: router bgp 100 no synchronization Note: Make sure that you issue the clear ip bgp address command to reset the session. BGP advertises the route to external peers. Then. the router has no way to know. If RTB starts to advertise to AS400 that RTB can reach 170. Make sure that other routers can reach 170. If you do not pass traffic from a different AS through your AS. Then.0. If all your routers in the AS run BGP and you do not run IGP at all.0. traffic that comes from RTD to RTB with destination 170.0.10.10. if your AS passes traffic from another AS to a third AS.0. . At this point. RTB starts to send the update to RTD.0.10. You can also disable synchronization if all routers in your AS run BGP.10.10.0. RTB waits to hear about 170. RTE has no idea that 170. The disablement of synchronization is not automatic.0 even exists. Disable Synchronization In some cases. you do not need synchronization.0.0 via IGP.0.10. The disablement of this feature can allow you to carry fewer routes in your IGP and allow BGP to converge more quickly.

RTD# router bgp 400 neighbor 1. even if RTB does not have an IGP path to 170.0.0 neighbor 3.3.10.3 remote−as 100 no synchronization !−−− RTB puts 170. RTB# router bgp 100 network 150.1.0.10.0 neighbor 1.1.1 remote−as 100 network 175.4 remote−as 100 Weight Attribute .0.2 remote−as 400 neighbor 3.0.0.3.1.3.0 in its IP routing table and advertises the network !−−− to RTD.3.10.10.0.1.10.0 RTA# router bgp 100 network 150.

0 from AS4. Multiple methods achieve this weight set: • Use the neighbor command. ♦ neighbor {ip−address | peer−group} weight weight • Use AS_PATH access lists. RTB has also learned about network 175.2 weight 100 !−−− The route to 175. RTB propagates the update to RTC.1.768 by default.535.10. This attribute uses weight to select a best path.1 weight 200 !−−− The route to 175. and other paths have a weight of 0.10.0 from RTA has a 200 weight. Routes with a higher weight value have preference when multiple routes to the same destination exist. RTA has learned about network 175.0. RTC# router bgp 300 neighbor 1. you force RTC to use RTA as a next hop to reach 175. You can achieve the same outcome with IP AS_PATH and filter lists.1 remote−as 100 neighbor 1. RTA. neighbor 2. The value only makes sense to the specific router.2.1.0 from AS4. has preference as the next hop. A weight can be a number from 0 to 65. RTC now has two ways to reach 175.The weight attribute is a Cisco−defined attribute.2. The value is not propagated or carried through any of the route updates. Look at the example in this section.10.1.10. The weight is assigned locally to the router.0.0 and has to decide which way to go.10.2. . which has a higher weight value.0 from RTB has a 100 weight.0.0.0. ♦ ip as−path access−list access−list−number {permit | deny} as−regular−expression neighbor ip−address filter−list access−list−number weight weight • Use route maps. Paths that the router originates have a weight of 32.2 remote−as 200 neighbor 2. If you set the weight of the updates on RTC that come from RTA so that the weight is greater than the weight of updates that come from RTB.0. RTA propagates the update to RTC.1.0.2.10.

.1. ip as−path access−list 5 permit ^100$ .2.2. You also can achieve the same outcome with the use of route maps. ip as−path access−list 5 permit ^100$ !−−− This only permits path 100.1.2 filter−list 6 weight 100 ..2 remote−as 200 neighbor 2.2. RTC# router bgp 300 neighbor 1. has weight 200..2 remote−as 200 neighbor 2.1.2... such as packets from AS100.. route−map setweightin permit 10 match as−path 5 set weight 200 !−−− Anything that applies to access list 5.1. RTC# router bgp 300 neighbor 1.1 remote−as 100 neighbor 1.1.2. route−map setweightin permit 20 set weight 100 !−−− Anything else has weight 100...1 filter−list 5 weight 200 neighbor 2. ip as−path access−list 6 permit ^200$ .1 route−map setweightin in neighbor 2.1 remote−as 100 neighbor 1.2.2.2 route−map setweightin in .1.1.2.1. Local Preference Attribute .

11. as the example in this section demonstrates: The bgp default local−preference command sets the local preference on the updates out of the router that go to peers in the same AS.2 remote−as 256 bgp default local−preference 150 RTD# router bgp 256 neighbor 3. You set local preference with the issue of the bgp default local−preference value command.1 remote−as 256 bgp default local−preference 200 In this configuration.213.1.0. In the diagram in this section.1.3.10.4 remote−as 300 neighbor 128.3.10. All traffic in AS256 that has that network as a destination transmits with RTD as an exit . which is only relevant to the local router. local preference is an attribute that routers exchange in the same AS.1 remote−as 100 neighbor 128.11. AS256 receives updates about 170.0 from two different sides of the organization. A path with a higher local preference is preferred more.0.0 has a higher local preference when updates come from AS300 rather than from AS100. Assume that RTD is the exit point preference. The default value for local preference is 100. Local preference helps you determine which way to exit AS256 in order to reach that network. You can also set local preference with route maps. The same RTD sets the local preference of all updates to 200. both RTC and RTD realize that network 170. RTC sets the local preference of all updates to 150. There is an exchange of local preference within AS256. This configuration sets the local preference for updates that come from AS300 to 200 and for updates that come from AS100 to 150: RTC# router bgp 256 neighbor 1.Local preference is an indication to the AS about which path has preference to exit the AS in order to reach a certain network. Therefore. Unlike the weight attribute.213.

For this reason.11.. Metric Attribute . any update that comes from AS300 has a local preference of 200. ip as−path access−list 7 permit ^300$ .3.point. you can use route maps to specify the specific updates that need to be tagged with a specific local preference.. all updates that RTD receives are tagged with local preference 200 when the updates reach RTD. such as updates that come from AS34.1 remote−as 256 .4 route−map setlocalin in neighbor 128. In the example in this section.3. Updates that come from AS34 also are tagged with the local preference of 200. This tag can be unnecessary.. The use of route maps provides more flexibility..213. Here is an example: RTD# router bgp 256 neighbor 3.3.3. have a value of 150. Any other updates.. route−map setlocalin permit 10 match as−path 7 set local−preference 200 route−map setlocalin permit 20 set local−preference 150 With this configuration.4 remote−as 300 neighbor 3.

4. In order for the router to compare metrics from neighbors that come from different ASs.10. An issue of the bgp deterministic−med command ensures the comparison of the MED variable at route choice when different peers advertise in the same AS.3.1. When an update enters the AS with a certain metric. A lower metric value is preferred more. In order to force RTA to compare the metrics.2 remote−as 100 neighbor 3. metric is exchanged between ASs.2. AS100 gets information about network 180.2 route−map setmetricout out neighbor 1.2 remote−as 100 neighbor 2. The metric default value is 0. The diagram in this section shows the set of metric.3.3. you must issue the bgp always−compare−med command on RTA.3 remote−as 400 . Assume that you have set the metric that comes from RTC to 120. and the metric that comes from RTB to 50. In the diagram in this section. The commands are the bgp deterministic−med command and the bgp always−compare−med command. Unless a router receives other directions. RTA must choose based on some other attributes. These configurations illustrate this process: RTA# router bgp 100 neighbor 2.The metric attribute also has the name MULTI_EXIT_DISCRIMINATOR.1.1 remote−as 300 .2.4. Therefore.2. When the same update passes on to a third AS. Refer to How the bgp deterministic−med Command Differs from the bgp always−compare−med Command to understand how these commands influence BGP path selection. and RTB is in AS400.. MED (BGP4)..2 remote−as 300 route−map setmetricout permit 10 set metric 120 RTD# router bgp 300 neighbor 3. RTA cannot compare the metric to 120 because RTC and RTB are in different ASs. Unlike local preference. RTC and RTD are in AS300.1.2.2. An issue of the bgp always−compare−med command ensures the comparison of the MED for paths from neighbors in different ASs. When RTA gets an update from RTB with metric 50.1.2. The attribute is a hint to external neighbors about the path preference into an AS. or INTER_AS (BGP3). RTC# router bgp 300 neighbor 2. and RTB.3. The attribute provides a dynamic way to influence another AS in the way to reach a certain route when there are multiple entry points into that AS. By default.0. the router compares metrics for paths from neighbors in the same AS.3. The bgp always−compare−med command is useful when multiple service providers or enterprises agree on a uniform policy for how to set MED.3. a router compares metrics that come from neighbors in the same AS. that metric is used to make decisions inside the AS.. the metric that comes from RTD to 200. A metric is carried into an AS but does not leave the AS. that metric returns to 0. RTA can only compare the metric that comes from RTC to the metric that comes from RTD. RTA chooses RTC as the best next hop because 120 is less than 200.2 route−map setmetricout out neighbor 1.0 via three different routers: RTC. you need to issue the special configuration command bgp always−compare−med on the router. RTD. Note: There are two BGP configuration commands that can influence the multi−exit discriminator (MED)−based path selection.3 remote−as 300 neighbor 4.1 remote−as 300 neighbor 3.

4. You can also set metric during the redistribution of routes into BGP if you issue the default−metric number command. Assume that. optional attribute in the range of 0 to 4.4. RTA picks RTB as the best next hop in order to reach network 180. prefer. You can use route maps to set the community attributes.0.0 with a metric of 50. The routing decisions are accept.967.0 255. The route map set command has this syntax: set community community−number [additive] [well−known−community] A few predefined.4 route−map setmetricout out route−map setmetricout permit 10 set metric 50 With these configurations. in the example in this section.3 remote−as 300 neighbor 4.0. • no−advertiseDo not advertise this route to any peer. • local−asUse in confederation scenarios to prevent the transmit of packets outside the local AS. well known communities for use in this command are: • no−exportDo not advertise to eBGP peers. Here are two examples of route maps that set the community: .10.3. RTB injects a network via static into AS100. internal or external. with consideration of the fact that all other attributes are the same.10. Keep this route within an AS.4.294.4.2.21 remote−as 300 neighbor 3. you must configure RTA in this way: RTA# router bgp 100 neighbor 2. RTA picks RTC as next hop.4. Here is the configuration: RTB# router bgp 400 redistribute static default−metric 50 ip route 180.0. • internetAdvertise this route to the Internet community. and redistribute.3.10. route−map setmetricout permit 10 set metric 200 RTB# router bgp 400 neighbor 4.0.200.0 null 0 !−−− This causes RTB to send out 180.4.255.4 remote−as 100 neighbor 4. Any router belongs to this community. Community Attribute The community attribute is a transitive. The community attribute is a way to group destinations in a certain community and apply routing decisions according to those communities. among others.0.3 remote−as 400 bgp always−compare−med In this case. In order to include RTB in the metric comparison.

End with CNTL/Z. table Default−IP−Routing−Table) Not advertised to any peer 1 10. Router# configure terminal Enter configuration commands. 200 replaces any old community that already exits. hexadecimal. By default.10. The first part of AA:NN represents the AS number.10. best Community: 6553620 Now. valid. The value appears as 100:20 in the output of the show ip bgp 6. In order to configure and display in AA:NN. metric 0. In this example.0 BGP routing table entry for 6.0.0 BGP routing table entry for 6. version 7 Paths: (1 available. best #1.200.0.3. localpref 100. issue the ip bgp−community new−format global configuration command. Router# show ip bgp 6. table Default−IP−Routing−Table) Not advertised to any peer . issue the ip bgp−community new−format command globally on this router.3. one per line.1) Origin IGP. Router(config)# ip bgp−community new−format Router(config)# exit With the ip bgp−community new−format global configuration command.0.3 route−map setcommunity out In Cisco IOS Software Release 12.1 from 10. Even if you set the community attribute. and AA:NN. best #1.0.10. If you use the keyword additive.0 command displays the community attribute value in decimal format. an issue of the show ip bgp 6.0. you can configure communities in three different formats: decimal. the community attribute value appears as 6553620.0. version 9 Paths: (1 available.0.3 remote−as 300 neighbor 3.3. the community value displays in AA:NN format. you must use this command: neighbor {ip−address | peer−group−name} send−community Here is an example: RTA# router bgp 100 neighbor 3.3.0. In order to send the attribute to a neighbor.0/8.200. external.0. and the second part represents a 2−byte number.0 and later.3 send−community neighbor 3. this attribute does not transmit to neighbors by default.0/8.1 (200. • route−map communitymap match ip address 1 set community no−advertise or • route−map setcommunity match as−path 1 set community 200 additive If you do not set the additive keyword. an addition of 200 to the community occurs.0.10.0.3. Cisco IOS Software uses the older decimal format.0.0 command in this example: Router# show ip bgp 6.3. Here is an example: Without the ip bgp−community new−format command in global configuration.

You define an access list and apply the access list to the updates to or from a neighbor. Route Filtering In order to restrict the routing information that the router learns or advertises. you can filter BGP with the use of routing updates to or from a particular neighbor.0. All methods achieve the same results.3.0 and sends the update to RTC.0 255.1) Origin IGP.10.255 . you must define an access list to filter those updates and apply the access list during communication with RTA: RTC# router bgp 300 network 170.200.1 (200.3 remote−as 200 neighbor 2. If RTC wants to stop the propagation of the updates to AS100. localpref 100.200.3. metric 0.255 access−list 1 permit 0.10.0.2. Issue this command in the router configuration mode: neighbor {ip−address | peer−group−name} distribute−list access−list−number {in | out} In this example.10.2. best Community: 100:20 BGP Case Studies 3 BGP Filtering A number of different filter methods allow you to control the send and receive of BGP updates.255. external.2 remote−as 100 neighbor 2.2 distribute−list 1 out access−list 1 deny 160. 1 10.0.0. RTB originates network 160. valid. You can filter BGP updates with route information as a basis.0.0 0.255. or with path information or communities as a basis.10.10.255.10.2.1 from 10.2.0 neighbor 3.10.0. The choice of one method over another method depends on the specific network configuration.

10.0.255.0. The method uses the distribute−list command with standard and extended access control lists (ACLs).0/8. you can block updates about 160.0 255.0 0.0.0. and so on.0 so that they do not go to AS100.10. define an access list on RTC that prevents the transmit to AS100 of any updates that have originated from AS200. you must use an extended access list of this format: access−list 101 permit ip 160.0.0. In the diagram in this section.0/8 only. The command access−list 1 permit 160.0.x. The use of access lists is a bit tricky when you deal with supernets that can cause some conflicts. To block the updates. RTB has different subnets of 160.0/8.0.0. Note: The /8 notation means that you use 8 bits of subnet mask. Refer to How to Block One or More Networks From a BGP Peer for sample configurations on how to filter networks from BGP peers. Assume that.x.10.0.0. which start from the far left of the IP address. In order to restrict the update to only 160.0.0.255 255. as well as prefix list filtering.x.0.0.x. You can specify an access list on both incoming and outgoing updates with use of the BGP AS paths information.0 0.0. This address is equivalent to 160.0. Your goal is to filter updates and advertise only 160.255. Issue these commands: .0.0.0.0.0.0/9.255.0.0/8. Path Filtering Another type of filtering is path filtering.0 0. 160. in the example in this section. This list permits 160.0.255 permits 160.0.255. !−−− Filter out all routing updates about 160.

2 filter−list 1 out !−−− The 1 is the access list number below. 200 is first and 400 is last. You wanted path information that comes inside updates to match the string in order to make a decision.* The access−list 1 command in this example forces the denial of any updates with path information that starts with 200 and ends with 200. A regular expression comprises: • Range A range is a sequence of characters within left and right square brackets. the updates match the access list. you specified the string ^200$. instead of the use of ^200$. you specify a string that input must match. The access list prevents the transmission of these updates to RTA. ip as−path access−list access−list−number {permit | deny} as−regular−expression neighbor {ip−address | peer−group−name} filter−list access−list−number {in | out} This example stops the RTC send of updates about 160. The access list denies these updates. • Atom An atom is a single character. in which ^ means "starts with" and $ means "ends with".3.2 remote−as 100 neighbor 2.* represents any path information.3. So .0.0 to RTA: RTC# router bgp 300 neighbor 3. means "any character" and the * means "the repetition of that character". you specify a string that consists of path information that an input must match. which is necessary to permit the transmission of all other updates.2. In this path information. This command shows all the paths that have matched the regular expression configuration.0.* is another regular expression in which the .10. 400). ip as−path access−list 1 deny ^200$ ip as−path access−list 1 permit . In the case of BGP. as in the diagram in this section. These updates match the access list ^200 because the path information starts with 200. Since RTB sends updates about 160. which is not the requirement. What happens if. In the example in the section Path Filtering.10. updates that AS400 originates have path information of the form (200.2. A regular expression is a pattern to match against an input string. The ^200$ in the command is a "regular expression".0 with path information that starts with 200 and ends with 200.2. The . An example is [abcd]. In order to check if you have implemented the correct regular expression. you use ^200? With an AS400. AS Regular Expression This section explains the creation of a regular expression.3 remote−as 200 neighbor 2. issue the show ip bgp regexp regular−expression command. When you build a regular expression.2. Here are some examples: .

which includes none. which follows an atom: * ♦ The * matches 0 or more sequences of the atom. ^ ♦ The ^ matches the start of the input string. • Piece A piece is one of these symbols. . a+ • This expression indicates that at least one occurrence of the letter "a" must be present. ab?a • This expression matches "aa" or "aba". the start of the input string. ^100 . _100$ • This expression indicates an origin of AS100. or a space. left brace ({). _100_ • This expression means via AS100. − ♦ The _ matches a comma (. \ ♦ The \ matches the character. the end of the input string.* . + ♦ The + matches 1 or more sequences of the atom. • Branch A branch is 0 or more concatenated pieces. ♦ The .). ? ♦ The ? matches the atom or the null string. matches any single character. $ ♦ The $ matches the end of the input string. Here are some examples of regular expressions: a* • This expression indicates any occurrence of the letter "a". right brace (}).

255. Note: The neighbor send−community command is necessary in order to send this attribute to RTC.3. . and this section provides a few examples of how to use community.1 send−community neighbor 3. The section Community Attribute discusses community. In this example.0.0.0 neighbor 3.1 remote−as 300 neighbor 3.3.0 255. BGP Community Filtering This document has covered route filtering and AS−path filtering.0.1 route−map setcommunity out route−map setcommunity match ip address 1 set community no−export access−list 1 permit 0.3. Use the no−export community attribute. • This expression indicates transmission from AS100. RTB# router bgp 200 network 160. Refer to Using Regular Expressions in BGP for sample configurations of regular expression filtering. ^$ • This expression indicates origination from this AS.3.255 Note: This example uses the route−map setcommunity command in order to set the community to no−export. When RTC gets the updates with the attribute NO_EXPORT. Another method is community filtering. you want RTB to set the community attribute to the BGP routes that RTB advertises such that RTC does not propagate these routes to the external peers.3.10.3.255. RTC does not propagate the updates to external peer RTA.

RTB# router bgp 200 network 160.255 A community list is a group of communities that you use in a match clause of a route map. The last community list is here to make sure .0.1 send−community neighbor 3.3.3. like weight and metric. RTB sent updates to RTC with a community of 100 200.1 remote−as 300 neighbor 3.In this example. any route that has 100 in the community attribute matches list 1. You can use the community list in order to filter or set certain parameters.3. If RTC wants to set the weight with those values as a basis.3.255.3.3. you can do this: RTC# router bgp 300 neighbor 3. The weight of this route is set to 20.3 route−map check−community in route−map check−community permit 10 match community 1 set weight 20 route−map check−community permit 20 match community 2 exact set weight 10 route−map check−community permit 30 match community 3 ip community−list 1 permit 100 ip community−list 2 permit 200 ip community−list 3 permit internet In this example. match−on−community: route−map match−on−community match community 10 !−−− The community list number is 10. The community list allows you to filter or set attributes with different lists of community numbers as a basis. RTB has set the community attribute to 100 200 additive.0.10. in certain updates with the community value as a basis. set weight 20 ip community−list 10 permit 200 300 !−−− The community number is 200 300.0 neighbor 3.255.3.3.0. ip community−list community−list−number {permit | deny} community−number For example.0 255.3.1 route−map setcommunity out route−map setcommunity match ip address 2 set community 100 200 additive access−list 2 permit 0.3 remote−as 200 neighbor 3. In the second example in this section.3. The keyword exact states that the community consists of 200 only and nothing else. This action adds the value 100 200 to any existing community value before transmission to RTC. Any route that has only 200 as community matches list 2 and has a weight of 20. you can define this route map.

3.0 neighbor 3. BGP Neighbors and Route Maps You can use the neighbor command in conjunction with route maps to either filter or set parameters on incoming and outgoing updates.that other updates do not drop.10. Route maps associated with the neighbor statement have no effect on incoming updates when you match based on the IP address: neighbor ip−address route−map route−map−name Assume that. Also. in the diagram in this section.3.0.3. Remember that anything that does not match drops. The keyword internet indicates all routes because all routes are members of the Internet community. Use a combination of neighbor and as−path access lists: RTC# router bgp 300 network 170. Refer to Using BGP Community Values to Control Routing Policy in an Upstream Provider Network for more information.3.3 route−map stamp in route−map stamp match as−path 1 set weight 20 .3 remote−as 200 neighbor 3. by default. you want RTC to learn from AS200 about networks that are local to AS200 and nothing else. you want to set the weight on the accepted routes to 20.

AS100 and AS200.2.0.10.0 to two different ASs. These updates are permitted.3. and drops updates that come from AS400. and the second one is via AS400 with path (400. you must manipulate the path information in order to manipulate the BGP decision process. The statement also sets a weight of 10 for updates that are behind AS400. ip as−path access−list 1 permit ^200$ Any updates that originate from AS200 have path information that starts with 200 and ends with 200.0 neighbor 2. you can make the path through AS100 appear to be longer than the path that goes through AS400.0.* This statement sets a weight of 20 for updates that are local to AS200. The first route is via AS100 with path (100.3. 200. If you want to influence this decision from the AS300 end. in the diagram in the section BGP Neighbors and Route Maps. The command that you use with a route map is: set as−path prepend as−path# as−path# Suppose that. Any other updates drop.10.2 remote−as 100 neighbor 2.3 remote−as 200 neighbor 3.2 route−map SETPATH out route−map SETPATH set as−path prepend 300 300 . When the information is propagated to AS600.3. RTC advertises its own network 170.10. 300).10.2.2.0.2.0 neighbor 3. If all other attributes are the same.3. Use of set as−path prepend Command In some situations. Assume that you want: • An acceptance of updates that originate from AS200 and have a weight of 20 • The drop of updates that originate from AS400 • A weight of 10 for other updates RTC# router bgp 300 network 170. the routers in AS600 have network reachability information about 150. A common practice is to repeat your own AS number in this way: RTC# router bgp 300 network 170.0. AS600 picks the shortest path and chooses the route via AS100. You can do this if you prepend AS numbers to the existing path information that is advertised to AS100.3 route−map stamp in route−map stamp permit 10 match as−path 1 set weight 20 route−map stamp permit 20 match as−path 2 set weight 10 ip as−path access−list 1 permit ^200$ ip as−path access−list 2 permit ^200 600 . 300).0 via two different routes. AS300 gets all traffic via AS100.

instead. BGP Peer Groups A BGP peer group is a group of BGP neighbors with the same update policies.6. such as a route map SETMETRIC to set the metric to 5 and two different filter lists. RTE.3.3.3.2 peer−group internalmap neighbor 3. you define a peer group name and assign these policies to the peer group. RTF. and RTG.10.2 filter−list 3 in This configuration defines a peer group with the name internalmap.6. Members of the peer group inherit all the configuration options of the peer group. 300). You can also configure members to override these options if the options do not affect outbound updates. the . 300. You do not define the same policies for each separate neighbor. distribute lists. issue this command: neighbor peer−group−name peer−group This example applies peer groups to internal and external BGP neighbors: RTC# router bgp 300 neighbor internalmap peer−group neighbor internalmap remote−as 300 neighbor internalmap route−map SETMETRIC out neighbor internalmap filter−list 1 out neighbor internalmap filter−list 2 in neighbor 5. In order to define a peer group. The configuration defines some policies for the group. Route maps. 300) that AS600 received from AS400. You can only override options that are set on the inbound.3.5. AS600 receives updates about 170. The configuration applies the peer group to all internal neighbors. 300.5.2 peer−group internalmap neighbor 5.Because of this configuration.0 via AS100 with path information of: (100. Also.2 peer−group internalmap neighbor 3. This path information is longer than the (400. 200. 1 and 2. and filter lists typically set update policies.0.

These neighbors can share the same update messages. This separation improves the convergence time and the flexibility of neighbor configuration. The feature introduces a new algorithm that dynamically calculates and optimizes update groups of neighbors that share the same outbound policies. RTC# router bgp 300 neighbor externalmap peer−group neighbor externalmap route−map SETMETRIC neighbor externalmap filter−list 1 out neighbor externalmap filter−list 2 in neighbor 2. For more information on peer groups.1.4.1. Note: You can only override options that affect inbound updates. The BGP Dynamic Update Peer Group feature separates update group replication from peer group configuration. Refer to BGP Dynamic Update Peer−Groups for more details.configuration defines a separate filter list 3 for neighbor RTE.2 peer−group externalmap neighbor 1.1. The feature is available in later Cisco IOS Software releases as well. In earlier releases of Cisco IOS Software.2 remote−as 100 neighbor 2.2 remote−as 600 neighbor 4.2. look at how you can use peer groups with external neighbors.4. Note: In Cisco IOS Software Release 12. BGP Case Studies 4 CIDR and Aggregate Addresses . you configure RTC with a peer group externalmap and apply the peer group to external neighbors.2.2 remote−as 200 neighbor 1.2 peer−group externalmap neighbor 4. Now.0(24)S.4. Also. This method to group updates limited outbound policies and specific session configurations.1. With the same diagram in this section.1.2 peer−group externalmap neighbor 1. you define the remote−as statements outside of the peer group because you must define different external ASs. the group of BGP update messages was on the basis of peer group configurations.1.1. you override the inbound updates of neighbor 1. Cisco introduced the BGP Dynamic Update Peer Groups feature.2 with the assignment of filter list 3.2. This filter list overrides filter list 2 inside the peer group.2.4. refer to BGP Peer Groups.1.2 filter−list 3 in Note: In these configurations.

0.0.0. This representation is similar to 192.3.0. CIDR or supernetting is a new way to look at IP addresses.10. In this example. You configure RTC to propagate a supernet of that route 160. You use aggregates in order to minimize the size of routing tables.10. Now.0 #RTC router bgp 300 neighbor 3.0.10.0.1 remote−as 300 network 160.213. With CIDR. The "16" represents the number of bits in the subnet mask. the network is a legal supernet. or C. there is no notion of classes.0 to RTA: RTB# router bgp 200 neighbor 3. The command aggregate−address 160.0. such as class A.2 remote−as 100 network 170. Aggregation is the process that combines the characteristics of several different routes in such a way that advertisement of a single route is possible.0.213.0.3.0.213.0 to .0 to RTA. For example.0.0.0 255.2.2. network 192.3 remote−as 200 neighbor 2.0 propagates an additional network 160.0.0.0.3.0.0. B.0. Aggregate Commands There is a wide range of aggregate commands.0 255. You must understand how each one works in order to have the aggregation behavior that you desire. when you count from the far left of the IP address.One of the main enhancements of BGP4 over BGP3 is classless interdomain routing (CIDR).0 but does not prevent the propagation of 160.0. 192.3. The first command is the one from the example in the section CIDR and Aggregate Addresses: aggregate−address address−mask This command advertises the prefix route and all the more−specific routes.0 was once an illegal class C network.0/16.255.0. RTB generates network 160.0.0 RTC propagates the aggregate address 160.0 aggregate−address 160.10.0.

The outcome is the propagation of both networks 160. An injection of the more−specific route into the BGP table is possible. define a route map and apply the route map to the aggregates.0. the network entry always injects into BGP updates. For example. This injection occurs even though you use the aggregate summary−only command.0 If you want RTC to propagate network 160.20. you want to aggregate 160.0. suppress the more−specific route 160. Note: You cannot aggregate an address if you do not have a more−specific route of that address in the BGP routing table.0.10. But the command includes as−set information in the path information of the routing updates.0.RTA.0. Note: If you aggregate a network that injected into your BGP via the network statement. Suppose that. which is the advertisement of both the prefix and the more−specific route.0.0 only and not the more−specific route.0.0 as−set The section CIDR Example 2 (as−set) discusses this command.255 access−list 1 deny 0.0. But the command suppresses advertisement with a route map basis.0.0 255.0.0.0 0.0. aggregate−address address−mask as−set This command advertises the prefix and the more−specific routes.0. for example. The example in the section CIDR Example 1 discusses this situation.10.0.0. The command suppresses all the more−specific routes.0.0.0 in the BGP table.255.0.0.0 and 160.0.0.10.0.255 By definition of the suppress−map.0. If you want to suppress more−specific routes when you do the aggregation.0. and allow the propagation of 160. Use this route map: route−map CHECK permit 10 match ip address 1 access−list 1 permit 160. The command aggregate 160.255. RTB cannot generate an aggregate for 160.0 if RTB does not have a more−specific entry of 160.0.0.10. network 160.0 to RTA. issue this command: aggregate−address address mask summary−only This command advertises the prefix only.0.0 255.20.0.255.0 255.0 and suppresses the more−specific route 160. .0. The route injection can occur via: • Incoming updates from other ASs • Redistribution of an IGP or static into BGP • The network command. aggregate−address address−mask suppress−map map−name This command advertises the prefix and the more−specific routes. with the diagram in the section CIDR and Aggregate Addresses.0.0.0. there is a suppression from the updates of any packets that the access list permits. aggregate 129.0 summary−only propagates network 160.0. The action allows you to be selective about which more−specific routes to suppress.

3. There are two solutions to this problem. RTC# router bgp 300 neighbor 3.0 255.0.0.2.2.2 remote−as 100 neighbor 2.0.0.0. RTB# router bgp 200 .0 is local to AS200.0 and suppress all the more−specific routes.0.0.0.0.10.3 remote−as 200 neighbor 2.0.Then.0.0 attribute−map SETORIGIN For more information. In order to set the origin of the aggregates to IGP. RTB generates both networks because RTB is the originator of 160.10.0 255.0. The outcome is that RTB advertises the aggregate with an origin of incomplete (?).0. apply this route map to the aggregate attribute−map command: route−map SETMETRIC set origin igp aggregate−address 160. CIDR Example 1 Request: Allow RTB to advertise the prefix 160. You cannot have RTB generate a prefix for 160.0.0.0 suppress−map CHECK Here is another variation: aggregate−address address−mask attribute−map map−name This command allows you to set the attributes.2.0. The first solution is to use a static route and redistribute into BGP.3. at the time of the send of aggregates.0.10.0.10. such as metric. The problem with this request is that network 160.2 remote−as 100 network 170.2. refer to Understanding Route Aggregation in BGP.0.0 aggregate−address 160. even if you use the aggregate summary−only command. apply the route map to the aggregate statement.0 without the generation of an entry for 160. which means that AS200 is the originator of 160.10.0.

Suppose that RTC wants to aggregate network 160.0.0.0. irrespective of which path came first.0.3.10.0 255.0.0.0 null0 In the second solution. With as−set.0.0. you force RTC to generate path information in the form of a set {}. In this example. You use the aggregate as−set command in situations in which the aggregation of information causes loss of information with regard to the path attribute.0 from RTA and updates about 160. RTC gets updates about 160.0 null0 CIDR Example 2 (as−set) You use the statement as−set in aggregation to reduce the size of the path information.20. RTD does not know the origin of that route. If you add the aggregate as−set statement.0.1 remote−as 300 redistribute static ip route 160.0 255. you add an entry for the network command.0.0/8 and send the network to RTD. neighbor 3.0.1 remote−as 300 RTA# router bgp 100 network 160. RTB# router bgp 200 network 160.0 .0.3.0.0 !−−− with the origin path as "incomplete".1 remote−as 300 redistribute static !−−− This generates an update for 160. in addition to the static route. RTB# router bgp 200 network 160. regardless of how many times the AS number appeared in multiple paths that were aggregated.0.0.3.0. except that the entry sets the origin of the update to IGP.0 mask 255.0 !−−− This entry marks the update with origin IGP.0. This entry has the same effect. ip route 160.3.3. neighbor 3. That set includes all the path information.0.3.0 neighbor 3.0 from RTB.0.10.0. the AS number is listed only once.20.

2.0 255. Case 2: RTC# router bgp 300 neighbor 3.2. the confederation preserves next hop.3.4.1 remote−as 300 Case 1: RTC does not have an as−set statement.0.0/8 !−−− with no indication that 160.0. Even though these ASs have eBGP peers to ASs within the confederation.0 summary−only aggregate 160. RTC sends an update 160.0 summary−only !−−− This command causes RTC to send RTD updates about 160.0/8 to RTD with path information (300). neighbor 2. To the outside world.4 remote−as 400 aggregate 160.0.0 255. the ASs exchange routing as if they used iBGP. issue this command: bgp confederation identifier autonomous−system The confederation identifier is the AS number of the confederation group.0.0 actually comes from two different ASs. The next two subjects.4 remote−as 400 aggregate 160.0 as−set !−−− This command causes RTC to send RTD updates about 160.3.0.2 remote−as 100 neighbor 4.2. and local preference information.3 remote−as 200 neighbor 2.0.0.0.0.4.0 255.0.2. RTC# router bgp 300 neighbor 3. The issue of this command performs peering between multiple ASs within the confederation: bgp confederation peers autonomous−system [autonomous−system] Here is an example of confederation: .0.3.2.0. metric. In this way. the confederation appears to be a single AS. Each AS alone has iBGP fully meshed and has connections to other ASs inside the confederation.0.0.4.0. BGP Confederation The implementation of BGP confederation reduces the iBGP mesh inside an AS.0.0/8 !−−− with an indication that 160.2. are for Internet service providers (ISPs) that want further control of the explosion of iBGP peering inside their ASs. BGP Confederation and Route Reflectors.0 belongs to a set {100 200}.4. as if the route originated from AS300. !−−− This may create loops if RTD has an entry back into AS100 or AS200.0.0.0.3. In order to configure a BGP confederation.0. The trick is to divide an AS into multiple ASs and assign the whole group to a single confederation.2 remote−as 100 neighbor 4.0.0.3 remote−as 200 neighbor 2.

and you define the list of confederation peers with the bgp confederation peers command. If you use confederation. or AS70.20. Here is a sample configuration of routers RTC. AS60.5 remote−as 100 (EBGP connection to external AS100) RTD# . Other non−BGP speakers exist also. and AS70.5.213. you define a full mesh of iBGP peers. AS60. you need nine peer connections for each router.5.1 remote−as 70 (BGP connection with confederation peer 70) neighbor 5.1 remote−as 60 (BGP connection with confederation peer 60) neighbor 135. AS500. but you only have interest in the BGP speakers that have eBGP connections to other ASs.Assume that you have an AS500 that consists of nine BGP speakers.1 remote−as 50 (IBGP connection within AS50) neighbor 129. You need eight iBGP peers and one eBGP peer to external ASs. RTC# router bgp 50 bgp confederation identifier 500 bgp confederation peers 60 70 neighbor 128.10.210.1 remote−as 50 (IBGP connection within AS50) neighbor 128. and RTA: Note: RTA has no knowledge of AS50. RTA has only knowledge of AS500.213. and AS70. The outside world sees only one AS. RTD. you can divide AS500 into multiple ASs: AS50. You give the AS a confederation identifier of 500. AS60.11.14. For each of AS50.212. If you want to make a full iBGP mesh inside AS500.

maintain a full iBGP mesh between RTA. and the neighbors at which the command points are the clients of that RR. RTC has a partial iBGP peering with RTA and RTB. Other iBGP peers of the RR that are not clients are "nonclients". In this example.5.213.6.210. In this way.6. or reflect. . In the example. The combination of the RR and the clients is a "cluster".6 remote−as 600 (EBGP connection to external AS600) RTA# router bgp 100 neighbor 5. Peering between RTA and RTB is not necessary because RTC is an RR for the updates that come from RTA and RTB. a BGP speaker does not advertise a route that the BGP speaker learned via another iBGP speaker to a third iBGP speaker. iBGP learned routes to other iBGP speakers.14.1 remote−as 70 (BGP connection with confederation peer 70) neighbor 6.30.5. the RTC configuration has the neighbor route−reflector−client command that points at the RTA and RTB IP addresses. In normal cases. and RTC within AS100.1 remote−as 50(BGP connection with confederation peer 50) neighbor 135. You can relax this restriction a bit and provide additional control. RTB.4 remote−as 500 (EBGP connection to confederation 500) Route Reflectors Another solution for the explosion of iBGP peering within an AS is Route Reflectors (RRs).30. RTC can be elected as an RR. and RTC form a cluster with a single RR within AS100. neighbor route−reflector−client The router with this command is the RR.212. RTA. This route reflection reduces the number of iBGP peers within an AS. If you utilize the RR concept. As the iBGP section demonstrates.2 remote−as 60 (IBGP connection within AS60) neighbor 128. router bgp 60 bgp confederation identifier 500 bgp confederation peers 50 70 neighbor 129. RTB. which allows a router to advertise.

An AS can have more than one RR. In this situation, an RR treats other RRs just like any other iBGP speaker.
Other RRs can belong to the same cluster (client group) or to other clusters. In a simple configuration, you can
divide the AS into multiple clusters. You configure each RR with other RRs as nonclient peers in a fully
meshed topology. Clients should not peer with iBGP speakers outside the client cluster.

Consider this diagram. RTA, RTB, and RTC form a single cluster. RTC is the RR. For RTC, RTA and RTB
are clients and anything else is a nonclient. Remember that the neighbor route−reflector−client command
points at clients of an RR. The same RTD is the RR for clients RTE and RTF. RTG is an RR in a third cluster.

Note: RTD, RTC, and RTG are fully meshed, but routers within a cluster are not. When an RR receives a
route, the RR routes as this list shows. However, this activity depends on the peer type:

1. Routes from a nonclient peerReflects to all the clients within the cluster.
2. Routes from a client peerReflects to all the nonclient peers and also to the client peers.
3. Routes from an eBGP peerSends the update to all client and nonclient peers.

Here is the relative BGP configuration of routers RTC, RTD, and RTB:

RTC#

router bgp 100
neighbor 2.2.2.2 remote−as 100
neighbor 2.2.2.2 route−reflector−client
neighbor 1.1.1.1 remote−as 100
neighbor 1.1.1.1 route−reflector−client
neighbor 7.7.7.7 remote−as 100
neighbor 4.4.4.4 remote−as 100

neighbor 8.8.8.8 remote−as 200

RTB#

router bgp 100
neighbor 3.3.3.3 remote−as 100
neighbor 12.12.12.12 remote−as 300

RTD#

router bgp 100
neighbor 6.6.6.6 remote−as 100
neighbor 6.6.6.6 route−reflector−client
neighbor 5.5.5.5 remote−as 100
neighbor 5.5.5.5 route−reflector−client
neighbor 7.7.7.7 remote−as 100
neighbor 3.3.3.3 remote−as 100

Because there is a reflection of the iBGP learned routes, there can be a routing information loop. The RR
scheme has a few methods to avoid this loop:

• originator−idThis is an optional, nontransitive BGP attribute that is 4 bytes long. An RR creates
this attribute. The attribute carries the router ID (RID) of the originator of the route in the local AS. If,
due to poor configuration, the routing information comes back to the originator, the information is
ignored.
• cluster−listThe section Multiple RRs within a Cluster covers cluster list.

Multiple RRs within a Cluster

Usually, a cluster of clients has a single RR. In this case, the router ID of the RR identifies the cluster. In order
to increase redundancy and avoid single points of failure, a cluster can have more than one RR. You need to
configure all RRs in the same cluster with a 4−byte cluster ID so that an RR can recognize updates from RRs
in the same cluster.

A cluster list is a sequence of cluster IDs that the route has passed. When an RR reflects a route from the RR
clients to nonclients outside of the cluster, the RR appends the local cluster ID to the cluster list. If this update
has an empty cluster list, the RR creates one. With this attribute, an RR can identify if the routing information
has looped back to the same cluster due to poor configuration. If the local cluster ID is found in the cluster
list, the advertisement is ignored.

In the diagram in this section, RTD, RTE, RTF, and RTH belong to one cluster. Both RTD and RTH are RRs
for the same cluster.

Note: There is redundancy because RTH has fully meshed peering with all the RRs. If RTD goes down, RTH
takes the place of RTD.

Here is the configuration of RTH, RTD, RTF, and RTC:

RTH#

router bgp 100
neighbor 4.4.4.4 remote−as 100
neighbor 5.5.5.5 remote−as 100
neighbor 5.5.5.5 route−reflector−client
neighbor 6.6.6.6 remote−as 100

If you turn off BGP client−to−client reflection on the RR and you make redundant BGP peering between the clients. This transmission can cause problems.4. You can start to create clusters if you configure a single router as an RR and make other RRs and RR clients normal iBGP peers. . you can safely use peer groups.7.13 remote−as 500 RTC# router bgp 100 neighbor 1.10 remote−as 100 neighbor 5. The existence of these routers allows easy and gradual migration from the current iBGP model to the RR model.5 route−reflector−client neighbor 6.3.6 route−reflector−client neighbor 7.7.4 remote−as 100 neighbor 13.6.10.10 remote−as 100 neighbor 4.3.2.6.11.7.6 remote−as 100 neighbor 6.5.9.7 remote−as 100 neighbor 10. neighbor 6.8.3.1 remote−as 100 neighbor 1.4. you can create more clusters gradually.10. Do not use peer groups if the clients inside a cluster do not have direct iBGP peers among one another and the clients exchange updates through the RR.7.2.7.5.8 remote−as 200 Note: You do not need the bgp cluster−id command for RTC because only one RR exists in that cluster. The RR scheme allows such conventional BGP speakers to coexist.13.2 route−reflector−client neighbor 4.2 remote−as 100 neighbor 2.7 remote−as 100 neighbor 3.10. Then.4 remote−as 100 neighbor 7.2.6.1.3.5 remote−as 100 neighbor 5. The router subcommand bgp client−to−client reflection is enabled by default on the RR.7.1. Important Note: This configuration does not use peer groups.3 remote−as 100 neighbor 9.6 route−reflector−client neighbor 7.10.2.10.4.5.11 remote−as 400 bgp cluster−id 10 RTF# router bgp 100 neighbor 10.11.9 remote−as 300 bgp cluster−id 10 RTD# router bgp 100 neighbor 10.3 remote−as 100 neighbor 11. This document calls these routers conventional BGP speakers.1.6.13.5. RR and Conventional BGP Speakers An AS can have BGP speakers that do not understand the concept of RRs.6.9.4.10 remote−as 100 neighbor 8.1.7 remote−as 100 neighbor 3.8. a potential withdrawal to the source of a route on the RR transmits to all clients inside the cluster.6. If you configure peer groups. These routers can be either members of a client group or a nonclient group.10.1 route−reflector−client neighbor 2.

RTA. RTE.3 remote−as 100 neighbor 2. when you are ready to upgrade.13 remote−as 300 RTC# router bgp 100 neighbor 4.4. RTC.2 remote−as 100 neighbor 1.13.2.5.5.6. .2 remote−as 100 neighbor 1. Here is the configuration of RTD and RTC: RTD# router bgp 100 neighbor 6.1. Clients do not have to understand the route reflection scheme.4 remote−as 100 neighbor 2. You cannot configure these routers as RRs.6 remote−as 100 neighbor 6. and RTB are "conventional" routers.1.14. RTD.5 route−reflector−client neighbor 3.4.6.1 remote−as 100 neighbor 14.6 route−reflector−client neighbor 5.6.In this diagram. You can do normal iBGP mesh between these routers and RTD.13.6.5. only the RRs require the upgrade.14.1. Later on.2.3. and RTF have the concept of route reflection.2.3.14 remote−as 400 When you are ready to upgrade RTC and make RTC an RR.2.1.5 remote−as 100 neighbor 5. you can make RTC an RR with clients RTA and RTB.1 remote−as 100 neighbor 13. remove the iBGP full mesh and have RTA and RTB become clients of RTC.5.

In this way. route dampening avoids a higher penalty for the iBGP peers for routes external to the AS. You define criteria to identify poorly behaved routes. If there is a need. You can also put more restrictions on nexthop−self. . Initially. At that point. this document has mentioned two attributes that you can use to prevent potential information looping: originator−id and cluster−list. The range is 1š55 minutes. Unsuppression of the routes is at a granularity of 10 seconds.000. unsuppression of the route advertisement occurs. As soon as the cumulative penalty reaches a predefined "suppress limit". and the current default is 15 minutes.Avoid Loop of Routing Information So far. this feature may be given default enablement in the future. When you use nexthop−self on RRs. Route dampening is a mechanism to minimize the instability that route flapping causes. A command that sets all parameters at the same time is: • bgp dampening half−life−time reuse suppress maximum−suppress−time This list details the syntax: • half−life−time The range is 1œ5 minutes. and the default is 2000. the router purges the information. Route dampening also reduces oscillation over the network.000. the clause only affects the next hop of eBGP learned routes because the next hop of reflected routes should not be changed. which is a per−neighbor configuration option. Once the penalty decreases below a predefined "reuse limit". Route dampening does not apply to routes that are external to an AS and learned via iBGP. Another means to control loops is to put more restrictions on the set clause of outbound route maps. dampening is off by default. Route Flap Dampening Cisco IOS Software Release 11. • suppress−value The range is 1š0. A route that flaps gets a penalty of 1000 for each flap. and the default is 4 times the half−life time. and the default is 750. The penalty decays exponentially based on a preconfigured "half−life time".0 introduced route dampening. • bgp dampening half−life−time Changes the half−life time. The router keeps the dampening information until the penalty becomes less than half of the "reuse limit". These commands control route dampening: • bgp dampeningTurns on dampening. The set clause for outbound route maps does not affect routes that reflect to iBGP peers. • max−suppress−time This is the maximum duration for the suppression of a route. suppression of the route advertisement occurs. The penalty decays at a granularity of 5 seconds. • reuse−value The range is 1š0. • no bgp dampeningTurns off dampening.

local router ID is 203.10. RTB# hostname RTB interface Serial0 ip address 203.208.255.255.10.255.208.10.6 255.250.255.0. * valid. the RTB BGP table looks like this: RTB# show ip bgp BGP table version is 24.15.2 255. > best.5 remote−as 300 RTD# hostname RTD interface Loopback0 ip address 192.255.10.250.5 0 0 300 i *> 203.250.2 Status codes: s suppressed.255.2 Status codes: s suppressed. ? − incomplete Network Next Hop Metric LocPrf Weight Path .252 router bgp 100 bgp dampening network 203.255.0 0.6 remote−as 100 The configuration of RTB is for route dampening with default parameters.250. > best.252 router bgp 300 network 192. e − EGP.208.5 255.192 interface Serial0/0 ip address 192.208.208.0 neighbor 192.208.208.208. e − EGP.15. ? − incomplete Network Next Hop Metric LocPrf Weight Path *> 192.10.10.250. The RTB BGP table looks like this: RTB# show ip bgp BGP table version is 24.10.6 command on RTD.15.15. issue the clear ip bgp 192.252 interface Serial1 ip address 192. i − internal Origin codes: i − IGP. local router ID is 203.0 0 32768 i In order to simulate a route flap.0. If you assume that the eBGP link to RTD is stable.10.0 neighbor 192.15.174 255.255. * valid. h history.208. d damped.10. d damped.0 192. h history. i − internal Origin codes: i − IGP.

255.0.250. version 25 Paths: (1 available. The default is 2000.B. external Dampinfo: penalty 2615.m. • show ip bgp flap−statistics A. the reuse value is the default. (suppressed due to dampening) 192.0 BGP routing table entry for 192. In this case. In this case. flapped 3 times in 0:05:18 . or suppressed.208.255.10. valid. i − internal Origin codes: i − IGP. flapped 1 times in 0:02:03 The route has received a penalty for flapping. > best. you see: RTB# show ip bgp BGP table version is 32.0.B.5 from 192.m. • clear ip bgp A.0.m Clears flap statistics for a single entry. • show ip bgp flap−statistics regexp regular−expression Displays flap statistics for all paths that match the regular expression.C. no best path) 300 (history entry) 192.10.10.0. If the route flaps a few more times.255.10.0 0. d damped.m.10.0 192.2 Status codes: s suppressed. e − EGP.5 (192.208.15.10. local router ID is 203. • show ip bgp neighbor [dampened−routes] | [flap−statistics] Displays flap statistics for all paths from a neighbor.208. • clear ip bgp flap−statistics A.174) Origin IGP.208.10.0 BGP routing table entry for 192.10.5 0 0 300 i *> 203.D m.250.208. h 192.250. metric 0.5 0 0 300 i *> 203. reuse in 0:27:00 The route has been dampened.208.208. but information about the route flapping still exists.15.10.10. Route suppression has not yet occurred.0. • clear ip bgp flap−statistics regexp regular−expression Clears flap statistics for all the paths that match the regular expression.10.208.5 (192.15.B.208.208.208. 750.174) Origin IGP.m. RTB# show ip bgp 192.B. • show ip bgp flap−statistics filter−list list Displays flap statistics for all paths that pass the filter.0 255. refer to BGP Best Path Selection . How BGP Selects a Path Now that you are familiar with the BGP attributes and terminology.0 0.10. • clear ip bgp flap−statistics filter−list list Clears flap statistics for all the paths that pass the filter.0 192.0 0 32768 i The BGP entry for 192.208.208.m.C. version 32 Paths: (1 available.D flap−statisticsClears flap statistics for all paths from a neighbor. These commands show and clear flap statistics information: • show ip bgp flap−statisticsDisplays flap statistics for all the paths. The route is reused when the penalty reaches the "reuse value".10. * valid.m.0 0 32768 i RTB# show ip bgp 192.D m. external Dampinfo: penalty 910.255. ? − incomplete Network Next Hop Metric LocPrf Weight Path *d 192.10.D m.5 from 192.0 255.10. The dampening information is purged when the penalty becomes less than half of the reuse limit.m Displays flap statistics for a single entry.0.208.C.m longer−prefixDisplays flap statistics for more specific entries. but the penalty is still below the "suppress limit".C. no best path) 300. the purge occurs when the penalty becomes 375 (750/2=375). metric 0. • clear ip bgp flap−statistics Clears flap statistics for all routes. h history.208. This placement means that you do not have a best path to the route.0 is in a history state. • show ip bgp flap−statistics A.

Assume that you connect to two ISPs. This section shows how to build this configuration step by step and what can go wrong along the way. In this example. iBGP runs inside AS100 between RTA and RTB. BGP Case Studies 5 Practical Design Example This section contains a design example that shows the configuration and routing tables as the tables actually appear on Cisco routers. always run iBGP within your AS in order to have better control of your routes. AS200 and AS300.Algorithm. and OSPF runs as an IGP. This is the first run of the configurations for all the routers: Note: These configurations are not the final configurations. RTA# hostname RTA . Whenever you have an AS that connects to two ISPs via eBGP.

250.63.255.0.250.2 remote−as 100 neighbor 203.13.63.252 router ospf 10 network 203.0.15.255.15.0 0.41 255.0.255.255.0.213.255.2 255.252 router ospf 10 network 203.5 255.0 network 203.250.63.250.250.255.0 interface Serial1 ip address 203.15.255.250.208.250.250.255 area 0 RTB# hostname RTB ip subnet−zero interface Serial0 ip address 203.255.255.255 area 0 router bgp 100 network 203.0 neighbor 192.213.192 interface Serial2/0 ip address 128.2 update−source Loopback0 RTF# hostname RTF ip subnet−zero interface Ethernet0 ip address 203.255.255.255.0 interface Ethernet0 ip address 203.252 ! .10.255.63.130 255.250.14.0.1 255.2 255.255.250.14.6 255.0.15.41 remote−as 100 RTC# hostname RTC ip subnet−zero interface Loopback0 ip address 128.13.255.250.250.255.1 255.0 0.252 router ospf 10 network 203.213.255.0 interface Serial0 ip address 128.ip subnet−zero interface Loopback0 ip address 203.252 interface Serial1 ip address 192.213.5 remote−as 300 neighbor 203.255 area 0 router bgp 100 network 203.15.10.250.208.13.1 255.255.255.0 neighbor 128.2 remote−as 200 neighbor 203.250.255.14.0 0.255.

1 remote−as 500 RTG# hostname RTG ip subnet−zero interface Loopback0 ip address 195.255.255.213.63.10.208.10.10.10.252 router bgp 200 network 128.10.208.6 remote−as 400 RTD# hostname RTD ip subnet−zero interface Loopback0 ip address 192.2 remote−as 400 .10.1 255.0.255.interface Serial2/1 ip address 128.10.200.63.211.174 255.252 ! interface Serial0/1 ip address 192.208.211.255.208.1 remote−as 500 neighbor 192.213.10.208.0 neighbor 128.211.255.211.5 255.211.255.2 255.255.63.0 neighbor 192.255.208.208.255.252 interface Serial1 ip address 195.255.174 255.255.255.255.6 remote−as 100 RTE# hostname RTE ip subnet−zero interface Loopback0 ip address 200.211.255.0 neighbor 128.252 router bgp 500 network 195.0 neighbor 192.1 255.10.63.2 remote−as 300 neighbor 195.1 255.10.213.63.10.255.255.2 255.10.0 interface Serial0 ip address 195.255.192 interface Serial0/0 ip address 192.6 255.252 router bgp 300 network 192.5 remote−as 200 neighbor 195.192 interface Serial0 ip address 192.213.200.10.213.10.252 clockrate 1000000 router bgp 400 network 200.1 remote−as 100 neighbor 128.252 interface Serial1 ip address 128.2 255.255.10.255.213.255.208.10.

d damped.250.2.2 100 0 200 400 500 300 i *i195.14.15.211.213. 128.63.63.208.63. has a next hop 0.2. Serial0 203. * − candidate default Gateway of last resort is not set 203. Two problems exist here.2. as if the link between RTB and RTD does not exist.255.255. There is no way to reach that next hop via this IGP.10.213. > best. i − internal Origin codes: i − IGP.0 via OSPF.0 128. Note: Notice the Next Hop attribute.250. I − IGRP. Serial0 O 203.63.213. This RTA configuration appears here: . This example uses the network command to inject networks into BGP. B − BGP D − EIGRP. M − mobile.10. which is OSPF. 1 subnets C 203. and advertises the path to other BGP peers.0 255.213.250.213.250.0 via a next hop of 128.0 128.15.14. IA − OSPF inter area E1 − OSPF external type 1.0.250.0. You can run OSPF on the RTA s0 interface and make it passive. ? − incomplete Network Next Hop Metric LocPrf Weight Path *i128. BGP picks one best path to reach a destination.2 100 0 200 400 500 i *i200.250. This method is better than a redistribution of IGP into BGP.0 is learned via path 200 with a next hop of 128.13. L2 − IS−IS level−2. network 128.213.252 is subnetted.63.250.213.0.213.0 128.13.13. E2 − OSPF external type 2.213.0. • An > symbolIndicates that BGP has chosen the best route. Serial0 Apparently. RTB has not learned about 128. RTB knows how to reach the next hop 128. is unreachable.0 0 32768 i In this table.250.2 100 0 200 400 i *>i203. Here. For example.2 0 100 0 200 i *i192. local router ID is 203.10. e − EGP.250. which is the eBGP next hop carried into iBGP.2. in this way.1.250. S − static.0. 1 subnets O 203.41 [110/75] via 203. EX − EIGRP external.0 is directly connected.255. such as 203. This is the RTB BGP table: RTB# show ip bgp BGP table version is 4.1.0 255. * valid.0. 02:50:46. BGP uses the decision steps that the document BGP Best Path Selection Algorithm outlines.2 Status codes: s suppressed. RTB knows about 128.250. 02:50:45.13.41 0 100 0 i *>203.63. these notations appear: • An i at the beginningIndicates that the entry was learned via an iBGP peer.255 is subnetted.15. h history. Note: Any locally generated entry.0.13. L1 − IS−IS level−1.0 [110/74] via 203.0 203.15.41 0 100 0 i *>i203.250.213.0 0. none of the BGP entries has reached the routing table.Always use the network command or redistribute static entries into BGP to advertise networks.0 128.15.63.0 203.213. Look at the IP routing table: RTB# show ip route Codes: C − connected.200. • Path informationThis information is intuitive. you start with the s1 interface on RTB shutdown.15.255. E − EGP i − IS−IS.0. installs the path in the IP routing table. • An i at the endIndicates that the origin of the path information is IGP. The first problem is that the next hop for these entries.63.250. R − RIP.213.250.0.15.63. O − OSPF.

0 is directly connected. 1 subnets O 203.250.15.250.213.15.250.250.250.0 0 32768 i Note: All the entries have >. IA − OSPF inter area E1 − OSPF external type 1.250.250. R − RIP.250. * − candidate default Gateway of last resort is not set 203.255.0 [110/138] via 203.250. Serial0 128.63.0.1 255. L2 − IS−IS level−2.13.41 255.2 update−source Loopback0 Note: You can issue the bgp nexthopself command between RTA and RTB in order to change the next hop.250.252 is subnetted.255.41 [110/75] via 203. Serial0 203. M − mobile.0. 1 subnets C 203.213. L1 − IS−IS level−1.2 remote−as 100 neighbor 203.10.0 128. I − IGRP.252 is subnetted.0 255.15.13.213.1.63.255 is subnetted.0.41 0 100 0 i *> 203.255.250.255.0 128. e − EGP. 00:04:46.255. Look at the routing table: RTB# show ip route Codes: C − connected.10.250.250.0. S − static.0. RTA# hostname RTA ip subnet−zero interface Loopback0 ip address 203.10.255 area 0 network 128.63.15. ? − incomplete Network Next Hop Metric LocPrf Weight Path *>i128. which means that BGP can reach the next hop.0.2 0 100 0 200 i *>i192.255.0.0. i − internal Origin codes: i − IGP. The new BGP table on RTB looks like this: RTB# show ip bgp BGP table version is 10.1.250. E − EGP i − IS−IS.13.14. E2 − OSPF external type 2.63.41 0 100 0 i *>i203.255.0 mask 255.15. 1 subnets O 128.2 100 0 200 400 500 i *>i200.15.0 [110/74] via 203.213.250. local router ID is 203.213. h history. > best.15.0 128.0 interface Ethernet0 ip address 203.250. Serial0 O 203.13.213. O − OSPF.208.250.1.13.1 255. d damped.15.0.213.250.213.0 0.2 100 0 200 400 i *>i203.0. 00:04:46.0 0.255.63.2 remote−as 200 neighbor 203.0 203.0 128. Serial0 .0 neighbor 128.211.255.255.13.0 0. 00:04:47.255.0 255.14.63.250.15.252 router ospf 10 passive−interface Serial0 network 203.0 interface Serial0 ip address 128.255.200.255 area 0 router bgp 100 network 203. EX − EIGRP external. * valid.255.250. B − BGP D − EIGRP.255.2 100 0 200 400 500 300 i *>i195.2 Status codes: s suppressed.14.213.0 255.255.0 203.63.213.

250. this is what happens: RTB# show ip route Codes: C − connected.1. L1 − IS−IS level−1.250.63.0 255.0 is variably subnetted. Serial0 B 203.0 is directly connected.63.213.13.0 because you have not redistributed BGP into OSPF yet.0 is variably subnetted.250.213.255. If you turn off synchronization on RTB. S − static.15.63.0 is now reachable via OSPF. BGP does not put these entries in the routing table and does not send the entries in BGP updates because of a lack of synchronization with the IGP. RTF in the middle does not know how to reach the networks: RTF# show ip route Codes: C − connected.0 is directly connected.213.250.250. This problem is a synchronization issue.213. L2 − IS−IS level−2.255. Note: RTF has no notion of networks 192. Ethernet0 203.0 255.14.0 255.10. E2 − OSPF external type 2.0. 1 subnets C 203. but there is no way to reach those networks.250. EX − EIGRP external.208.213. the problem still exists.255. with a metric of 2000: RTA# hostname RTA .0 [200/0] via 128.255 is subnetted.14.10.255. Serial0 128. I − IGRP. 2 subnets. 00:12:37.255.2.1. L2 − IS−IS level−2. 1 subnets O 128.255.255.10. 1 subnets C 203. IA − OSPF inter area E1 − OSPF external type 1.252 [110/138] via 203. Ethernet0 When you turn off synchronization in this situation.250.15.255 [110/75] via 203. The only difference is that 128. O − OSPF. 00:14:15. 00:01:08 O 128. * − candidate default Gateway of last resort is not set 203.0 255. 2 subnets.255.The second problem is that you still do not see the BGP entries in the routing table.13.250. B − BGP D − EIGRP.2.2.15. E − EGP i − IS−IS. 00:01:07 203.255.1.250. Ethernet0 128.14.252 is subnetted.208.213.0 [200/0] via 128.13. 00:01:08 203.0 and 195.10.13. E − EGP i − IS−IS.255. 00:12:37.250.0 255.211.255. I − IGRP.13.250.252 is subnetted.15. if you turn synchronization off. But you need synchronization later for other issues. E2 − OSPF external type 2.2. 1 subnets O 203. O − OSPF. 00:14:15.213.0. 00:12:37. R − RIP.0 [110/74] via 203. Redistribute BGP into OSPF on RTA. 2 masks O 203.14.250. Serial0 The routing table looks fine.63.1.0 255. L1 − IS−IS level−1. 00:01:07 B 192. B − BGP D − EIGRP.1. the entries appear in the routing table.63.0 is directly connected.0 [200/0] via 203.15.41 [110/11] via 203.10. But connectivity is still broken.250.0.213. S − static. IA − OSPF inter area E1 − OSPF external type 1.255.252 is subnetted. In this scenario.0 [200/0] via 128.255.211.13.41 255.213. M − mobile. Serial0 O 203. EX − EIGRP external. Serial1 C 203. M − mobile.41.15.250.0 [200/0] via 128.15. 00:01:07 B 195.250.0 [110/74] via 203. R − RIP.255. 2 masks B 128.200.63.250.250. * − candidate default Gateway of last resort is not set B 200.213.0.63.255.0 255.

15.255 area 0 router bgp 100 network 203.250.15.250.250.208.0 neighbor 128.13.255. 2 subnets C 203. 2 subnets.0.213. If you do not take this step.1 255.0. 00:00:16. routing loops occur because.0 [110/2000] via 203.255.250.5 via IGP.2 remote−as 200 neighbor 203. IA − OSPF inter area E1 − OSPF external type 1.15.250.0.250.15.255. bring up the RTB s1 interface to see what the routes look like.14.255.41 255.2 update−source Loopback0 The routing table looks like this: RTB# show ip route Codes: C − connected.0.0 [110/2000] via 203.250.63. L2 − IS−IS level−2.1 255.0 0.250.250.1.213.15.0 0.0 is directly connected.250.1.255.200.250.213.63. Serial0 O E2 203.15.0 interface Ethernet0 ip address 203.10.15. I − IGRP.1.1.10.8 is directly connected.0 255. while the iBGP distance is 200. This step allows RTA to know about the next hop 192.250. * − candidate default Gateway of last resort is not set O E2 200.13.15.0. 2 masks O 203. 00:00:15. This action is necessary because RTA does not synchronize with OSPF because of the difference in masks.2 remote−as 100 neighbor 203.255. Serial0 O E2 195.15.1.0 255. 00:00:15.250.15. in order to reach next hop 192.252 [110/138] via 203.250.0.250.0 [110/2000] via 203.63.255.0 is variably subnetted.0 is variably subnetted. L1 − IS−IS level−1.250.15.252 is subnetted.Serial0 O 128.250.255.1.250. 2 subnets.0.10. Serial0 The BGP entries have disappeared because OSPF has a better distance than iBGP.0 [110/2000] via 203.15. 00:00:15. 2 masks O E2 128.0 255.5.0.13. Serial0 203. This action is necessary on RTB for the same reason. Serial0 O E2 192.211.208. 00:00:14. 00:00:14.255. E2 − OSPF external type 2.255.213.255 area 0 network 128.0 255.255 [110/75] via 203. Serial0 203. Serial0 128. S − static.213. you need to go the other way .0 [110/2000] via 203. 00:00:14.255. ip subnet−zero interface Loopback0 ip address 203. Keep synchronization off on RTB so that RTB can advertise 203. Now. Turn off synchronization on RTA so that RTA can advertise 203.250.255.250. M − mobile.0 [110/74] via 203. EX − EIGRP external.255.41 255.213.255.0. The OSPF distance is 110.15. enable OSPF on serial 1 of RTB to make it passive. B − BGP D − EIGRP.255. E − EGP i − IS−IS.250.15.13.0.250.255.1.13.255. Also. R − RIP.0 interface Serial0 ip address 128. O − OSPF.10.255. Serial0 O 203.0 mask 255.252 router ospf 10 redistribute bgp 100 metric 2000 subnets passive−interface Serial0 network 203.0. 00:00:15.250.1.10.208.14. Loopback1 C 203.

10.41 remote−as 100 The BGP tables look like this: RTA# show ip bgp BGP table version is 117.255.0 0.15.213.10.0 128.0.41 Status codes: s suppressed. d damped.208. h history.15. * valid. i −internal Origin codes: i − IGP.208.250.2 255.13.252 router ospf 10 redistribute bgp 100 metric 2000 subnets passive−interface Serial0 network 203.63.6 255.0.208.250.213.255. local router ID is 203.250.208.0 192.255 area 0 router bgp 100 no synchronization network 203.250.15. > best.252 router ospf 10 redistribute bgp 100 metric 1000 subnets passive−interface Serial1 network 203.5 0 100 0 300 i *>i195.15.63.0.0 neighbor 128.0 interface Ethernet0 ip address 203.10.250.255.5 remote−as 300 neighbor 203.255 area 0 router bgp 100 no synchronization network 203.14.0.5 100 0 300 500 i * 128.2 remote−as 100 neighbor 203.255.250.1 255.0.41 255.1 255.63.255.0 0.255. These are the new configurations of RTA and RTB: RTA# hostname RTA ip subnet−zero interface Loopback0 ip address 203.213.63.252 interface Serial1 ip address 192.213.2 0 200 400 500 i .13.0 interface Serial0 ip address 128.2 remote−as 200 neighbor 203.255.250. e − EGP.14.10.255.0.0 network 203.2 update−source Loopback0 RTB# hostname RTB ip subnet−zero interface Serial0 ip address 203.213.250.255.255.250.0 0.10.0. ? − incomplete Network Next Hop Metric LocPrf Weight Path *> 128.13.0 neighbor 192.0 0.0 192.2 0 0 200 i *>i192.255.0.255.208.250.255.255 area 0 network 192.250.10.211.250.via eBGP.213.255.0.208.13.255 area 0 network 128.

250.0 0. with RTB as the preference because of the lower metric.13. * valid. Potential asymmetry can occur if traffic that leaves RTA comes back via RTB.0 192.63.63.250.14.211. d damped.0 203.0 0.208. there is nothing that you can do.10. even though you have multiple points to the Internet.208.0 0 32768 i *> 203.0 128. One way is to have a primary ISP and a backup ISP.10.15.10.2 0 100 0 i RTB# show ip bgp BGP table version is 12. h history.0.0 interface Serial0 ip address 128. e − EGP.250.255. or weight.10. ? − incomplete Network Next Hop Metric LocPrf Weight Path *>i128. you can balance outgoing traffic between the two ISPs.0. Perhaps one service provider is closer to a certain destination than another. > best.0 128. You can learn partial routes from one of the ISPs and default routes to both ISPs.250.208.252 router ospf 10 redistribute bgp 100 metric 2000 subnets passive−interface Serial0 . traffic from AS400 that has your network as the destination always comes in via RTA because of the shorter path.0.0 203. Entry points to your network can occur via RTA or RTB.13.41 0 100 0 i *>i203.0.0 0 32768 i *>i203. In this case.250. In this example.213.250. Because of aggregation.15.255.0. This situation can occur if you use the same pool of IP addresses. You can discover that all incoming traffic to your AS arrives via one single point.213.2 100 0 200 400 i * 192.13.10.213. you have two different major nets when you talk to the two ISPs.208.5 0 300 500 400 i *>i203. your whole AS can look like one whole entity to the outside world.250. In this way.200.0 128. i −internal Origin codes: i − IGP.0 0 32768 i There are multiple ways to design your network to talk to the two different ISPs. you receive partial routes from AS200 and only local routes from AS300. You can use the set as−path prepend command in order to prepend path numbers to your updates and make the path length look longer.0 interface Ethernet0 ip address 203.10 Status codes: s suppressed.13. *> 200.255.41 0 100 0 i *> 203.0 203.2 0 200 400 i *> 203.250.14. This configuration is the final configuration for all the routers: RTA# hostname RTA ip subnet−zero interface Loopback0 ip address 203.250.255. In the example.5 0 0 300 i *> 195.2 0 100 0 200 i * 192.15.10.0 192.200.14.63.213.0. But. You can try to effect that decision.250.41 255.0.213.5 0 300 500 i *>i200.208.15.10.0 0.1 255.5 0 300 500 400 200 i *> 192. local router ID is 203. metric.255.13. Both RTA and RTB generate default routes into OSPF. when you talk to the two ISPs.1 255.250.255. In the example.63.10. with attributes such as local preference. AS400 can have set the exit point to be AS200. the same major net. Another potential reason for asymmetry is the different advertised path length to reach your AS.250. AS200 and AS300.

255.255 area 0 network 128. use of the default−information originate command with OSPF injects the default route inside the OSPF domain. For IGRP and EIGRP. Also in this example.0.2 route−map setlocalpref in neighbor 203. For RIP.0. Also.0 0.200.0 0.63.13.0.208. The ip default−network command enables you to choose the default.252 router ospf 10 redistribute bgp 100 metric 1000 subnets passive−interface Serial1 network 203.2 255.0.10. network 203.15.15.255. without additional configuration. the local preference for routes that come from AS200 is set to 200.0 interface Serial1 ip address 203.0 into the IGP domain.2 remote−as 100 neighbor 203.250.0.255.252 ! interface Serial1 ip address 192.213.0. RTF# hostname RTF ip subnet−zero interface Ethernet0 ip address 203.250.250.0.0 neighbor 128. This example also uses this command with Intermediate System−to−Intermediate System Protocol (IS−IS Protocol) and BGP.0 is the choice for the candidate default.6 0. with IGRP and EIGRP.0.0.0 area 0 .250.2 255. there is an automatic redistribution into RIP of 0.250.0.252 router ospf 10 network 203.255. you can redistribute a static route to 0.0 0. Also.0. injection of the default information into the IGP domain occurs after redistribution of BGP into IGRP and EIGRP.0.255.0.15.255.255 area 0 ip classless RTB# hostname RTB ip subnet−zero interface Loopback1 ip address 203.6 255.255. network 200.255 area 0 network 192.1 255.0.255.10 255.0 0.255.213.213.200.15.255.255 area 0 default−information originate metric 2000 router bgp 100 no synchronization network 203.255.0 route−map setlocalpref permit 10 set local−preference 200 On RTA.63.255.250.250.10.255.0.2 update−source Loopback0 ip classless ip default−network 200.14.250.250.0.15.250.14.2 remote−as 200 neighbor 128.255.250.0.208.252 interface Serial0 ip address 203.0 network 203.

250.0. local router ID is 203.15.0 192. This value is lower than the local preference of 200.6 remote−as 400 ip classless access−list 1 deny 195.208. Here is the output of the regular expression that indicates the AS300 local routes: RTB# show ip bgp regexp ^300$ BGP table version is 14. * valid. h history. This value is higher than the local preference value of iBGP updates that come from RTA.250.63.208.10. e − EGP.255.130 255. ? − incomplete Network Next Hop Metric LocPrf Weight Path *> 192. d damped. So RTA is the preference.213.2 255.255.192 interface Serial2/0 ip address 128. transmit internally with a local preference of 100.10.252 router bgp 200 network 128.0. If you want to advertise the local routes and the neighbor routes.1 distribute−list 1 out neighbor 128. which comes from RTA. i − internal Origin codes: i − IGP.213. Any other routes on RTB.255.255.41 remote−as 100 ! ip classless ip default−network 192. If the ISP refuses to do this task.255. > best.63. .5 255.63.63.211.10.213.0 0. AS100 picks RTB for the local routes of AS300.213.0.1 remote−as 100 neighbor 128.208.208.5 0 300 0 300 RTC# hostname RTC ip subnet−zero interface Loopback0 ip address 128.0.0 ip as−path access−list 1 permit ^300$ route−map localonly permit 10 match as−path 1 set local−preference 300 For RTB.0/16 and indicate the specific routes for injection into AS100.63.15.0 neighbor 128.13.213.0 neighbor 192. Note: You only advertised the AS300 local routes.10.63. you aggregate 128. default−information originate metric 1000 ! router bgp 100 no synchronization network 203.208.213. which are the customers of the ISP.255.213.5 remote−as 300 neighbor 192.255. In this way. you must filter on the incoming end of AS100.10.255 access−list 1 permit any On RTC. the local preference for updates that come from AS300 is set to 300. use ^300_[0−9]*.5 route−map localonly in neighbor 203.252 ! interface Serial2/1 ip address 128. if other routes exist. Any path information that does not match ^300$ drops.250.10 Status codes: s suppressed.213.

10.0 neighbor 192.6 remote−as 100 RTG# hostname RTG ip subnet−zero interface Loopback0 ip address 195.10.1 remote−as 500 neighbor 192.2 route−map setcommunity out neighbor 195.255.174 255.0 updates toward RTD.2 255.0.0 summary−only neighbor 192. RTD does not export that route to RTB.5 255.255.252 router bgp 500 network 195.0 255. In this way.211.10.255.10.208. RTB does not accept these routes anyway.1 255.252 . You add a no−export community to 195.2 255. However.208.211.10.255 access−list 2 permit any route−map setcommunity permit 20 match ip address 2 ! route−map setcommunity permit 10 match ip address 1 set community no−export A demonstration of the use of community filtering is on RTG.255.0.211.10.255.10.255.252 interface Serial1 ip address 195.208.255.2 remote−as 400 ! ip classless access−list 1 permit 195.252 ! interface Serial0/1 ip address 192.208.211.211.255.208.10.255. RTE# hostname RTE ip subnet−zero interface Loopback0 ip address 200. RTD# hostname RTD ip subnet−zero interface Loopback0 ip address 192.0 interface Serial0 ip address 195.200.255.10.208.208.208.2 remote−as 300 neighbor 192.10.255.0.192 ! interface Serial0/0 ip address 192.0 0.211.0.2 send−community neighbor 192.255.255.174 255.10.1 255.192 interface Serial0 ip address 192.208.10.0 aggregate−address 195.1 255.0.255.255.211.10. in this case.255.211.10.10.208.252 router bgp 300 network 192.255.255.10.

255. 2 subnets.10.250.211.0.63.250.213.15.0 is directly connected.0/0 [110/1000] via 203. EX − EIGRP external. IA − OSPF inter area E1 − OSPF external type 1.255. d damped.0 192.5 0 300 0 300 i *> 200. M − mobile. 2 masks B 128.208. Ethernet0 B 203.63.0.250. S − static. Ethernet0 C 203.0.200. O − OSPF.0.250. R − RIP.255.255.0 255.4 255.1 remote−as 500 ip classless RTE aggregates 200.0.0 255. E − EGP i − IS−IS. M − mobile.200. I − IGRP.208.2.0. 3 subnets.252 router bgp 400 network 200.0.252 [110/138] via 203.14.213. * valid.250.213.0 [200/0] via 203.14. E2 − OSPF external type 2.13.14. L2 − IS−IS level−2.0 255. 2 masks O E2 192.63.200.10.13.14.255. 2 subnets. B − BGP D − EIGRP. 00:41:26 C 128. 00:41:25 C 203. e − EGP.250.2 200 0 200 400 i *> 203.208.255.15.6 255.255.208.0. E − EGP i − IS−IS.255.252 is directly connected.0 192.0 255.255.0 0.0 [20/0] via 128.0 [20/0] via 128.255.63. Loopback0 203.255.15.255.255 [110/75] via 203.15.0/16.200.13.0 203. h history.250.250. I − IGRP.250.0 [110/1000] via 203.213.0.250. Here are the final BGP and routing tables for RTA.10.0 summary−only neighbor 128. 00:41:25.0.2 to network 0.63.250. 00:41:25.0.2 0 200 0 200 i *>i192.213.255.14.213. interface Serial1 ip address 128.2.250.213. Ethernet0 O 192.0 255.10.255.213. * − candidate default Gateway of last resort is 128.255.0 0.0.41 Status codes: s suppressed. EX − EIGRP external.0 0 32768 i *>i203.250.10 255.63.0.213. and RTB: RTA# show ip bgp BGP table version is 21.0 is variably subnetted.0 is variably subnetted.208.2 to network 200.250.255.2. i − internal Origin codes: i − IGP. L1 − IS−IS level−1. 00:41:25.2.0 0 32768 i *> 203. R − RIP. ? − incomplete Network Next Hop Metric LocPrf Weight Path *> 128.250. Ethernet0/0 B* 200.250.14. 2 subnets.252 [110/74] via 203.2.15.0 255.10. 2 masks . 00:41:25. B − BGP D − EIGRP. S − static.10.208.2. Serial0 O*E2 0. RTF.0 128.0 is variably subnetted.0.0 192.0.250.63.250.0 is variably subnetted.10. > best. * − candidate default Gateway of last resort is 203.0 is directly connected.200. Ethernet0 128.213. 3 masks O 203.2.63.0.213. E2 − OSPF external type 2. L2 − IS−IS level−2.2.2 0 100 0 i RTA# show ip route Codes: C − connected. local router ID is 203.200. Ethernet0 O 203. IA − OSPF inter area E1 − OSPF external type 1.0.15.0 aggregate−address 200.0.0/16 128.15.15.255.14. O − OSPF. 00:02:38 RTF# show ip route Codes: C − connected.0 255.0. L1 − IS−IS level−1.5 remote−as 200 neighbor 195.10.

63.0.255.213. 00:46:55.250.0 is variably subnetted.0 [110/1000] via 203. * valid. RTB# show ip bgp BGP table version is 14.0 [110/1000] via 203.0.208. E2 − OSPF external type 2.250. ? − incomplete Network Next Hop Metric LocPrf Weight Path *>i128. L1 − IS−IS level−1.255.208.0 is variably subnetted.255.1.0 * 192.213.14.250.10 Status codes: s suppressed.0 255.255.250. Serial0 128.200.255. 2 subnets.255.10.10. local router ID is 203.0 [110/2000] via 203.1. Serial0 203. R − RIP. 2 masks B* 192. B − BGP D − EIGRP.10. such as 200.15. E − EGP i − IS−IS.14.0 255.213.213.1.10.250. O − OSPF.250.2 0 200 0 200 i *> 192. h history. Serial1 203.255. 00:03:33.0.13. 2 masks O 203.0 255. Serial1 C 203.250.14.0 0.250. is through RTA.15.0.0.0 [110/2000] via 203.0 128.14.250. 2 subnets C 203. 01:12:09.255. 2 masks O E2 128. Ethernet0 128.250. 01:12:09.2.255.250. O E2 192.250.250.213.14.0.255.10.13.250.208.15.1. e − EGP.2.252 is directly connected.1.250.5 to network 192.41 0 100 0 i *>i203.250. Serial0 . 00:48:50.208.0.250.4 255.255. 2 masks O 203.14.0.5 0 300 0 300 i *>i200.250.15.2.0 is variably subnetted.1. 01:12:09.2 200 0 200 400 i *>i203. Serial1 203. 2 subnets.0 255.255.255.15.10.0.255.0 [110/2000] via 203. 2 subnets.41 0 100 0 i *> 203.250.250.255.255. 2 masks O 203.200.13.250. IA − OSPF inter area E1 − OSPF external type 1.0 192. 00:45:01.252 is directly connected.0. S − static.252 [110/74] via 203.208. Serial0 O E2 203.0 255.15.10.0 255.0.255.0 is variably subnetted.15.0 [20/0] via 192.13. 2 subnets. 01:15:40.63.0 255. i − internal Origin codes: i − IGP. Loopback1 C 203.0.255.0 255. EX − EIGRP external.208.208.255.10 255.0 is variably subnetted.0 [110/74] via 203.15.10.0.13.1. If something happens to the connection between RTB and RTD. such as 192.63.14.13. > best.0 is variably subnetted. The way to reach other known networks.0 is directly connected.255 [110/11] via 203. 01:12:09. Ethernet0 O E2 203.15. 2 subnets.0.0 [110/2000] via 203.0.0 255.208.15.15. d damped.250.41 255.4 255. 01:20:33.10.0. 01:20:33.14.1. Ethernet0 O E2 200.250. 2 subnets.255 [110/65] via 203. 01:12:11. Ethernet0 O 128.250.0 0. Ethernet0 O*E2 0.208.0 203.15.0 203.213.213.255.250.13.1.41 255. L2 − IS−IS level−2.15. Serial1 Note: The RTF routing table indicates that the way to reach networks local to AS300.200.13.0/16 128.250.250.0. Serial1 C 203.255.13.250. Ethernet0 203.0 is directly connected.5.255.250.2.252 is subnetted. I − IGRP. Serial0 O 203.255.15.255.255.0 [110/2000] via 203. the default that RTA advertises kicks in with a metric of 2000.255.8 is directly connected.0.250.208. * − candidate default Gateway of last resort is 192.0 255.15. is through RTB.252 [110/128] via 203. 00:50:46 C 192.250. The gateway of last resort is set to RTB.0 0 32768 i RTB# show ip route Codes: C − connected.208.10.10.15. 00:03:47. M − mobile.255. 2 masks O E2 128.250.213.250.255 [110/75] via 203.0. Serial1 O 192.

255. and information about networking solutions.63.252 [110/138] via 203. NetPro Discussion Forums − Featured Conversations for RP Service Providers: MPLS Virtual Private Networks: Services Virtual Private Networks: Security Related Information • BGP: Frequently Asked Questions • Sample Configurations of BGP Across a PIX Firewall • How to Use HSRP to Provide Redundancy in a Multihomed BGP Network • Configuring Single Router Mode Redundancy and BGP on a Cat6000 MSFC • Achieve Optimal Routing and Reduce BGP Memory Consumption • Troubleshooting BGP • Troubleshooting High CPU Caused by the BGP Scanner or BGP Router Process • Load Sharing with BGP in Single and Multihomed Environments: Sample Configurations • BGP Support Page • Technical Support & Documentation − Cisco Systems All contents are Copyright © 2006−2007 Cisco Systems. Updated: Feb 13. O 128.213.0 [110/2000] via 203. suggestions.0. Serial0 O E2 200. 00:05:42.1. All rights reserved.250.1. and technologies.1.0. products.0 255.15. 01:20:34.255.0/0 [110/2000] via 203.0 255. 00:08:33.200.15. Important Notices and Privacy Statement. 2008 Document ID: 26634 . Inc.255. The featured links are some of the most recent conversations available in this technology. Serial0 NetPro Discussion Forums − Featured Conversations Networking Professionals Connection is a forum for networking professionals to share questions.0.0.250. Serial0 O*E2 0.15.250.