You are on page 1of 100

BGP4 Case Studies/Tutorial

Sam Halabi-cisco Systems

The purpose of this paper is to introduce the reader to the latest in BGP4 terminology and
design issues. It is targeted to the novice as well as the experienced user. For any clarifica-
tion or comments please send e-mail to shalabi@cisco.com.

Copyright 1995 ©Cisco Systems Inc.

1/26/96-Rev: A1.2 Page 1 Sam Halabi-cisco Systems

1.0 Introduction..............................................................................................................4
1.1 How does BGP work ...........................................................................................................4
1.2 What are peers (neighbors) ..................................................................................................4
1.3 Information exchange between peers...................................................................................4
2.0 EBGP and IBGP ......................................................................................................5
3.0 Enabling BGP routing..............................................................................................6
3.1 BGP Neighbors/Peers ..........................................................................................................7
4.0 BGP and Loopback interfaces ...............................................................................10
5.0 EBGP Multihop .....................................................................................................11
5.1 EBGP Multihop (Load Balancing) ....................................................................................12
6.0 Route Maps ............................................................................................................13
7.0 Network command.................................................................................................17
7.1 Redistribution.....................................................................................................................18
7.2 Static routes and redistribution ..........................................................................................20
8.0 Internal BGP ..........................................................................................................22
9.0 The BGP decision algorithm..................................................................................23
10.0 As_path Attribute...................................................................................................24
11.0 Origin Attribute......................................................................................................25
12.0 BGP Nexthop Attribute..........................................................................................27
12.1 BGP Nexthop (Multiaccess Networks)..............................................................................29
12.2 BGP Nexthop (NBMA) .....................................................................................................30
12.3 Next-hop-self .....................................................................................................................31
13.0 BGP Backdoor .......................................................................................................32
14.0 Synchronization .....................................................................................................34
14.1 Disabling synchronization .................................................................................................35
15.0 Weight Attribute.....................................................................................................37
16.0 Local Preference Attribute.....................................................................................39
17.0 Metric Attribute .....................................................................................................41
18.0 Community Attribute .............................................................................................44
19.0 BGP Filtering .........................................................................................................45
19.1 Route Filtering ...................................................................................................................45
19.2 Path Filtering......................................................................................................................47
19.2.1 AS-Regular Expression .......................................................................................49
19.3 BGP Community Filtering.................................................................................................50
20.0 BGP Neighbors and Route maps ...........................................................................53
20.1 Use of set as-path prepend .................................................................................................55
20.2 BGP Peer Groups...............................................................................................................56
21.0 CIDR and Aggregate Addresses ............................................................................58

1/26/96-Rev: A1.2 Page 2 Sam Halabi-cisco Systems

21.1 Aggregate Commands........................................................................................................59
21.2 CIDR example 1 ................................................................................................................61
21.3 CIDR example 2 (as-set)....................................................................................................63
22.0 BGP Confederation................................................................................................65
23.0 Route Reflectors.....................................................................................................68
23.1 Multiple RRs within a cluster ............................................................................................71
23.2 RR and conventional BGP speakers ..................................................................................73
23.3 Avoiding looping of routing information...........................................................................74
24.0 Route Flap Dampening ..........................................................................................75
25.0 How BGP selects a Path ........................................................................................79
26.0 Practical design example: ......................................................................................80

1/26/96-Rev: A1.2 Page 3 Sam Halabi-cisco Systems

allows you to create loop free interdomain routing between autonomous systems.1 How does BGP work BGP uses TCP as its transport protocol (port 179). BGP keeps a version number of the BGP table and it should be the same for all of its BGP peers.1. From then on incremental updates are sent as the routing table changes. An autonomous system is a set of routers under a single technical administration.2 Page 4 Sam Halabi-cisco Systems . BGP routers will exchange network reachability information. Routers in an AS can use multiple interior gateway protocols to exchange routing information inside the AS and an exterior gateway protocol to route packets outside the AS. This information will help in constructing a graph of ASs that are loop free and where routing policies can be applied in order to enforce some restrictions on the routing behavior. 1. Two BGP speaking routers form a TCP connection between one another (peer routers) and exchange messages to open and confirm the connection parameters. 1/26/96-Rev: A1. The version number will change whenever BGP updates the table due to some routing information changes. Keepalive packets are sent to ensure that the connection is alive between the BGP peers and notification packets are sent in response to errors or special conditions. this information is mainly an indication of the full paths (BGP AS numbers) that a route should take in order to reach the destination network.0 Introduction The Border Gateway Protocol (BGP). 1.2 What are peers (neighbors) Any two routers that have formed a TCP connection in order to exchange BGP routing information are called peers. defined in RFC 1771.3 Information exchange between peers BGP peers will initially exchange their full BGP routing tables. 1. they are also called neighbors.

It is necessary to ensure reachability for networks within an AS before sending the information to other external ASs.0 EBGP and IBGP If an Autonomous System has multiple BGP speakers. EBGP AS100 IBGP AS300 AS200 1/26/96-Rev: A1. As far as this paper is concerned. it could be used as a transit service for other ASs.2. when BGP is running between routers belonging to two different ASs we will call it EBGP (Exterior BGP) and for BGP running between routers in the same AS we will call it IBGP (Interior BGP). This is done by a combination of Internal BGP peering between routers inside an AS and by redistributing BGP information to Internal Gateway protocols running in the AS. As you see below. AS200 is a transit autonomous system for AS100 and AS300.2 Page 5 Sam Halabi-cisco Systems .

The neighbor definition indicates which routers we are trying to talk to with BGP. 1/26/96-Rev: A1.0 Enabling BGP routing Here are the steps needed to enable and configure BGP.3. In the first example RTA and RTB are in different autonomous systems and in the second example both routers belong to the same AS. The next section will introduce you to what is involved in forming a valid peer connection. Let us assume you want to have two routers RTA and RTB talk BGP. We start by defining the router process and define the AS number that the routers belong to: The command used to enable BGP on a router is: router bgp autonomous-system RTA# router bgp 100 RTB# router bgp 200 The above statements indicate that RTA is running BGP and it belongs to AS100 and RTB is running BGP and it belongs to AS200 and so on.2 Page 6 Sam Halabi-cisco Systems . The next step in the configuration process is to define BGP neighbors.

2 Page 7 Sam Halabi-cisco Systems . the extended ping forces the pinging router to use as source the IP address specified in the neighbor command rather than the IP address of the interface the packet is going out from.A special case (EBGP multihop) will be discussed later when the external BGP peers are not directly connected. The ip-address is the next hop directly connected address for EBGP1 and any IP address2 on the other router for IBGP. 1/26/96-Rev: A1. etc. One sure way to verify reachability is an extended ping between the two IP addresses. It is essential that the two IP addresses used in the neighbor command of the peer routers be able to reach one another.3. the BGP version they are running (version 3 or 4). Two BGP speaking routers trying to become neighbors will first bring up the TCP connection between one another and then send open messages in order to exchange values such as the AS number. the BGP router ID and the keepalive hold time. Any state other than established is an indication that the two routers did not become neighbors and hence the BGP updates will not be exchanged. 1. 2.A special case for loopback interfaces is discussed later. The TCP connection is essential in order for the two peer routers to start exchanging routing updates.1 BGP Neighbors/Peers Two BGP routers become neighbors or peers once they establish a TCP connection between one another. After these values are confirmed and accepted the neighbor connection will be established. The neighbor command used to establish a TCP connection is: neighbor ip-address remote-as number The remote-as number is the AS number of the router we are trying to connect to via BGP.

2 remote-as 200 RTC# router bgp 200 neighbor 175.1.212.1.1.1.220.213. To prevent negotiations and force the BGP version used to communicate with a neighbor.1 175.1.2 remote-as 100 neighbor 175.1.213.1 remote-as 200 RTB# router bgp 200 neighbor 129.2 AS100 AS300 129.212.220. clear ip bgp address (where address is the neighbor address) clear ip bgp * (clear all neighbor connections) By default.1 RTB IBGP RTC 175.2 AS200 RTA# router bgp 100 neighbor 129.1 remote-as 200 1/26/96-Rev: A1. BGP sessions begin using BGP Version 4 and negotiating downward to earlier versions if necessary.213. perform the following task in router configuration mode: neighbor {ip address|peer-group-name} version value An example of the neighbor command configuration follows: RTA RTD EBGP 129.220.It is important to reset the neighbor connection in case any bgp configuration changes are made in order for the new parameters to take effect.213.2 Page 8 Sam Halabi-cisco Systems .220.

213. IBGP routers do not have to be directly connected. You should also note the BGP is version 4.220. #SH IP BGP N BGP neighbor is 129. The following is an example of the information that the command “sh ip bgp neighbors” will show you. Any time new information comes in. the table will increase the version and a version that keeps incrementing indicates that some route is flapping causing routes to keep getting updated).1. RTB and RTC are run- ning IBGP. The difference between EBGP and IBGP is manifested by having the remote-as number pointing to either an external or an internal AS. Anything other than state established indicates that the peers are not up. Also. the remote router ID (highest IP address on that box or the highest loopback interface in case it exists) and the table version (this is the state of the table. table version = 3. 0 in queue Connections established 11. hold time is 180. as long as there is some IGP running that allows the two neighbors to reach one another. keepalive interval is 60 seconds Minimum time between advertisement runs is 30 seconds Received 2828 messages.1.1 BGP state = Established. remote AS 200. 0 in queue Sent 2826 messages. remote router ID 175.In the above example RTA and RTB are running EBGP. 1/26/96-Rev: A1. 0 notifications.2 Page 9 Sam Halabi-cisco Systems . external link BGP version 4. pay special attention to the BGP state.212. up for 0:10:59 Last read 0:00:29. the EBGP peers are directly connected and the IBGP peers are not. dropped 10 In the next section we will discuss special situations such as EBGP multihop and loopback addresses. 0 notifications.

11.2 Page 10 Sam Halabi-cisco Systems . most of the time the peer routers are directly connected and loopback does not apply.1 remote-as 100 In the above example.225.1. In the case of EBGP. RTB is using in its neighbor command the loopback interface of RTA (150.212.11.225.11.1. 1/26/96-Rev: A1.1 update-source int loopback 1) and this statement forces BGP to use the IP address of its loopback interface when talking to neighbor 190. some extra configuration needs to be done on the neighbor router. The neighbor router needs to tell BGP that it is using a loopback interface rather than a physical interface to initiate the BGP neighbor TCP connection.1 update-source int loopback 1 RTB# router bgp 100 neighbor 150.1 RTB RTA 190. Loopback Interface 1 150.1.0 BGP and Loopback interfaces Using a loopback interface to define neighbors is commonly used with IBGP rather than EBGP.225.1).4. If the IP address of a loopback interface is used in the neighbor com- mand. RTA and RTB are running internal BGP inside autonomous system 100.225.225.212. RTA will do so by adding the update-source int loopback configuration (neighbor 190.1 AS100 RTA# router bgp 100 neighbor 190.1.11. in this case RTA has to force BGP to use the loopback IP address as the source in the TCP neighbor connection.212. Normally the loopback interface is used to make sure that the IP address of the neighbor stays up and is independent of an interface that might be flaky.11.1 remote-as 100 neighbor 190. The command used to indicate a loopback interface is: neighbor ip-address update-source interface The following example should illustrate the use of this command.

RTB is indicating a neighbor that is directly connected (129.1. Some IGP or static routing should also be configured in order to allow the non directly connected neighbors to reach one another.2 129.11.2) and that is why it does not need the ebgp-multihop command. The multihop is used only for external BGP and not for internal BGP.1.213.11.213.213. The following example shows how to achieve load balancing with BGP in a particular case where we have EBGP over parallel lines.225.1.0 EBGP Multihop In some special cases. there could be a requirement for EBGP speakers to be not directly connected.11.11. 5.1 AS100 AS300 RTA# router bgp 100 neighbor 180.1 ebgp-multihop RTB# router bgp 300 neighbor 129.213. RTA RTB 129. RTA needs to indicate that it will be using ebgp-multihop.Note that RTA has used the physical interface IP address (190.1) of RTB as a neighbor and that is why RTB does not need to do any special configuration.225. 1/26/96-Rev: A1.225.2 remote-as 100 RTA is indicating an external neighbor that is not directly connected. On the other hand.2 Page 11 Sam Halabi-cisco Systems .3 180.1 remote-as 300 neighbor 180.1.225. The following example gives a better illustration of EBGP multihop. In this case EBGP multihop is used to allow the neighbor connection to be established between two non directly con- nected external peers.

5.1 EBGP Multihop (Load Balancing)

160.10.0.0
150.10.0.0 loopback 150.10.1.1 loopback 160.10.1.1

RTB
1.1.1.1 1.1.1.2
RTA
2.2.2.1 2.2.2.2
AS 100 AS 200

RTA#
int loopback 0
ip address 150.10.1.1 255.255.255.0

router bgp 100
neighbor 160.10.1.1 remote-as 200
neighbor 160.10.1.1 ebgp-multihop
neighbor 160.10.1.1 update-source loopback 0
network 150.10.0.0

ip route 160.10.0.0 255.255.0.0 1.1.1.2
ip route 160.10.0.0 255.255.0.0 2.2.2.2

RTB#
int loopback 0
ip address 160.10.1.1 255.255.255.0

router bgp 200
neighbor 150.10.1.1 remote-as 100
neighbor 150.10.1.1 update-source loopback 0
neighbor 150.10.1.1 ebgp-multihop
network 160.10.0.0

ip route 150.10.0.0 255.255.0.0 1.1.1.1
ip route 150.10.0.0 255.255.0.0 2.2.2.1

The above example illustrates the use of loopback interfaces,
update-source and ebgp-multihop. This is a workaround in order to achieve
load balancing between two EBGP speakers over parallel serial lines. In
normal situations, BGP will pick one of the lines to send packets on and
load balancing would not take place. By introducing loopback interfaces,
the next hop for EBGP will be the loopback interface. Static routes (it
could be some IGP also) are used to introduce two equal cost paths to
reach the destination. RTA will have two choices to reach next hop
160.10.1.1: one via 1.1.1.2 and the other one via 2.2.2.2 and the same
for RTB.

1/26/96-Rev: A1.2 Page 12 Sam Halabi-cisco Systems

6.0 Route Maps

At this point I would like to introduce route maps because they will be
used heavily with BGP. In the BGP context, route map is a method used to
control and modify routing information. This is done by defining condi-
tions for redistributing routes from one routing protocol to another or
controlling routing information when injected in and out of BGP. The for-
mat of the route map follows:

route-map map-tag [[permit | deny] | [sequence-number]]

The map-tag is just a name you give to the route-map. Multiple instances
of the same route map (same name-tag) can be defined. The sequence number
is just an indication of the position a new route map is to have in the
list of route maps already configured with the same name.

For example, if I define two instances of the route map, let us call it
MYMAP, the first instance will have a sequence-number of 10, and the
second will have a sequence number of 20.

route-map MYMAP permit 10
(first set of conditions goes here.)

route-map MYMAP permit 20
(second set of conditions goes here.)

When applying route map MYMAP to incoming or outgoing routes, the first
set of conditions will be applied via instance 10. If the first set of
conditions is not met then we proceed to a higher instance of the route
map.

The conditions that we talked about are defined by the match and set
configuration commands. Each route map will consist of a list of match
and set configuration. The match will specify a match criteria and set
specifies a set action if the criteria enforced by the match command are
met.

For example, I could define a route map that checks outgoing updates and
if there is a match for IP address 1.1.1.1 then the metric for that
update will be set to 5. The above can be illustrated by the following
commands:

match ip address 1.1.1.1
set metric 5

Now, if the match criteria are met and we have a permit then the routes
will be redistributed or controlled as specified by the set action and we
break out of the list.

If the match criteria are met and we have a deny then the route will not
be redistributed or controlled and we break out of the list.

1/26/96-Rev: A1.2 Page 13 Sam Halabi-cisco Systems

If the match criteria are not met and we have a permit or deny then the
next instance of the route map (instance 20 for example) will be checked,
and so on until we either break out or finish all the instances of the
route map. If we finish the list without a match then the route we are
looking at will not be accepted nor forwarded.

One restriction on route maps is that when used for filtering BGP updates
(as we will see later) rather than when redistributing between protocols,
you can NOT filter on the inbound when using a “match” on the ip address.
Filtering on the outbound is OK.

The related commands for match are:

match as-path
match community
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 automatic-tag
set community
set clns
set interface
set default interface
set ip next-hop
set ip default next-hop
set ip precedence
set tos
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weight

Let’s look at some route-map examples:

1/26/96-Rev: A1.2 Page 14 Sam Halabi-cisco Systems

3.0 with a metric of 2 and all other routes with a metric of 5 then we might use the following configuration: RTA# router rip network 3.0 0.2 RTC 2.3 3.0.2.2.3 remote-as 300 network 150.255.0. If RTA wants to redistribute to RTB routes about 170.0 network 150.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.2.3 170. 150.255 1/26/96-Rev: A1.10.0.2. RTA is getting updates via BGP and redistributing them to rip.0 AS 300 Example 1: Assume RTA and RTB are running rip.2.0 passive-interface Serial0 redistribute bgp 100 route-map SETMETRIC router bgp 100 neighbor 2.10.10.0 network 2.3.10.10.2.0.3.2 Page 15 Sam Halabi-cisco Systems .0.0.0.3.10.0 RTA RTB 3. RTA and RTC are running BGP.0.0.0.0.4 AS 100 2.

2.0. If there is no match then we go down the route map list which says.2. It is always very important to ask the question.0.10.0 it will have a metric of 2 and then we break out of the route map list.255.255 Now that you feel more comfortable with how to start BGP and how to define a neighbor.0 neighbor 2.2.0.0.0 0. I will go through these methods one by one.2 Page 16 Sam Halabi-cisco Systems .255 access-list 1 permit 0. There are multiple ways to send network information using BGP.10.0.0 255. 1/26/96-Rev: A1. set everything else to metric 5.10.0.255.255.0.2 route-map STOPUPDATES out route-map STOPUPDATES permit 10 match ip address 1 access-list 1 deny 170.0.2 remote-as 100 neighbor 2. Example 2: Suppose in the above example we did not want AS100 to accept updates about 170. let’s look at how to start exchanging network information.10.2. what will happen to routes that do not match any of the match statements because they will be dropped by default.In the above example if a route matches the IP address 170. we have to use an outbound route map on RTC: RTC# router bgp 300 network 170. Since route maps cannot be applied on the inbound when matching based on an ip address.

0.0 255.0 Network command The format of the network command follows: network network-number [mask network-mask] The network command controls what networks are originated by this box. static or learned dynamically.213. This is a different concept from what you are used to configuring with IGRP and RIP.0. A maximum of 200 entries of the network command are accepted.255.0. The /16 indicates that we are using a supernet of the class C address and we are advertizing the first two octets (the first 16 bits).0 because the static route will put a matching entry in the routing table. whether connected. will generate a network entry for 192. With this command we are not trying to run BGP on a certain interface.0 null 0 The above example indicates that router A.255.7.213.213. The mask portion is used because BGP4 can handle subnetting and supernetting.0.213. The network command will work if the network you are trying to advertise is known to the router.0. Note that we need the static route to get the router to generate 192. 1/26/96-Rev: A1.0.2 Page 17 Sam Halabi-cisco Systems .0 mask 255.0 ip route 192. rather we are trying to indicate to BGP what networks it should originate from this box.0/16. An example of the network command follows: RTA# router bgp 1 network 192.

0 mask 255. OSPF.0 and RTC is announcing 175. RTA is announcing 129.0.255.220.0 (this will limit the networks originated by your AS to 175.0 AS200 If you use a network command you will have: RTC# router eigrp 10 network 175.1.0. some of these routes might have been learned via BGP and you do not need to send them out again.1.0. Careful filtering should be applied to make sure you are sending to the internet only routes that you want to advertise and not everything you have.1 remote-as 300 network 175.0. Let us look at the example below.220.7. RIP. This sounds scary because now you are dumping all of your internal routes into BGP.1 Redistribution The network command is one way to advertise your networks via BGP.213. Look at RTC’s configuration: RTD AS300 1.1.1.220.1. EIGRP. Another way is to redistribute your IGP (IGRP.1 1.1. etc.0 129.2 Page 18 Sam Halabi-cisco Systems .2 RTB RTA RTC AS100 175.1.220.213.0) If you use redistribution instead you will have: 1/26/96-Rev: A1.0.1.220.0 redistribute bgp 200 default-metric 1000 100 250 100 1500 router bgp 200 neighbor 1.0.0.) into BGP.

220.220.0 0. This is misleading because you are not the source of 129.220.1.1.0. 1/26/96-Rev: A1.0 redistribute bgp 200 default-metric 1000 100 250 100 1500 router bgp 200 neighbor 1.255.0 to be originated by your AS.2 Page 19 Sam Halabi-cisco Systems .1.0.255 The access-list is used to control what networks are to be originated from AS200.0.1 remote-as 300 redistribute eigrp 10 (eigrp will inject 129.1 distribute-list 1 out redistribute eigrp 10 access-list 1 permit 175.213.0.0 again into BGP) This will cause 129.RTC# router eigrp 10 network 175.1 remote-as 300 neighbor 1. The correct configuration would be: RTC# router eigrp 10 network 175.1. So you would have to use filters to prevent that network from being sourced out by your AS.1.0 but AS100 is.1.213.1.213.0 redistribute bgp 200 default-metric 1000 100 250 100 1500 router bgp 200 neighbor 1.1.1.

255.0 null0 The null 0 interface means to disregard the packet.1 remote-as 300 redistribute static ip route 175.2 Page 20 Sam Halabi-cisco Systems .220. The only difference is that BGP will consider these routes as having an origin of incomplete (unknown).0. We have discussed how we can use different methods to originate routes out of our autonomous system.2 Static routes and redistribution You could always use static routes to originate a network or a subnet.0 redistribute bgp 200 default-metric 1000 100 250 100 1500 router bgp 200 neighbor 1.220.220.0 (which exists of course) the router will send it to the specific match otherwise it will disregard it. Please remember that these routes are generated in addition to other BGP routes that BGP has learned via neighbors (internal or external).1.0. will indicate your AS as the origin for these networks. This is a nice way to advertise a supernet. Injecting BGP into IGP is always done by redistribution.0. or redistribution or static. The difference is that routes generated by the network command. 1/26/96-Rev: A1. BGP passes on information that it learns from one peer to other peers.0 255.7.1. In the above example the same could have been accomplished by doing: RTC# router eigrp 10 network 175.255. So if I get the packet and there is a more specific match than 175.

0.10.10.0 or network 160.20.10.20.0 in RTC unless you want RTC to also generate these networks on top of passing them on as they come in from AS100 and AS200. This is to insure a loop free interdomain topology.10.2 160.10.10.0 AS 100 RTA 160.Example: 150.10.10.00 Note that you do not need network 150.10.0.1 remote-as 100 neighbor 160.2 RTC 170.10.20.10.0.20.10.0 AS 300 RTA# router bgp 100 neighbor 150.20. Again the difference is that the network command will add an extra advertisement for these same networks indicating that AS300 is also an origin for these routes.10.20.10.0.10.0.2 remote-as 300 network 150.20.0.10. An important point to remember is that BGP will not accept updates that have originated from its own AS.1 150.0 RTB# router bgp 200 neighbor 160.1 remote-as 200 network 170. 1/26/96-Rev: A1.2 remote-as 300 network 160.2 Page 21 Sam Halabi-cisco Systems .20.0 RTB 150.0.0 RTC# router bgp 300 neighbor 150.1 AS 200 160.

1 RTE 175.0 AS500 AS400 170.0 and will send it to AS300.10.0 1/26/96-Rev: A1.10.0 AS300 RTA# router bgp 100 neighbor 190.10.0.0 Internal BGP IBGP is used if an AS wants to act as a transit system to other ASs.For example.50. but IBGP offers more flexibility and more efficient ways to exchange information within an AS.0 to AS100 with origin still AS100.10. RTD IBGP RTB 190. You might ask.50. for example IBGP provides us with ways to control what is the best exit point out of the AS by using local preference (will be discussed later).10. RTB will pass 150.20.10.1 150.20.10.10. RTA will generate a route 150.2 Page 22 Sam Halabi-cisco Systems . 8.2 remote-as 300 network 150. assume AS200 above had a direct BGP connection into AS100.1 remote-as 100 neighbor 170. why can’t we do the same thing by learning via EBGP redistributing into IGP and then redistributing again into another AS? We can.10.0.10.2 RTC 175.10.0.10.40.1 170.10.2 RTA AS 100 170.20.0.40.30. RTA will notice that the update has originated from its own AS and will ignore it.0.1 IBGP 175. then RTC will pass this route to AS200 with the origin kept as AS100.

The BGP updates coming from RTB to RTA will be sent to RTE (outside of the AS) but not to RTD (inside of the AS).2 remote-as 100 network 175. the protocol will have to decide which paths to choose in order to reach a specific destination.10. RTA and RTB are running IBGP and RTA and RTD are running IBGP also. 1/26/96-Rev: A1.10. BGP will choose only a single path to reach a specific destination.0 An important point to remember. the receiving BGP speaker will not redistribute that information to other BGP speakers in its own AS. The decision process is based on different attributes. path length. local preference. origin code. 9. In the following section I will try to explain these attributes and show how they are used.0 RTC# router bgp 400 neighbor 175.2 Page 23 Sam Halabi-cisco Systems .30.10.10. In the above diagram. The receiving BGP speaker will redistribute that information to other BGP speakers outside of its AS. metric and so on.50. administrative weights. This is why an IBGP peering should be made between RTB and RTD in order not to break the flow of the updates. the route origin. such as next hop.1 remote-as 100 neighbor 175. BGP will always propagate the best path to its neighbors. is that when a BGP speaker receives an update from other BGP speakers in its own AS (IBGP).0.40.1 remote-as 400 network 190.RTB# router bgp 100 neighbor 150.40. That is why it is important to sustain a full mesh between the IBGP speakers within an AS. We will start with the path attribute.0 The BGP decision algorithm After BGP receives updates about different destinations from different autonomous systems.10.

0.10 300 Whenever a route update passes through an AS.0 is (300.10.0 is advertised by RTB in AS200. the AS number is prepended to that update.10. 1/26/96-Rev: A1.10. An example of AS-SET is given later.0.0 AS 100 AS200 RTB RTA AS 300 RTC 100 200 180.10. So as far as RTA is concerned the path to reach 190. In the above example. traverse AS300 and then AS100 in order to reach 170.2 Page 24 Sam Halabi-cisco Systems . network 190.0.0. An AS-SET is an ordered mathematical set {} of all the ASs that have been traversed.0 and path (100) in order to reach 170. The AS_path attribute is actually the list of AS numbers that a route has traversed in order to reach a destination.0. RTB will have to take path (300.200).0 and 180.0 As_path Attribute 170.10.0.0.10.0 reaches RTA it will have two AS numbers attached to it: first 200 then 300. when that route traverses AS300 and RTC will append its own AS number to it.0.0.10. So when 190.10.0 190.10.e.10.0. RTC will have to traverse path (200) in order to reach 190.0.10.0.0.10.100) i.10. The same applies for 170.

20.11.40.10. The origin attribute can assume three values: IGP: Network Layer Reachability Information (NLRI) is interior to the originating AS. This is indicated with an “i” in the BGP table.2 RTE 170.0 Origin Attribute The origin is a mandatory attribute that defines the origin of the path information. then the origin of the path info will be IGP.10.20.1 175. INCOMPLETE: NLRI is unknown or learned via some other means.1 150.2 Page 25 Sam Halabi-cisco Systems . This usually occurs when we redistribute a static route into BGP and the origin of the route will be incomplete.1 IBGP AS 100 170. EGP: NLRI is learned via EGP (Exterior Gateway Protocol).0.50.0 AS300 1/26/96-Rev: A1.10.10. Example: RTA RTB 190. This is indicated with an “?” in the BGP table. This is indicated with an “e” in the BGP table.10.10.2 170. This normally happens when we use the bgp network command or when IGP is redistributed into BGP.30.

0 redistribute static ip route 190.10. RTA will also reach 190.2 Page 26 Sam Halabi-cisco Systems .0 via: i (which means.0 via: 300 i (which means the next AS path is 300 and the origin of the route is IGP).10.1 remote-as 100 network 170.0.255. coming from a static route).0 null0 RTB# router bgp 100 neighbor 150.10.1 remote-as 100 network 190.50.10.30. RTE will also reach 190.20.10.10.2 remote-as 300 network 150.50.50.0 255.10.10.10.0 via: 100 i (the next AS is 100 and the origin is IGP).0.1 remote-as 100 neighbor 170.0 RTA will reach 170. RTE will reach 150.0.20. 1/26/96-Rev: A1.0.0.10.10. the entry is in the same AS and the origin is IGP).RTA# router bgp 100 neighbor 190.0.10.0.0 RTE# router bgp 300 neighbor 170.0 via: 100 ? (the next AS is 100 and the origin is incomplete “?”.

20.10. This is described in the following sections. the next hop is always the IP address of the neighbor specified in the neighbor command1. in which case the nexthop will be the ip address of the router that is closest to the destination. the protocol states that the next hop advertised by EBGP should be carried into IBGP.12.20.10.0.1.10.10. the next hop to reach 170.0 is 170.10.20.0.2 via IGP.0. 1/26/96-Rev: A1.0 to its IBGP peer RTB with a next hop of 170. In the above example.10.10. RTC will advertise 170.0 RTA RTB 150.2.0.10. otherwise RTB will drop packets destined to 170.10.10.0.1 IBGP 170.10.10.0 because the next hop address would be inaccessible.10.50. Because of that rule.10. For EBGP.1.10.20.2 Page 27 Sam Halabi-cisco Systems .2 RTC 170.This is not true if the next hop is on a multiaccess media.10. You should make sure that RTB can reach 170.2 and NOT 150.30. 1.10.30. You would want to make IGRP passive on the link to RTC so BGP is only exchanged. For example.0 BGP Nexthop Attribute 150. RTA will advertise 170. For IBGP. if RTB is running igrp you could also run IGRP on RTA network 170. So according to RTB.1 AS 100 170.10.0.20.0 to RTA with a next hop of 170.2 and RTA will advertise 150.0.0.0.0 to RTC with a next hop of 170.1 150.0 AS 300 The BGP nexthop attribute is the next hop IP address that is going to be used to reach a certain destination.20.20.

Example:

RTA#
router bgp 100
neighbor 170.10.20.2 remote-as 300
neighbor 150.10.50.1 remote-as 100
network 150.10.0.0

RTB#
router bgp 100
neighbor 150.10.30.1 remote-as 100

RTC#
router bgp 300
neighbor 170.10.20.1 remote-as 100
network 170.10.0.0

*RTC will advertise 170.10.0.0 to RTA with a NextHop = 170.10.20.2
*RTA will advertise 170.10.0.0 to RTB with a NextHop=170.10.20.2
(The external NextHop via EBGP is sent via IBGP)

Special care should be taken when dealing with multiaccess and NBMA
networks as described in the following sections.

1/26/96-Rev: A1.2 Page 28 Sam Halabi-cisco Systems

12.1 BGP Nexthop (Multiaccess Networks)

150.10.0.0 AS 100
RTA
RTB 150.10.50.1
150.10.30.1

170.10.20.1

170.10.20.2 RTC
170.10.20.3 RTD

AS 300
180.20.0.0

The following example shows how the nexthop will behave on a multiaccess
network such as ethernet.

Assume that RTC and RTD in AS300 are running OSPF. RTC is running BGP
with RTA. RTC can reach network 180.20.0.0 via 170.10.20.3. When RTC
sends a BGP update to RTA regarding 180.20.0.0 it will use as next hop
170.10.20.3 and not its own IP address (170.10.20.2). This is because the
network between RTA, RTC and RTD is a multiaccess network and it makes
more sense for RTA to use RTD as a next hop to reach 180.20.0.0 rather
than making an extra hop via RTC.

*RTC will advertise 180.20.0.0 to RTA with a NextHop = 170.10.20.3.

If the common media to RTA, RTC and RTD was not multiaccess, but NBMA
(Non Broadcast Media Access) then further complications will occur.

1/26/96-Rev: A1.2 Page 29 Sam Halabi-cisco Systems

12.2 BGP Nexthop (NBMA)

150.10.0.0 AS 100
RTA
RTB 150.10.50.1
150.10.30.1

170.10.20.1

FR

170.10.20.3 AS 400
RTD
170.10.20.2
RTC

AS 300
180.20.0.0

If the common media as you see in the shaded area above is a frame relay
or any NBMA cloud then the exact behavior will occur as if we were
connected via ethernet. RTC will advertise 180.20.0.0 to RTA with a next
hop of 170.10.20.3.

The problem is that RTA does not have a direct PVC to RTD, and cannot
reach the next hop. In this case routing will fail.

In order to remedy this situation a command called NextHopself is
created.

1/26/96-Rev: A1.2 Page 30 Sam Halabi-cisco Systems

10.20.1 next-hop-self RTC will advertise 180.12.2 1.0 with a NextHop = 170.0. a command called next-hop-self is created.20.20.10.20.1 remote-as 100 neighbor 170.10.3 Next-hop-self Because of certain situations with the nexthop as we saw in the previous example. In the previous example the following will solve our problem: RTC# router bgp 300 neighbor 170. the syntax is: neighbor {ip-address|peer-group-name1} next-hop-self The next-hop-self command will allow us to force BGP to use a specified IP address as the next hop rather than letting the protocol choose the nexthop.We will discuss peer-group-names later on 1/26/96-Rev: A1.2 Page 31 Sam Halabi-cisco Systems .

RTA will receive updates about 160.0 AS 300 Consider the above diagram. BGP has the following distances.10. 100 for IGRP.2 3.0 RTA RTB IGP 2. but that could be changed by the distance command: distance bgp external-distance internal-distance local-distance external-distance:20 internal-distance:200 local-distance:200 RTA will pick EBGP via RTC because of the lower distance. 90 for EIGRP and 110 for OSPF.3.3.3 AS 200 AS 100 2.10.0. Default distance is 120 for RIP.0 via two routing protocols: EBGP with a distance of 20 and IGP with a distance higher than 20. then we have two options: 1/26/96-Rev: A1.0 160.0 BGP Backdoor 150. RTA and RTC are running EBGP and RTB and RTC are running EBGP.10.0. etc. RTA and RTB are running some kind of IGP (RIP.3.2.10. IGRP.0.2 Page 32 Sam Halabi-cisco Systems .2.2.0 via RTB (IGP).0.1 3.10.) By definition. By default.1 RTC 170. EBGP updates have a distance of 20 which is lower than the IGP distances.13.3.0.2. If we want RTA to learn about 160.

2 Page 33 Sam Halabi-cisco Systems . but because of the backdoor command EIGRP will be preferred.10.Use BGP backdoor BGP backdoor will make the IGP route. The configured network is the network that we would like to reach via IGP.10.10. Normally EBGP will be preferred.10.0.1.0.1 remote-as 300 network 160.0. and will also learn it from RTC via EBGP with distance 20. the preferred route.0 backdoor Network 160.0. 1/26/96-Rev: A1. 2.0 will be treated as a local entry but will not be advertised as a normal network entry would.0 from RTB via EIGRP with distance 90.2.2.0 router bgp 100 neighbor 2. Use the following command: network address backdoor. For BGP this network will be treated as a locally assigned network except it will not be advertised in bgp updates. RTA will learn 160. Example: RTA# router eigrp 10 network 160.Change EBGP’s external distance or IGP’s distance which is NOT recommended.

14.0.2 Page 34 Sam Halabi-cisco Systems .2. This could be done by defining a static route.10.2.0.0.0.0 propagated within IGP? RTA RTB IBGP 2.0 AS 300 Before we discuss synchronization let us look at the following scenario. If RTB starts advertising to AS400 that he can reach 170.10. 1.0 AS 100 170. RTB will have to send the traffic to RTE.0 via next hop 2.1 (remember that the next hop is carried via IBGP).0 into IGP. This is called synchronization.10.0.0. In order to reach the next hop.2.2. BGP will wait until IGP has propagated the route within the AS and then will advertise it to external peers.0 2.0.0.1 RTD RTC AS400 170.0.0 RTE Was 170.10. we will check to see if we have a route in the ip routing table. so RTB will get the update and will be able to reach 170. Assume that RTA has not redistributed network 170.10.10.0. BGP should not advertise a route before all routers in your AS have learned about the route via IGP1. Synchronization states: If your autonomous system is passing traffic from another AS to a third AS. RTA and RTB are running IBGP.10.10.10. 1/26/96-Rev: A1.2.0 will flow in and get dropped at RTE.10.0 Synchronization 150.0 even exists.0.0.10. RTC in AS300 is sending updates about 170.0 then traffic coming from RTD to RTB with destination 170.2 170.As far as the router is concerned.2. so at this point RTE has no idea that 170.

10. if you have all your routers in the AS running BGP and you are not running any IGP.0.0. We can fool RTB into thinking that IGP has propagated the information by adding a static route in RTB pointing to 170. or if all routers in your AS will be running BGP. (Make sure you do a clear ip bgp address to reset the session) 1/26/96-Rev: A1.10.In the above example. Disabling synchronization is not automatic. you can disable synchronization. Disabling this feature can allow you to carry fewer routes in your IGP and allow BGP to converge more quickly. and your router will be waiting forever for an IGP update about a certain route before sending it to external peers. the router has no way of knowing that. Care should be taken to make sure that other routers can reach 170. 14.0 otherwise we will have a problem reaching that network.0 via IGP before it starts sending the update to RTD. If you will not be passing traffic from a different autonomous system through your AS. You have to disable synchronization manually in this case for routing to work correctly. RTB will wait to hear about 170.0. router bgp 100 no synchronization.10.0.1 Disabling synchronization In some cases you do not need synchronization.2 Page 35 Sam Halabi-cisco Systems .

3.0.0 AS300 RTB# router bgp 100 network 150.10.3.3.3.0.1 remote-as 100 network 175.0 in its ip routing table and will advertise it to RTD even if it does not have an IGP path to 170.10.1.0.1 1.0 170.0 RTA# router bgp 100 network 150.2 Page 36 Sam Halabi-cisco Systems .2.Example: 150.3.0 neighbor 3.1 2.2 RTC RTD AS400 175.10.0 2.0 neighbor 1.2.1.0 AS100 170.1.0.0.4 3.0.3 1.1.10.0) RTD# router bgp 400 neighbor 1.0.3.10.3.10.2 170.1.1.0.2.1.0.3 remote-as 100 no synchronization (RTB will put 170.1.0 Was 170.2.0.2 remote-as 400 neighbor 3.10.0 propagated within IGP? RTA RTB IBGP 3.10.0.4 remote-as 100 1/26/96-Rev: A1.3.10.10.10.

RTB has also learned about network 175.0.0 and has to decide which way to go.0.1.0.10.0 AS100 175.0.10.0. The weight is assigned locally to the router. A weight can be a number from 0 to 65535.10. This is achieved by using multiple methods: 1. Let us study the above example.0 190.2 1.10.0. The weight is used for a best path selection process.2 Page 37 Sam Halabi-cisco Systems . Routes with a higher weight are preferred when multiple routes exist to the same destination.10.1 (175.0) (175.0.0.2.10.10.0 from AS4 and will propagate the update to RTC. RTA has learned about network 175.1. It is a value that only makes sense to the specific router and which is not propagated or carried through any of the route updates.0 RTA AS200 RTB AS4 2.0 from AS4 and will propagate it to RTC. RTC has now two ways for reaching 175.Using the neighbor command neighbor {ip-address|peer-group} weight weight 2.0 Weight Attribute 170.0. then we will force RTC to use RTA as a next hop to reach 175.10.Using AS path access-lists ip as-path access-list access-list-number {permit|deny} as-regular- expression neighbor ip-address filter-list access-list-number weight weight 1/26/96-Rev: A1. If on RTC we can set the weight of the updates coming from RTA to be higher than the weight of updates coming from RTB.15.2.10.0) w=200 RTC w= 100 AS300 The weight attribute is a Cisco defined attribute.0. Paths that the router originates have a weight of 32768 by default and other paths have a weight of zero.

0.1.0.2 Page 38 Sam Halabi-cisco Systems .10.2.2 remote-as 200 neighbor 2.2 filter-list 6 weight 100 ip as-path access-list 5 permit ^100$(this will only permit path 100) ip as-path access-list 6 permit ^200$ The same outcome as above can be achieved by using routmaps.2.1. RTC# router bgp 300 neighbor 1.1.1 filter-list 5 weight 200 neighbor 2.1.2.1. The same outcome can be achieved via ip as-path and filter lists.1 weight 200 (route to 175.10.2 weight 100 (route to 175.2 remote-as 200 neighbor 2.2.1 remote-as 100 neighbor 1.1.1.2.3-Using route-maps example: RTC# router bgp 300 neighbor 1. would have weight 200) route-map setweightin permit 20 set weight 100 (anything else would have weight 100) 1/26/96-Rev: A1.1 route-map setweightin in neighbor 2. packets from AS100.2.2.2.2.1 remote-as 100 neighbor 1.1.1. i.2. RTC# router bgp 300 neighbor 1.2 remote-as 200 neighbor 2.1.1 remote-as 100 neighbor 1. RTA will be preferred as the next hop.2 route-map setweightin in ip as-path access-list 5 permit ^100$ route-map setweightin permit 10 match as-path 5 set weight 200 (anything that applies to access-list 5.2.0 from RTA will have 200 weight) neighbor 2.1.2.e.0 from RTB will have 100 weight) *Routes with higher weight are preferred when multiple routes exist to the same destination.1.

In the above diagram.1.0.3 128. local preference is an attribute that is exchanged among routers in the same AS.0.3.3. Let us assume that RTD is the preferred exit point.3.1 AS100 AS300 set local pref 200 set local pref 150 AS256 1.3. 1/26/96-Rev: A1.213.213.2 AS34 RTC 3.11.1. Local preference will help us determine which way to exit AS256 in order to reach that network.16. The following configuration will set the local preference for updates coming from AS300 to 200 and those coming from AS100 to 150.1 IBGP 128.0 from two different sides of the organization. Unlike the weight attribute which is only relevant to the local router. A path with a higher local preference is more preferred. Local preference is set via the “bgp default local-preference <value>” command or with route-maps as will be demonstrated in the following example: The bgp default local-preference <value> command will set the local pref- erence on the updates out of the router going to peers in the same AS.11.2 Page 39 Sam Halabi-cisco Systems .1.10.0 Local Preference Attribute 170.0 RTB RTA 3.2 RTD Local Pref= 150 Local Pref = 200 Local preference is an indication to the AS about which path is preferred to exit the AS in order to reach a certain network. The default value for local preference is 100.1.4 1.10. AS256 is receiving updates about 170.

This means that updates coming from AS34 will also be tagged with the local preference of 200.3. Since local preference is exchanged within AS256.213.1.3. This might not be needed.213. both RTC and RTD will realize that network 170.11. Any other updates such as those coming from AS34 will be set with a value of 150.1 remote-as 100 neighbor 128.10. This is why we can use route maps to specify what specific updates need to be tagged with a specific local preference as shown below: RTD# router bgp 256 neighbor 3.2 Page 40 Sam Halabi-cisco Systems .1 remote-as 256 bgp default local-preference 200 In the above configuration RTC will set the local preference of all updates to 150. All traffic in AS256 addressed to that network will be sent to RTD as an exit point.1.3.4 remote-as 300 neighbor 3.11.RTC# router bgp 256 neighbor 1. In the above example. 1/26/96-Rev: A1.4 remote-as 300 neighbor 128.4 setlocalin in neighbor 128. any update coming from AS300 will be set with a local preference of 200.3.0. all updates received by RTD will be tagged with local preference 200 when they reach RTD.2 remote-as 256 bgp default local-preference 150 RTD# router bgp 256 neighbor 3.1 remote-as 256 ip as-path 7 permit ^300$ route-map setlocalin permit 10 match as-path 7 set local-preference 400 route-map setlocalin permit 20 set local-preference 150 With this configuration.3.11.3. The same RTD will set the local preference of all updates to 200.213. More flexibility is provided by using route maps.0 has a higher local preference when coming from AS300 rather than when coming from AS100.

The Metric default value is 0.10.3.1.0. metric is exchanged between ASs.4.2. A metric is carried into an AS but does not leave the AS.4.4.0 Metric Attribute metric=0 METRIC (MULTI_EXIT_DISC) (INTER_AS) 170. Unless otherwise specified.1. When the same update is passed on to a third AS.0.2 RTD 180.2 3. that metric will be set back to 0 as shown in the above diagram. When an update enters the AS with a certain metric. Unlike local preference.4 RTB 2.1 1.1.2.10.2 Page 41 Sam Halabi-cisco Systems . A lower value of a metric is more preferred.3.3.17.0.0 AS100 RTA 180.1 AS300 3.0 The metric attribute which is also called Multi_exit_discriminator (MED. RTC and 1/26/96-Rev: A1.3. that metric is used for decision making inside the AS. RTD and RTB.10.0.4.2.3 AS400 set metric 200 set metric 120 2. This is a dynamic way to influence another AS on which way to choose in order to reach a certain route given that we have multiple entry points into that AS.2. a router will compare metrics for paths from neighbors in the same AS.2 4. AS100 is getting information about network 180. In the above diagram.3 RTC 1. BGP4) or Inter-As (BGP3) is a hint to external neighbors about the pre- ferred path into an AS.10.1.0 set metric 50 4.0 via three different routers: RTC. In order for the router to compare metrics from neighbors coming from different ASs the special configuration command “bgp always-compare-med” should be configured on the router.

3.3.1 remote-as 300 neighbor 3.4 remote-as 100 neighbor 4. considering all other attributes are the same.1. RTA will pick RTC as next hop.2.2.4.4.2 route-map setmetricout out neighbor 1.2.2 remote-as 100 neighbor 3.3. Assume that we have set the metric coming from RTC to 120.3. When RTA gets an update from RTB with metric 50.4.2.2 remote-as 100 neighbor 2.1 remote-as 300 route-map setmetricout permit 10 set metric 200 RTB# router bgp 400 neighbor 4. the metric coming from RTD to 200 and the metric coming from RTB to 50. This is illustrated in the configs below: RTA# router bgp 100 neighbor 2. Given that by default a router compares metrics coming from neighbors in the same AS.3 remote-as 400 RTC# router bgp 300 neighbor 2.3 remote-as 300 neighbor 4. he can not compare it to 120 because RTC and RTB are in different ASs (RTA has to choose based on some other attributes).4 route-map setmetricout out route-map setmetricout permit 10 set metric 50 With the above configs.1.2 remote-as 300 route-map setmetricout permit 10 set metric 120 RTD# router bgp 300 neighbor 3. 1/26/96-Rev: A1.2.2 route-map setmetricout out neighbor 1.1.4.4.4.RTD are in AS300 and RTB is in AS400.2 Page 42 Sam Halabi-cisco Systems . In order to force RTA to compare the metrics we have to add bgp always-compare-med to RTA. RTA can only compare the metric coming from RTC to the metric coming from RTD and will pick RTC as the best next hop because 120 is less than 200.2.3.3.1.

Metric can also be set while redistributing routes into BGP.10. 1/26/96-Rev: A1.0.10. the command is: default-metric number Assume in the above example that RTB is injecting a network via static into AS100 then the following configs: RTB# router bgp 400 redistribute static default-metric 50 ip route 180.0 with a metric of 50.2 Page 43 Sam Halabi-cisco Systems .0.4.3 remote-as 400 bgp always-compare-med In this case RTA will pick RTB as the best next hop in order to reach network 180.0.0.3.0 255.3 remote-as 300 neighbor 4.2.4.10.0 null 0 will cause RTB to send out 180.255.3. we have to configure RTA as follows: RTA# router bgp 100 neighbor 2.In order to have RTB included in the metric comparison.0.21 remote-as 300 neighbor 3.

etc.2 Page 44 Sam Halabi-cisco Systems .3.294. optional attribute in the range 0 to 4.18. Even if we set the community attribute. prefer.3 remote-as 300 neighbor 3.3. this attribute will not be sent to neighbors by default. The route map set command has the following syntax: set community community-number [additive] A few predefined well known communities (community-number) are: -no-export (Do not advertise to EBGP peers) -no-advertise (Do not advertise this route to any peer) -internet (Advertise this route to the internet community. if we use the keyword additive then the 200 will be added to the community. The community attribute is a way to group destinations in a certain community and apply routing decisions (accept.3.0 Community Attribute The community attribute is a transitive.3.3 route-map setcommunity out 1/26/96-Rev: A1.3 send-community neighbor 3. We can use route maps to set the community attributes. redistribute.) according to those communities.200. In order to send the attribute to our neighbor we have to use the following: neighbor {ip-address|peer-group-name} send-community Example: RTA# router bgp 100 neighbor 3.967.3. 200 will replace any old community that already exits. any router belongs to it) An example of route maps where community is set is: route-map communitymap match ip address 1 set community no-advertise or route-map setcommunity match as-path 1 set community 200 additive If the additive keyword is not set.3.

RTB is originating network 160.0 AS 300 In order to restrict the routing information that the router learns or advertises. If RTC wanted to stop those updates from propagating to AS100.3. you can filter BGP based on routing updates to or from a particular neighbor.3 AS 200 AS 100 2.1 Route Filtering 150. we would have to apply an access-list to filter those updates and apply it when talking to RTA: 1/26/96-Rev: A1.0.0.2 3. In order to achieve this. Use the following com- mand in the router configuration mode: Neighbor {ip-address|peer-group-name} distribute-list access-list-number {in | out} In the following example.0 and sending it to RTC.10.0 BGP Filtering Sending and receiving BGP updates can be controlled by using a number of different filtering methods.2.1 3.0 RTA RTB 2.10.2 Page 45 Sam Halabi-cisco Systems .3.2.2. an access-list is defined and applied to the updates to or from a neighbor.10.3. choosing one over the other depends on the spe- cific network configuration.0. BGP updates can be filtered based on route information. All methods will achieve the same results.1 RTC 170.0 160. 19.3. on path information or on communities.2.19.0.10.

RTC# router bgp 300 network 170.2.x.0.3 remote-as 200 neighbor 2.X and our goal is to filter updates and advertise only 160.x) Using access-lists is a bit tricky when we are dealing with supernets that might cause some conflicts.2.0 0.0.0/9 and so on.10.0.0 neighbor 3.0. this is equivalent to 160.0) The following access list: access-list 1 permit 160. Another type of filtering.0.255.0.0.255.0/8 we have to use an extended access list of the following format: access-list <number> permit ip <ip address> <ip address don’t care bits> <mask> <mask don’t care bits> ex: access-list 101 permit ip 160.255.10.0 0.0.0.0.255.3.0/8 only.0 0.0.2.255.0.160.0.2.10.0.10.3. 1/26/96-Rev: A1.255. is path filtering which is described in the next section.2 remote-as 100 neighbor 2.0.0 This list will permit 160.0.0.0 255.0.0.255 255.0.X.0/8 (this notation means that we are using 8 bits of subnet mask starting from the far left of the IP address.0.0/8.255 (filter out all routing updates about 160. In order to restrict the update to only 160.0.0.0. Assume in the above example that RTB has different subnets of 160.255 access-list 1 permit 0.0.255.0.0 255.2 Page 46 Sam Halabi-cisco Systems .0 0.0.255 will permit 160.2 distribute-list 1 out access-list 1 deny 160.

2 3.2.2.3.2.3.10.2.0.2 Page 47 Sam Halabi-cisco Systems .3 AS 200 AS 100 2.10.0.2.2 filter-list 1 out (the 1 is the access list number below) 1.3.2 Path Filtering 150.0. To do this use the following statements.0.0 RTB RTA 2.2 remote-as 100 neighbor 2.0 AS400 160.10.0 from going to AS100 by defining an access list on RTC that prevents any updates that have originated from AS 200 from being sent to AS100.10. This term will be discussed shortly 1/26/96-Rev: A1.2.1 RTC 170. In the above figure we can block updates about 160.0 RTC# router bgp 300 neighbor 3.2.3 remote-as 200 neighbor 2.0 AS 300 You can specify an access list on both incoming and outgoing updates based on the BGP autonomous system paths information.1 3.3. ip as-path access-list access-list-number {permit|deny} as-regular- expression1 neighbor {ip-address|peer-group-name} filter-list access-list-number {in|out} The following example will stop RTC from sending RTA updates about 160.3.2.10.0.19.3.

0 with path information starting with 200 and ending with 200.10. Since RTB sends updates about 160.* In the above example. which is needed to permit all other updates to be sent.0. A good way to check whether we have implemented the correct regular expression is to do: sh ip bgp regexp <regular expression>. The next section will explain what is involved in creating a regular expression.ip as-path access-list 1 deny ^200$ ip as-path access-list 1 permit .* is another regular expression with the dot meaning any character and the * meaning the repetition of that character. 400) with 200 being first and 400 being last.2 Page 48 Sam Halabi-cisco Systems . access-list 1 states: deny any updates with path information that start with 200 (^) and end with 200 ($). 1/26/96-Rev: A1. updates originated by AS400 will have path information of the form (200. then this update will match the access list and will be denied. The . Those updates will match the access list ^200 because they start with 200 and will be prevented from being sent to RTA which is not the required behavior. What would happen if instead of using ^200$ we have used ^200 If you have an AS400 (see figure above). Regular expressions sound a bit complicated but actually they are not. So . This will show us all the path that has matched the configured regular expression. with ^ meaning starts with and $ meaning ends with. The ^200$ is called a regular expression.* is actually any path information.

or a space. The regular expression is composed of the following: A. By building a regular expression we specify a string that input must match. In the previous example we specified the string ^200$ and wanted path information coming inside updates to match it in order to perform a decision.2 Page 49 Sam Halabi-cisco Systems .(Matches a comma (. the end of the input string. including none a+ at least one occurrence of a should be present ab?a this will match aa or aba ex: _100_(via AS100) ^100$ (origin AS100) ^100 . ex: [abcd] B. C-Pieces A piece is an atom followed by one of the symbols: * (Matches 0 or more sequences of the atom) + (Matches 1 or more sequences of the atom) ? (Matches the atom or the null string) D.2. In case of BGP we are specifying a string consisting of path information that an input should match.* (coming from AS100) ^$ (originated from this AS) 1/26/96-Rev: A1. right brace (}).1 AS-Regular Expression A regular expression is a pattern to match against an input string.Ranges: A range is a sequence of characters contained within left and right square brackets.19. left brace ({). the beginning of the input string. (Matches any single character) ^ (Matches the beginning of the input string) $ (Matches the end of the input string) \character (Matches the character) . Examples of regular expressions follow: a* any occurrence of the letter a.Branch A branch is a 0 or more concatenated pieces.).Atoms An atom is a single character .

10.0 neighbor 3.3.3.0.2 Page 50 Sam Halabi-cisco Systems .1 RTC 170.19.0.3 AS 200 AS 100 2.3.2.0 and here are few examples of how we can use it.3.3.3.2.0 160.3. 150.0.255.0 255. Community has been discussed in section 19.10.10.1 route-map setcommunity out route-map setcommunity match ip address 1 set community no-export access-list 1 permit 0.2 3.3.10.1 3. Another method is community filtering.3.1 remote-as 300 neighbor 3.1 send-community neighbor 3.0.255 1/26/96-Rev: A1.255.3.2.0.3 BGP Community Filtering We have already seen route filtering and as-path filtering.0. The no-export community attribute is used: RTB# router bgp 200 network 160.0 RTA RTB 2.2.0 AS 300 We would like RTB above to set the community attribute to the bgp routes it is advertising such that RTC would not propagate these routes to its external peers.

RTB has set the community attribute to 100 200 additive.0. ip community-list community-list-number {permit|deny} community-number For example we can define the following route map. it will not propagate them to its external peer RTA.0.3.2 Page 51 Sam Halabi-cisco Systems . In example two above. Example 2: RTB# router bgp 200 network 160. RTB was sending updates to RTC with a community of 100 200. Note also that we had to use the “neighbor send-community” command in order to send this attribute to RTC. The value 100 200 will be added to any existing community value before being sent to RTC. A community list is a group of communities that we use in a match clause of a route map which allows us to do filtering or setting attributes based on different lists of community numbers.3. If RTC wants to set the weight based on those values we could do the following: 1/26/96-Rev: A1. When RTC gets the updates with the attribute no-export.3.3.1 route-map setcommunity out route-map setcommunity match ip address 2 set community 100 200 additive access-list 2 permit 0.255.3.255 In the above example.1 remote-as 300 neighbor 3.0 neighbor 3.10. match-on-community: route-map match-on-community match community 10 (10 is the community-list number) set weight 20 ip community-list 10 permit 200 300 (200 300 is the community number) We can use the above in order to filter or set certain parameters like weight and metric based on the community value in certain updates.3.Note that we have used the route-map setcommunity in order to set the community to no-export.0.255.0 255.1 send-community neighbor 3.

3.3. will be dropped by default.3 remote-as 200 neighbor 3. Any route that has only 200 as community will match list 2 and will have weight 20. Remember that anything that does not match. any route that has 100 in its community attribute will match list 1 and will have the weight 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 the above example. The key- word exact states that community should consist of 200 only and nothing else.3.3. The last community list is here to make sure that other updates are not dropped. 1/26/96-Rev: A1. The keyword internet means all routes because all routes are members of the internet community.RTC# router bgp 300 neighbor 3.2 Page 52 Sam Halabi-cisco Systems .

2.10.10.2 AS 100 3.10.10.0 BGP Neighbors and Route maps 190.3.3.3.0 AS600 AS400 RTA 160.0 RTB 2. Also.3 remote-as 200 neighbor 3.20.1 3.0 150.3.0. we want to set the weight on the accepted routes to 20. Example 1: RTC# router bgp 300 network 170.0.2.3 AS 200 2.3.3 route-map stamp in 1/26/96-Rev: A1.2.2 Page 53 Sam Halabi-cisco Systems .1 RTC 170.0.0.3. Route maps associated with the neighbor statement have no affect on incoming updates when matching based on the IP address: neighbor ip-address route-map route-map-name Assume in the above diagram we want RTC to learn from AS200 about networks that are local to AS200 and nothing else.3.0 neighbor 3.10. We can achieve this with a combination of neighbor and as-path access lists.10.3.0 AS 300 The neighbor command can be used in conjunction with route maps to perform either filtering or parameter setting on incoming and outgoing updates.2.

3. and will set a weight of 10 for updates that are behind AS400 and will drop updates coming from AS400.Other updates to have a weight of 10.Updates originating from AS200 to be accepted with weight 20. Example 2: Assume that we want the following: 1.2 Page 54 Sam Halabi-cisco Systems . 2. 1/26/96-Rev: A1. RTC# router bgp 300 network 170.3.0.route-map stamp match as-path 1 set weight 20 ip as-path access-list 1 permit ^200$ Any updates that originate from AS200 have a path information that starts with 200 and ends with 200 and will be permitted.3 remote-as 200 neighbor 3.10.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 .0 neighbor 3.Updates originating from AS400 to be dropped. Any other updates will be dropped.* The above statement will set a weight of 20 for updates that are local to AS200. 3.3.3.

20. Suppose in the above diagram that RTC is advertising its own network 170.10.0. AS600 will receive updates about 170.300).10. If we want to influence this decision from the AS300 end we can make the path through AS100 look like it is longer than the path going through AS400.2 Page 55 Sam Halabi-cisco Systems . A common practice is to repeat our own AS number using the following: RTC# router bgp 300 network 170. 300) which is longer than (400. AS600 will pick the shortest path and will choose the route via AS100. 1/26/96-Rev: A1.0 via AS100 with a path information of: (100.0. When the information is propagated to AS600..2 remote-as 100 neighbor 2. The command that is used with a route map is: set as-path prepend <as-path#> <as-path#> .2. AS300 will be getting all its traffic via AS100.. Assuming that all other attributes are the same.2 route-map SETPATH out route-map SETPATH set as-path prepend 300 300 Because of the above configuration.10. 300.0 neighbor 2.0. 300.2. 200.10.1 Use of set as-path prepend In some situations we are forced to manipulate the path information in order to manipulate the BGP decision process.2. 300) and the second one is via AS400 with path (400. 300) received from AS100. 200.2. the routers in AS600 will have network reachability information about 150.0 via two different routes. We can do this by prepending autonomous system numbers to the existing path info adver- tised to AS100. the first route is via AS100 with path (100.0.0 to two different ASs: AS100 and AS200.

5.3. To define a peer group use the following: neighbor peer-group-name peer-group In the following example we will see how peer groups are applied to internal and external BGP neighbors. Members can also be configured to override these options if these options do not affect outbound updates.2.10.2.1. is a group of BGP neighbors with the same update policies.6.1.1 RTF RTC 5.1 5.2 AS600 AS200 1.0 RTG AS300 A BGP peer group.2 Page 56 Sam Halabi-cisco Systems .6.2 170. we define a peer group name and we assign these policies to the peer group.2.10.2 2.1.5.0 RTH RTA RTB 4.2 BGP Peer Groups 150.6.1 6.2 6.4.1 3. distribute-lists and filter-lists.4.5.1. Instead of defining the same policies for each separate neighbor. etc.2 1.0.6. you can only override options set on the inbound. Members of the peer group inherit all of the configuration options of the peer group.5.20.0.3.2 AS100 RTE 2. 1/26/96-Rev: A1. Update policies are usually set by route maps.2.

2 remote-as 100 neighbor 2.2 by assigning filter-list 3.2 peer-group internalmap neighbor 3.6.Example 1: 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.3.1.2 Page 57 Sam Halabi-cisco Systems . Note that we could only override options that affect inbound updates.5.2 peer-group externalmap neighbor 4. we have defined a peer group named internalmap and we have defined some policies for that group.2 filter-list 3 in In the above configuration. such as a route map SETMETRIC to set the metric to 5 and two different filter lists 1 and 2.2 peer-group internalmap neighbor 6.2 peer-group externalmap neighbor 1.4.1.1. In the same diagram we will configure RTC with a peer-group externalmap and we will apply it to external neighbors. We have applied the peer group to all internal neighbors RTE.2. We have defined a separate filter-list 3 for neighbor RTE. let us look at how we can use peer groups with external neighbors.4.2 filter-list 3 in Note that in the above configs we have defined the remote-as statements outside of the peer group because we have to define different external ASs.2.1.4.2.2 remote-as 600 neighbor 4.2 peer-group internalmap neighbor 3. Now.2.2 peer-group externalmap neighbor 1.1.4. and this will override filter-list 2 inside the peer group.1.2 remote-as 200 neighbor 1. 1/26/96-Rev: A1.6.5.3.3.1.1. Also we did an override for the inbound updates of neighbor 1. Example 2: 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. RTF and RTG.3.

10.3. RTB# router bgp 200 neighbor 3.2.0 RTA RTB 2.0.2.3.0.255.2 remote-as 100 network 170.2.0.213.3 remote-as 200 neighbor 2.0 RTC# router bgp 300 neighbor 3.1 3. Aggregates are used to minimize the size of routing tables.0 to RTA.0. This is similar to 192.0.213.3.0.0.0. 1/26/96-Rev: A1.0. There is no notion of classes anymore (class A.0. B or C). RTB is generating network 160.3.0 160.0.3. In the example below.3.0.10. For example.2.0.1 remote-as 300 network 160.2.213. CIDR or supernetting is a new way of looking at IP addresses. We will configure RTC to propagate a supernet of that route 160. network 192. Aggregation is the process of combining the characteristics of several different routes in such a way that a single route can be advertised.21.3.0 aggregate-address 160.0 to RTA.0/16 where the 16 is the number of bits in the subnet mask counting from the far left of the IP address.10.0.0.1 RTC 170.0 AS 300 One of the main enhancements of BGP4 over BGP3 is CIDR (Classless Interdomain Routing).0.0 255.10.0 RTC will propagate the aggregate address 160.0.0.10.2 3.0 CIDR and Aggregate Addresses 150.0 which used to be an illegal class C network is now a legal supernet represented by 192.3 AS 200 AS 100 2.2.0.3.0.10.0 255.2 Page 58 Sam Halabi-cisco Systems .

0.0 only and NOT the more specific route then we would have to use the following: aggregate-address address mask summary-only This will a advertise the prefix only.0 but will not prevent 160.0. The command aggregate-address 160. The more specific route could have been injected into the BGP table via incoming updates from other ASs.0.0. from redistributing an IGP or static into BGP or via the network command (network 160.21.0.0 have been propagated to RTA.0 and 160.10. It is important to understand how each one works in order to have the desired aggregation behavior.0. Please note that you can not aggregate an address if you do not have a more specific route of that address in the BGP routing table. all the more specific routes are suppressed.10. For example. In case we would like RTC to propagate network 160.0).0 and will suppress the more specific route 160.0.0.0.10.10.0.0.0. The upcoming CIDR example discusses this situation.2 Page 59 Sam Halabi-cisco Systems .0.0 on RTB) then the network entry is always injected into BGP updates even though we are using the “aggregate summary-only” command.0.0 from being also propagated to RTA.0.0.0 will propagate an addi- tional network 160. The command aggregate 160.0.0 if it does not have a more specific entry of 160. RTB can not generate an aggregate for 160.0. 1/26/96-Rev: A1.0 summary-only will propagate network 160.10.0 in its BGP table. and all of the more specific routes.1 Aggregate Commands There is a wide range of aggregate commands.0.0.0 255.0. The first command is the one used in the previous example: aggregate-address address mask This will advertise the prefix route. This is what we mean by advertising the prefix and the more specific route. The outcome of this is that both networks 160.0.0. Please note that if we are aggregating a network that is injected into our BGP via the network statement (ex: network 160.0.

etc. ex: aggregate 129.0 suppress-map CHECK Another variation is the: aggregate-address address mask attribute-map map-name This allows us to set the attributes (metric.0.2 remote-as 100 network 170.0.3 remote-as 200 neighbor 2.0 255.0.0.0.20. In case we would like to suppress more specific routes when doing the aggregation we can define a route map and apply it to the aggregates.0.3. RTC# router bgp 300 neighbor 3.0. This will allow us to be selective about which more specific routes to suppress.0 and suppress the more specific route 160.0 and allow 160.255.0.0. aggregate-address address-mask suppress-map map-name This advertises the prefix and the more specific routes but it suppresses advertisement according to a route-map.0.0 0.0.0 to be propagated.10.255.10.20. route-map SETMETRIC set origin igp aggregate-address 160. The following route map when applied to the aggregate attribute-map command will set the origin of the aggregates to IGP.0 aggregate-address 160.aggregate-address address mask as-set This advertises the prefix and the more specific routes but it includes as-set information in the path information of the routing updates.0 255.0.0 as-set.255. we can use the following route map: route-map CHECK permit 10 match ip address 1 access-list 1 deny 160.0.0.255 access-list 1 permit 0.0.0.) when aggregates are sent out.3.0 attribute-map SETORIGIN 1/26/96-Rev: A1.0.2.255 Then we apply the route-map to the aggregate statement.0.0 255.2. This will be discussed in an example by itself in the following sections. if we would like to aggregate 160.2 Page 60 Sam Halabi-cisco Systems . In the previous diagram.0.0.0.0 255.

10. You cannot have RTB generate a prefix for 160.3.1 remote-as 300 redistribute static (This will generate an update for 160.0 RTA RTB 2. Solution 1: The first solution is to use a static route and redistribute it into BGP.0 AS 300 Request: Allow RTB to advertise the prefix 160.10.2 CIDR example 1 150.0.3 AS 100 AS 200 2.0.0 without generating an entry for 160.0.2 Page 61 Sam Halabi-cisco Systems .1 3.0.0.0 and suppress all the more specific routes.3.2.10.3.21.0.0 even if you use the “aggregate summary-only” command because RTB is the originator of 160.0. The problem here is that network 160. AS200 is the originator of 160.2.0. RTB# router bgp 200 neighbor 3.0 with the origin path as *incomplete*) ip route 160.3.10.0.3.0.10.0.0.0 is local to AS200 i.2.3.e.10. The outcome is that RTB will advertise the aggregate with an origin of incomplete (?).0 255.0.0.1 RTC 170.0.0.0 null0 1/26/96-Rev: A1.2.2 3.0.0.0 160.10.0.

0.0.3.0 null0 1/26/96-Rev: A1.0. RTB# router bgp 200 network 160.0.2 Page 62 Sam Halabi-cisco Systems .1 remote-as 300 redistribute static ip route 160.3.0.0.0 mask 255.0. this will have the same effect except that the origin of the update will be set to IGP.0.Solution 2: In addition to the static route we add an entry for the network command.0 255.0 (this will mark the update with origin IGP) neighbor 3.

0.1 remote-as 300 1/26/96-Rev: A1.0.3 CIDR example 2 (as-set) AS-SETS are used in aggregation to reduce the size of the path information by listing the AS number only once. 160.1 remote-as 300 RTA# router bgp 100 network 160. RTD would not know what the origin of that route is.3.2.10. Suppose RTC wants to aggregate network 160.0 neighbor 2.10.1 4.0.0.0 neighbor 3.0.4.21.3.3.2. regardless of how many times it may have appeared in multiple paths that were aggregated.0.2.3. By adding the aggregate as-set statement we force RTC to generate path information in the form of a set {}.10.3 AS200 AS 100 2.2.10. The as-set aggregate command is used in situations were aggregation of information causes loss of information regarding the path attribute.0/8 and send it to RTD. All the path information is included in that set irrespective of which path came first.3.2 3.0 160.4.2.0 from RTA and updates about 160.0 RTB# router bgp 200 network 160.0 RTB RTA 2.1 RTD RTC 4.2. In the following example RTC is getting updates about 160.0.4.1 3.20.0.20.4 AS300 AS400 170.0.20.0 from RTB.3.4.2 Page 63 Sam Halabi-cisco Systems .

0.0.0 255.0.0 summary-only (this causes RTC to send RTD updates about 160.2 remote-as 100 neighbor 4.0 summary-only aggregate 160.0.0/8 with an indication that 160.2.2.4 remote-as 400 aggregate 160.0. this may create loops if RT4 has an entry back into AS100 Case 2: RTC# router bgp 300 neighbor 3.0.0.0.0.0.0.4.2.0.0.3.0 as-set (causes RTC to send RTD updates about 160. RTC will send an update 160.0.0.2.Case 1: RTC does not have an as-set statement.4.3 remote-as 200 neighbor 2.0 belongs to a set {100 200}) 1/26/96-Rev: A1.3.4.4 remote-as 400 aggregate 160.0.0 255.0 is actually coming from two different autonomous systems.0.0/8 with no indication that 160.2 remote-as 100 neighbor 4.2 Page 64 Sam Halabi-cisco Systems .0.3 remote-as 200 neighbor 2.3.0 255.0.0/8to RTD with path information (300) as if the route has originated from AS300.3.0.0. RTC# router bgp 300 neighbor 3.4.0.

Even though these ASs will have EBGP peers to ASs within the confedera- tion. To the outside world. the confederation (the group of ASs) will look as a single AS.2 Page 65 Sam Halabi-cisco Systems . they exchange routing as if they were using IBGP. next hop. metric and local preference information are preserved. 22. The trick is to divide an AS into multiple ASs and assign the whole group to a single confederation. The group of ASs will look to the outside world as one AS with the AS number being the confederation identifier. Each AS by itself will have IBGP fully meshed and has connections to other ASs inside the confederation. To configure a BGP confederation use the following: bgp confederation identifier autonomous-system The confederation identifier will be the AS number of the confederation group.The next two subjects. Peering within the confederation between multiple ASs is done via the following command: bgp confederation peers autonomous-system [autonomous-system.] The following is an example of confederation: 1/26/96-Rev: A1.0 BGP Confederation BGP confederation is implemented in order to reduce the IBGP mesh inside an AS. “confederation” and “route reflectors” are designed for ISPs who would like to further control the explosion of IBGP peering inside their autonomous systems.

The outside world will see only one AS500.4 RTC RTD AS60 128. I will show a sample configuration of routers RTC. AS60 and AS70. AS60 and AS70 we define a full mesh of IBGP peers and we define the list of confederation peers using the bgp confederation peers command.10.30.5.212.5.11.14.2 Page 66 Sam Halabi-cisco Systems .30.213.210.5 AS600 AS 100 5.1 128. We give the AS a confederation identifier of 500. 1/26/96-Rev: A1. but we are only interested in the BGP speakers that have EBGP connections to other ASs). RTD and RTA. 60 or 70. For each AS50. If you want to make a full IBGP mesh inside AS500 then you would need nine peer connections for each router.Example: RTA 6.1 129.5.2 135.6.210.20.5. 8 IBGP peers and one EBGP peer to external ASs.213.6.1 AS 500 Let us assume that you have an autonomous system 500 consisting of nine BGP speakers (other non BGP speakers exist also. RTA has only knowledge of AS500.6 5.1 AS70 AS50 129.213.1 128. By using confederation we can divide AS500 into multiple ASs: AS50. Note that RTA has no knowledge of ASs 50.

213.6.2 remote-as 60 (IBGP connection within AS60) neighbor 128.30.RTC# router bgp 50 bgp confederation identifier 500 bgp confederation peers 60 70 neighbor 128.11.5.1 remote-as 60 (BGP connection with confederation peer 60) neighbor 135.210.1 remote-as 70 (BGP connection with confederation peer 70) neighbor 6.20.14.5.6 remote-as 600 (EBGP connection to external AS600) RTA# router bgp 100 neighbor 5.5 remote-as 100 (EBGP connection to external AS100) RTD# router bgp 60 bgp confederation identifier 500 bgp confederation peers 50 70 neighbor 129.212.30.1 remote-as 50 (IBGP connection within AS50) neighbor 128.1 remote-as 50(BGP connection with confederation peer 50) neighbor 135.4 remote-as 500 (EBGP connection to confederation 500) 1/26/96-Rev: A1.5.5.14.213.213.1 remote-as 70 (BGP connection with confederation peer 70) neighbor 5.210.1 remote-as 50 (IBGP connection within AS50) neighbor 129.6.10.212.2 Page 67 Sam Halabi-cisco Systems .

RTA.0 (Internal BGP). By relaxing this restriction a bit and by providing additional control. In our example. Other IBGP peers of the RR that are not clients are called non-clients. As demonstrated in section 9. Configuring a route reflector is done using the following BGP router sub- command: neighbor <ip-address> route-reflector-client The router with the above command would be the RR and the neighbors pointed at would be the clients of that RR. a full IBGP mesh should be maintained between RTA. 1/26/96-Rev: A1. Example: RTA (RR) RTC AS 100 RTB In normal cases. RTC would be configured with the “neighbor route-reflector-client” command point- ing at RTA and RTB’s IP addresses. This will reduce the number of IBGP peers within an AS.23. a BGP speaker will not advertise a route learned via another IBGP speaker to a third IBGP speaker. The combination of the RR and its cli- ents is called a cluster. RTC could be elected as a RR and have a partial IBGP peering with RTA and RTB.0 Route Reflectors Another solution for the explosion of IBGP peering within an autonomous system is Route Reflectors (RR). By utilizing the route reflector concept. we can allow a router to advertise (reflect) IBGP learned routes to other IBGP speakers. RTB and RTC above would form a cluster with a single RR within AS100.2 Page 68 Sam Halabi-cisco Systems . RTB and RTC within AS100. Peering between RTA and RTB is not needed because RTC will be a route reflector for the updates coming from RTA and RTB.

RTC and RTG are fully meshed but routers within a cluster are not. The same RTD is the RR for its clients RTE and RTF.Example: AS200 8.7.1. Note that RTD.8. each RR will be configured with other RRs as non-client peers in a fully meshed topol- ogy. Consider the above diagram.5. the AS could be divided into multiple clusters.2.6 5.12 AS300 An autonomous system can have more than one route reflector.4. According to RTC.6.3.5. In a simple con- figuration. RTA and RTB are clients and anything else is a non-client. RTG is a RR in a third cluster.5 2.2 Page 69 Sam Halabi-cisco Systems .3.12.8. Other RRs could belong to the same cluster (client group) or to other clusters.7.3 RTD (RR) RTC (RR) 6. a RR would treat other RRs just like any other IBGP speaker. it will do the following depending on the peer type: 1/26/96-Rev: A1.12. When a route is received by a RR.4 3.6. RTA.2 1.1 RTE RTA RTB RTF 12. RTB and RTC form a single cluster with RTC being the RR.7 4. Remember that clients of an RR are pointed at using the “neighbor <ip-address> route-reflector-client” command.8 AS 100 RTG (RR) 7. Clients should not peer with IBGP speakers outside their cluster.1.4.2.

1.2.5.5. 3. The Route-Reflector scheme has a few methods to avoid this: 1.3.Originator-id: this is an optional.4 remote-as 100 neighbor 8.Route from an EBGP peer: send the update to all client and non-client peers. RTD and RTB: RTC# router bgp 100 neighbor 2. non transitive BGP attribute that is four bytes long and is created by a RR.5 remote-as 100 neighbor 5.1.1 remote-as 100 neighbor 1.4.6 route-reflector-client neighbor 5.1 route-reflector-client neighbor 7.1.7 remote-as 100 neighbor 3.5.7.2. due to poor configuration.3.3.2 route-reflector-client neighbor 1.3 remote-as 100 neighbor 12. if the routing information comes back to the originator. The following is the relative BGP configuration of routers RTC.Route from a client peer: reflect to all the non-client peers and also to the client peers.5 route-reflector-client neighbor 7.Cluster-list: this will be discussed in the next section. it is possible to have the routing information loop.2 remote-as 100 neighbor 2.Route from a non-client peer: reflect to all the clients within the cluster.6.7.7 remote-as 100 neighbor 4.7.8 remote-as 200 RTB# router bgp 100 neighbor 3.6.8.2. 2.6. 1/26/96-Rev: A1.12.6. it will be ignored.6 remote-as 100 neighbor 6.1. This attribute will carry the router-id (RID) of the originator of the route in the local AS.5.8.3.1.12 remote-as 300 RTD# router bgp 100 neighbor 6.12. 2.2 Page 70 Sam Halabi-cisco Systems .3 remote-as 100 As the IBGP learned routes are reflected.2. Thus.7.4.

2. a cluster might have more than one RR.6 (RR) 2.1.2.2 10.13. the advertisement will be ignored.10.4.13 Usually.7.9 AS200 AS300 11. RTF and RTH belong to one cluster with both RTD and RTH being RRs for the same cluster.5 RTB RTF AS500 13. RTH will take its place.4 RTH 3.3. RTF and RTC: 1/26/96-Rev: A1.3. In order to increase redundancy and avoid single points of failure.7 4. When a RR reflects a route from its clients to non-clients outside of the cluster.13. In the above diagram.4.6. A cluster-list is a sequence of cluster-ids that the route has passed.10. If the local cluster-id is found in the cluster-list. the cluster will be identified by the router-id of the RR.23. In this case. RTD. All RRs in the same cluster need to be configured with a 4 byte cluster-id so that a RR can recognize updates from RRs in the same cluster. If this update has an empty cluster-list the RR will create one. In case RTD goes down.11 8.1. Note the redundancy in that RTH has a fully meshed peering with all the RRs.8.2 Page 71 Sam Halabi-cisco Systems .7.5. The following are the configuration of RTH.11.9.11.8 AS 100 RTG (RR) 7.10 1. a cluster of clients will have a single RR.5. RTD.3 RTD (RR) RTC (RR) 6. a RR can identify if the routing information is looped back to the same cluster due to poor configuration. RTE.1 RTE RTA 5. it will append the local cluster-id to the cluster-list.8.1 Multiple RRs within a cluster AS400 9.9.6. Using this attribute.

6 route-reflector-client neighbor 7.9 remote-as 300 bgp route-reflector 10 (This is the cluster-id) RTD# router bgp 100 neighbor 10.7.3 remote-as 100 neighbor 9.2.7 remote-as 100 neighbor 10.10.2.10 remote-as 100 neighbor 4.7.7.10.5.10 remote-as 100 neighbor 8.5.5.7 remote-as 100 neighbor 3.10.13 remote-as 500 RTC# router bgp 100 neighbor 1.RTH# router bgp 100 neighbor 4.5.6.1.6.5. 1/26/96-Rev: A1.11.10.4 remote-as 100 neighbor 5.6.6.7.11 remote-as 400 bgp route-reflector 10 (This is the cluster-id) RTF# router bgp 100 neighbor 10.4.5 remote-as 100 neighbor 5.6.3.5 route-reflector-client neighbor 6.13.10.2.9.4.7.4.5.3 remote-as 100 neighbor 11.8.2 remote-as 100 neighbor 2.1.4 remote-as 100 neighbor 13.5.6 remote-as 100 neighbor 6.11.6 remote-as 100 neighbor 6.1.3.1 route-reflector-client neighbor 2.10 remote-as 100 neighbor 5.4.8.6 route-reflector-client neighbor 7.5 remote-as 100 neighbor 5.8 remote-as 200 Note that we did not need the cluster command for RTC because only one RR exists in that cluster.9.7 remote-as 100 neighbor 3.6.6.3.2 Page 72 Sam Halabi-cisco Systems .13.3.1 remote-as 100 neighbor 1.7.4 remote-as 100 neighbor 7.4.6.2.5.4.2 route-reflector-client neighbor 4.1.5 route-reflector-client neighbor 6.10.

6 5. then a potential withdrawal to the source of a route on the RR would be sent to all clients inside the cluster and could cause problems. then using peer groups would be alright. If peer groups were to be configured. The route reflector scheme will allow such conventional BGP speakers to coexist. Example: AS300 AS200 13. peer-goups should not be used.3.8.13. 23.8 AS 100 4.2. The router sub-command bgp client-to-client reflection is enabled by default on the RR.4.2.4.6.14 1/26/96-Rev: A1.2 RR and conventional BGP speakers It is normal in an AS to have BGP speakers that do not understand the concept of route reflectors.2 Page 73 Sam Halabi-cisco Systems . This would allow easy and gradual migration from the current IBGP model to the route reflector model. is that peer-groups were not used in the above configuration.An important thing to note. One could start creating clusters by configuring a single router as RR and making other RRs and their clients normal IBGP peers.5 2.13 8.1.4 3. Then more clusters could be cre- ated gradually.14.3.6. These routers could be either members of a client group or a non-client group.5.2 1.3 RTD RTC (RR) 6.1 RTE RTA RTB RTF AS400 14.8.1.14. We will call these routers conventional BGP speakers.5.If BGP client-to-client reflection were turned off on the RR and redundant BGP peering was made between the clients.13. If the clients inside a cluster do not have direct IBGP peers among one another and they exchange updates through the RR.

Normal IBGP mesh could be done between these rout- ers and RTD.5. Another means of controlling loops is to put more restrictions on the set clause of out-bound route-maps.1.3. we would remove the IBGP full mesh and have RTA and RTB become clients of RTC. when we are ready to upgrade.1.4.2 Page 74 Sam Halabi-cisco Systems .6 remote-as 100 neighbor 6.6.3.5. More restrictions are also put on the nexthop-self which is a per neigh- bor configuration option.1 remote-as 100 neighbor 14.2.6. When used on RRs the nexthop-self will only affect the nexthop of EBGP learned routes because the nexthop of reflected routes should not be changed.5.14.13. it is only the RRs that would have to be upgraded.5.In the above diagram.6. RTE and RTF have the concept of route reflec- tion.2 remote-as 100 neighbor 1. Later on.4 remote-as 100 neighbor 2.6 route-reflector-client neighbor 5. 1/26/96-Rev: A1. Clients do not have to understand the route reflection scheme.14. The set clause for out-bound route-maps does not affect routes reflected to IBGP peers.2.1.5 route-reflector-client neighbor 3.1 remote-as 100 neighbor 13.3 Avoiding looping of routing information We have mentioned so far two attributes that are used to prevent poten- tial information looping: the originator-id and the cluster-list. RTD.2. RTC could be made a RR with clients RTA and RTB. The following is the configuration of RTD and RTC: RTD# router bgp 100 neighbor 6.6.13 remote-as 300 RTC# router bgp 100 neighbor 4. 23. RTA and RTB are what we call conventional routers and cannot be configured as RRs. RTC.3 remote-as 100 neighbor 2.5 remote-as 100 neighbor 5.1.4.13.14 remote-as 400 When we are ready to upgrade RTC and make it a RR.2 remote-as 100 neighbor 1.2.

criteria are defined to identify poorly behaved routes. <max-suppress-time> maximum duration a route can be suppressed. The dampening information is kept until the pen- alty becomes less than half of “reuse-limit”.will turn off dampening. The penalty will be decayed at a granularity of 5 seconds and the routes will be un-sup- pressed at a granularity of 10 seconds. A route which is flapping gets a pen- alty for each flap (1000). bgp dampening <half-life-time> . default is 2000. at that point the information is purged from the router. Routes. 1/26/96-Rev: A1. learned via IBGP will not be dampened. Once the penalty decreases below a predefined “reuse-limit”. the route advertisement will be un-suppressed. external to an AS. current default is 15 min. The penalty will be exponentially decayed based on a preconfigured “half-time”. The following are the commands used to control route damp- ening: bgp dampening .2 Page 75 Sam Halabi-cisco Systems . <suppress-value> range is 1-20000. range is 1-255. default is 750.0 Route Flap Dampening Route dampening (introduced in Cisco IOS version 11.0) is a mechanism to minimize the instability caused by route flapping and oscillation over the network. This is to avoid the IBGP peers having higher penalty for routes external to the AS. This might change if there is a need to have this feature enabled by default.will turn on dampening.change the half-life time.24. A command that sets all parameters at the same time is: bgp dampening <half-life-time> <reuse> <suppress> <maximum-suppress-time> <half-life-time> range is 1-45 min. the advertisement of the route will be suppressed. no bgp dampening . <reuse-value> range is 1-20000. As soon as the cumulative penalty reaches a predefined “sup- press-limit”. default is 4 times half-life-time. Initially. dampening will be off by default. To accomplish this.

208.174 255.0 neighbor 192.5 255.10.255.10.255.208.6 RTD AS100 AS300 L0 192.10.255.6 255.252 router bgp 300 network 192.5 remote-as 300 RTD# hostname RTD interface Loopback0 ip address 192.5 S1 192.2 Page 76 Sam Halabi-cisco Systems .10. RTB’s BGP table would look like this: 1/26/96-Rev: A1.255.252 router bgp 100 bgp dampening network 203.2 255.255.250.208.10.252 interface Serial1 ip address 192.208.10.208.15.255.192 interface Serial0/0 ip address 192.15.208.10.208.0 neighbor 192.Example: S0 203.6 remote-as 100 RTB is configured for route dampening with default parameters.255.208.15.208. Assuming the EBGP link to RTD is stable.2 RTB S0/0 192.255.250.250.10.10.174 RTB# hostname RTB interface Serial0 ip address 203.

5 0 0 300 i *> 203. Which means that we do not have a best path to the route but information about the route flapping still exists.208.0.0 0. If the route flaps few more times we will see the following: 1/26/96-Rev: A1. no best path) 300 (history entry) 192.5 from 192.250. * valid.15.250.15.174) Origin IGP. > best.10.0 0 32768 i In order to simulate a route flap.internal Origin codes: i .250.255. ? .0.IGP. e .2 Status codes: s suppressed.0 has been put in a “history” state. flapped 1 times in 0:02:03 The route has been given a penalty for flapping but the penalty is still below the “suppress limit” (default is 2000).incomplete Network Next Hop Metric LocPrf Weight Path *> 192.10. i .10.10.10.10. * valid. d damped.0.0 255.0 192. i .EGP.0. metric 0. h history.208. I will do a “clear ip bgp 192.0 BGP routing table entry for 192. e .0 0 32768 i The BGP entry for 192.15. h history.EGP.5 0 0 300 i *> 203. external Dampinfo: penalty 910.208.2 Status codes: s suppressed. RTB#sh ip bgp 192.10.208.0.15.255. The route is not yet sup- pressed.2 Page 77 Sam Halabi-cisco Systems .0 0. local router ID is 203.5 (192. d damped. version 25 Paths: (1 available. ? .incomplete Network Next Hop Metric LocPrf Weight Path h 192.208.208.250.RTB#sh ip bgp BGP table version is 24.208.0 192.internal Origin codes: i .10.208.10.208. RTB’s BGP table will look like this: RTB#sh ip bgp BGP table version is 24. > best.6” on RTD.IGP.208.10.208. local router ID is 203.10.

0.0 0 32768 i RTB#sh ip bgp 192.D flap-statistics (clears flap statistics for all paths from a neighbor) 1/26/96-Rev: A1.0 0. > best.0.15. i .m.m.IGP. The Following are the commands used to show and clear flap statistics information: show ip bgp flap-statistics (displays flap statistics for all the paths) show ip bgp-flap-statistics regexp <regexp> (displays flap statistics for all paths that match the regexp) show ip bgp flap-statistics filter-list <list> (displays flap statistics for all paths that pass the filter) show ip bgp flap-statistics A. external Dampinfo: penalty 2615. flapped 3 times in 0:05:18 .5 0 0 300 i *> 203.208.2 Page 78 Sam Halabi-cisco Systems .208.B. in our case (750/2=375).internal Origin codes: i .255.D m.D m.m.10. h history.B.174) Origin IGP.208.10. d damped.0.B.0 192.250.C.m longer-prefixes (displays flap statistics for more specific entries) show ip bgp neighbor [dampened-routes] | [flap-statistics] (displays flap statistics for all paths from a neighbor) clear ip bgp flap-statistics (clears flap statistics for all routes) clear ip bgp flap-statistics regexp <regexp> (clears flap statistics for all the paths that match the regexp) clear ip bgp flap-statistics filter-list <list> (clears flap statistics for all the paths that pass the filter) clear ip bgp flap-statistics A.10.D m.0 255.208. version 32 Paths: (1 available. local router ID is 203. reuse in 0:27:00 The route has been dampened (suppressed).m (clears flap statistics for a single entry) clear ip bgp A. * valid.255.m (displays flap statistics for a single entry) show ip bgp flap-statistics A.0 BGP routing table entry for 192.The dampening information will be purged when the penalty becomes less than half of the reuse-limit.C. metric 0. in our case 750 (default).10. (suppressed due to dampening) 192.m.208.208.10.10.2 Status codes: s suppressed.m.B.250.5 from 192.15.10.C. ? . e .RTB#sh ip bgp BGP table version is 32. no best path) 300.EGP.5 (192.incomplete Network Next Hop Metric LocPrf Weight Path *d 192.C. valid. The route will be reused when the penalty reaches the “reuse value”.208.m.

Path selection is based on the following: 1-If NextHop is inaccessible do not consider it. 4-If same Local Preference prefer the route that the specified router has originated.isco routers.25. the following list indicates how BGP selects the best path for a particular destination. 3-If same weight prefer largest Local Preference. The ollowing is a design example thatis intended to show the configura- tion and routing tables as they actually appear on the C. 7-If origin codes are the same prefer the path with the lowest MULTI_EXIT_DISC. 6-If all paths are external prefer the lowest origin code (IGP<EGP<INCOMPLETE).2 Page 79 Sam Halabi-cisco Systems . 8-If path is the same length prefer External path over Internal. 1/26/96-Rev: A1. 10-Prefer the route with the lowest ip address value for BGP router ID. 5-If no route was originated prefer the shorter AS path. Remember that we only select one path as the best path. 2-Prefer the largest Weight.0 How BGP selects a Path Now that we are familiar with the BGP attributes and terminology. 9-If IGP synchronization is disabled and only internal path remain prefer the path through the closest IGP neighbor. We put that path in our routing table and we propagate it to our BGP neighbors.

1 IBGP RTB S0 128.6 RTE L0 200.10.208.10.208.X.250.250.211.10.63.15.10.2 S1 128.X.250.174 S1 195.63.41 RTA E0 203.211.213.200.213.10.208.1 S1 192.0 Practical design example: RTF 203.26.14.213.63.208.13.1 1/26/96-Rev: A1.10.1 S0 203.14.2 L0 192.63.10.2 Page 80 Sam Halabi-cisco Systems .X.X.213.1 200.X AS400 S0 195.211.5 128.X AS200 RTD S2/1 128.250.63.213.208.15.211.1 AS500 RTG L0 195.X S0 192.208.200.2 S0/1 192.2 S1 203.2 L0 203.5 195.X.10.250.X AS300 S0/0 192.10.6 AS100 192.250.130 S2/0 128.213.174 RTC L0 128.X E0 203.

250.15.0.255.0 0.13. RTA# hostname RTA ip subnet-zero interface Loopback0 ip address 203.250.0.0.255.255 area 0 router bgp 100 network 203.15.1 255.250.255 area 0 1/26/96-Rev: A1.250.63.0 interface Serial0 ip address 128.255.255.2 Page 81 Sam Halabi-cisco Systems .41 255.255.14. Whenver you have an AS that is connected to two ISPs via EBGP.2 255.250.255. it is always good to run IBGP within your AS in order to have a better control of your routes.213.15.1 255.0 neighbor 128.2 update-source Loopback0 RTF# hostname RTF ip subnet-zero interface Ethernet0 ip address 203.2 remote-as 200 neighbor 203.250.0.0 interface Serial1 ip address 203.14.We will build the above configuration step by step and see what can go wrong along the way.63.1 255.255. the following are the first run of configuration for all the routers.255. Assuming that AS200 and AS300 are the two ISPs we are connected to.255. In this example we will run IBGP inside AS100 between RTA and RTB and we will run OSPF as an IGP.0 interface Ethernet0 ip address 203.2 remote-as 100 neighbor 203.252 router ospf 10 network 203. This is NOT the final configuration.255.0.255.0 mask 255.255.213.252 router ospf 10 network 203.250.250.0 0.0.250.255.

63.255.0 neighbor 192.213.255.63.1 remote-as 100 neighbor 128.252 router ospf 10 network 203.6 255.15.208.2 255.250.255.250.2 255.255.255.213.255.192 interface Serial2/0 ip address 128.252 ! interface Serial2/1 ip address 128.0 0.63.130 255.10.13.2 Page 82 Sam Halabi-cisco Systems .255 area 0 router bgp 100 network 203.5 255.0.252 interface Serial1 ip address 192.255.RTB# hostname RTB ip subnet-zero interface Serial0 ip address 203.0 neighbor 128.250.208.15.63.255.255.6 remote-as 400 1/26/96-Rev: A1.213.0.213.213.255.41 remote-as 100 RTC# hostname RTC ip subnet-zero interface Loopback0 ip address 128.250.255.5 remote-as 300 neighbor 203.213.252 router bgp 200 network 128.0.10.63.

10.255.5 255.255.1 255.208.10.255.213.255.252 clockrate 1000000 router bgp 400 network 200.6 255.208.255.255.255.2 255.211.208.2 255.192 interface Serial0/0 ip address 192.200.1 remote-as 500 1/26/96-Rev: A1.208.10.174 255.RTD# hostname RTD ip subnet-zero interface Loopback0 ip address 192.63.10.255.1 remote-as 500 neighbor 192.255.255.10.211.6 remote-as 100 RTE# hostname RTE ip subnet-zero interface Loopback0 ip address 200.255.213.0 neighbor 128.63.200.10.208.255.5 remote-as 200 neighbor 195.252 router bgp 300 network 192.10.252 ! interface Serial0/1 ip address 192.10.208.10.252 interface Serial1 ip address 128.2 Page 83 Sam Halabi-cisco Systems .10.0 neighbor 192.0 interface Serial0 ip address 195.

0 128. Note that any locally generated entry such as 203.10.211.211.255.200.0 128.10.RTG# hostname RTG ip subnet-zero interface Loopback0 ip address 195. > best.213.10.255.15.0 128. The “i” at the end indicates the ORIGIN of the path information to be IGP.250.213.0 has a nexthop 0.IGP.10. h history.0 203.252 router bgp 500 network 195.internal Origin codes: i .0. 1/26/96-Rev: A1.41 0 100 0 i *>203.0 0.250.192 interface Serial0 ip address 192.208.0.2 Page 84 Sam Halabi-cisco Systems .10.0 is learned via path 200 with nexthop of 128.EGP.14.255.0.15.0.0 128. ? .250. The following is RTB's BGP table.10.13.213.250.10.255.0.2 Status codes: s suppressed.255.213. rather than redistribut- ing IGP into BGP.0 0 32768 i Let me go over the basic notations of the above table.13.213.0. e .63.1 255.213.13.2. d damped.63.10. * valid.208.10.213. throughtout this example I will only use the network command to inject networks into BGP. i . local router ID is 203.208.41 0 100 0 i *>i203.250.255.211.252 interface Serial1 ip address 195.63.174 255.211.15.2 100 0 200 400 500 300 i *i195. as if the link between RTB and RTD does not exist. The “i” at the beginning means that the entry was learned via an internal BGP peer.63.0.1 255.2 100 0 200 400 500 i *i200.63.250.0 neighbor 192.incomplete Network Next Hop Metric LocPrf Weight Path *i128. For example network 128.2 100 0 200 400 i *>i203. Let us assume to start with that s1 on RTB is shutdown.0 203. RTB#sh ip bgp BGP table version is 4. This is why. The path info is intuitive.2 remote-as 300 neighbor 195.250.211.2 remote-as 400 It is always better to use the network command or redistribute static entries into BGP to advertise networks.2 0 100 0 200 i *i192.

O .252 is subnetted. E2 .0 255.15.250.213.41 [110/75] via 203.63. RTB knows about 128.BGP D .0 is directly connected.0.15.255.250.15.IS-IS level-2. R .14.250.255.255 is subnetted.2 which is the ebgp nexthop carried into IBGP.250. 1 subnets C 203. RTA's configs would be: 1/26/96-Rev: A1. Serial0 Well. L1 . B .250.15. This is true because we do not have a way to reach that nexthop via our IGP (OSPF).250.255. it doesn't look like any of the BGP entries has made it to the routing table. We can run OSPF on RTA s0 and make it passive.EIGRP external.250. I .0 via OSPF.static. EX . will install this path in the ip routing table and will advertise it to other bgp peers.213.1.0 255.EGP i .candidate default Gateway of last resort is not set 203. M . IA .213. S .213.The > symbol indicates that BGP has chosen the best route based on the list of decision steps that I have gone through earlier in this document under "How BGP selects a Path".2.13. Serial0 203. E .EIGRP. * .63.255.OSPF external type 2.OSPF external type 1. L2 .1. 1 subnets O 203.63.connected.mobile.13.0 [110/74] via 203. RTB has not learned about 128.IS-IS level-1. Serial0 O 203.IGRP. 02:50:46. We could also change the nexthop by using the bgp nexthopself command between RTA and RTB. 02:50:45.RIP.63. and this way RTB would know how to reach the nexthop 128.2 is unreachable.OSPF.213.0 via a nexthop of 128.IS-IS. There are two problems here: Problem 1: The Nexthop for these entries 128.OSPF inter area E1 . Bgp will only pick one best Path to reach a destination. Notice the nexthop attribute. Let us look at the IP routing table: RTB#sh ip rou Codes: C .2 Page 85 Sam Halabi-cisco Systems .

250.41 255.63.208.0 128.0.IGP.2 100 0 200 400 i *>i203.0.14.255.250. * valid.incomplete Network Next Hop Metric LocPrf Weight Path *>i128. h history.2 Status codes: s suppressed. i .0 0.15.0 interface Serial0 ip address 128.213.41 0 100 0 i *>i203.2 remote-as 100 neighbor 203.255.213.13.0 128.41 0 100 0 i *> 203.0 128.0.0.63.255.250.13.0.250.0 203. Let us look at the routing table now: 1/26/96-Rev: A1. which means that BGP is ok with next hop.0.15.255 area 0 router bgp 100 network 203.0 128.2 100 0 200 400 500 300 i *>i195.15.63.250.2 Page 86 Sam Halabi-cisco Systems .250.10.63.63.255.0 interface Ethernet0 ip address 203. local router ID is 203.255.200.0 203.15.250.RTA# hostname RTA ip subnet-zero interface Loopback0 ip address 203.255.0 mask 255.250.2 0 100 0 200 i *>i192.213.13.2 update-source Loopback0 The new BGP table on RTB now looks like this: RTB#sh ip bgp BGP table version is 10.63.10. d damped.2 remote-as 200 neighbor 203.213.0 0.211. ? .0 neighbor 128.EGP.250.14.213.2 100 0 200 400 500 i *>i200.0.0 0.250.250.0 0 32768 i Note that all the entries have >.213. e .1 255.0.10.255. > best.13.252 router ospf 10 passive-interface Serial0 network 203.213.255.255 area 0 network 128.250.213.0.255.internal Origin codes: i .1 255.

00:04:46. 00:04:47.10. Serial0 203.208.15.250.255.1.0. L1 .211.static. B . Note that RTF has no notion of networks 192. E .OSPF external type 1.EGP i .0 [110/74] via 203.IGRP.63.EIGRP.IS-IS level-2. L2 .250. BGP is not putting these entries in the routing table and will not send them in BGP updates because it is not synchronized with the IGP.1.213.0 because we have not redistributed BGP into OSPF yet. M .13.15.IS-IS. we will have the entries in the routing table. IA .0 255. In this scenario.BGP D . EX .2 Page 87 Sam Halabi-cisco Systems .255 is subnetted.213. O . If you turn off synchronization on RTB this is what will happen: 1/26/96-Rev: A1.63.0 [110/138] via 203.14. 1 subnets O 128.RTB#sh ip rou Codes: C .250.255.255. E2 .250.41 [110/75] via 203. 1 subnets O 203.15.0 or 195. 1 subnets C 203. I . the only difference is that 128.255.RIP.255.252 is subnetted.252 is subnetted. but connectivity would still be broken.250.0 is directly connected.250.OSPF. Serial0 Problem 2: We still do not see the BGP entries.15.250. This is the synchronization issue.0 is now reachable via OSPF. S .10.213. * - candidate default Gateway of last resort is not set 203.15.250.IS-IS level-1.0 255.OSPF external type 2. Serial0 O 203.13.OSPF inter area E1 .mobile.255. R . if we turn synchronization off. Serial0 128.0 255.EIGRP external.1.connected. 00:04:46.

250.255 [110/75] via 203.208.14.41.EIGRP external.255.250. 1 subnets C 203. 00:01:07 B 195. R .250. O .255.0 255. 00:01:07 203.mobile.213.static.255. L1 . IA .255. O .IS-IS level-1.RIP.0.252 is subnetted. 00:01:08 203.10.0 is directly connected.63.250.15.OSPF.13. E2 .OSPF inter area E1 .static.0.13.13. 2 subnets.15.15.14.0 is directly connected. 00:01:07 B 192.255.0 255.213. IA .IGRP.13.0 [200/0] via 128.255. Let’s redistribute OSPF into BGP on RTA .2.255. L2 .EIGRP. Serial0 128. * - candidate default Gateway of last resort is not set B 200.14.OSPF external type 2. 1/26/96-Rev: A1.EGP i .IS-IS.10. 00:01:08 O 128. Serial0 O 203.213. L1 . I . 2 masks O 203. I .63.2.63.255. Ethernet0 128.255.0 255. 2 masks B 128. M . EX .213.0. E .0 [110/74] via 203. B . S .250.252 [110/138] via 203.2.OSPF external type 1.213. E2 .OSPF inter area E1 .255. 1 subnets C 203.RTB#sh ip rou Codes: C . 00:12:37.0 is variably subnetted.1.0 255.255 is subnetted.EIGRP.connected. L2 .IS-IS level-2.250.0 [200/0] via 128. Ethernet0 So. Serial0 B 203.OSPF external type 2.0.15.10. 1 subnets O 128.1.255.41 255.63. B .255.0 255.250.IS-IS level-1.250.250. with a metric of 2000.OSPF external type 1.0 is directly connected.14.1. turning off synchronization in this situation did not help this particular issue.250.252 is subnetted.mobile.41 [110/11] via 203.211.250. 00:14:15.250.1.0 255.0 [200/0] via 128.250. * - candidate default Gateway of last resort is not set 203.connected.0 [200/0] via 203.BGP D .252 is subnetted.0 [200/0] via 128. 00:12:37.15.EIGRP external.200.2.IS-IS level-2.15.255. but there is no way we can reach those networks because RTF in the middle does not know how to reach them: RTF#sh ip rou Codes: C . but we will need it for other issues later on.IGRP. EX .BGP D . R .250. 1 subnets O 203.250. Ethernet0 203.13.213. Serial1 C 203.255.15.63. S . 00:12:37. 2 subnets.13.0 [110/74] via 203.OSPF. Serial0 The routing table looks fine.213. 00:14:15.IS-IS.213. M .0 is variably subnetted.63.250.EGP i .RIP.1.213.2 Page 88 Sam Halabi-cisco Systems .0 255. E .255.250.

250.213. S . O .OSPF external type 2. E2 .63.IGRP.255.OSPF.OSPF external type 1. Serial0 1/26/96-Rev: A1.255.213.255 area 0 router bgp 100 network 203.BGP D .250.250.10.8 is directly connected. Serial0 O E2 203. 2 subnets. EX .250.0 [110/2000] via 203. 00:00:15. IA . Serial0 203. 2 subnets.250.250.1.15.IS-IS.255.41 255.250.13.15.63.15.1.EGP i .1 255.mobile. Serial0 O E2 192.15.15.connected. E . Loopback1 C 203.1.255. L2 .0 255.255.15.211.2 remote-as 200 neighbor 203.255 [110/75] via 203.0 is variably subnetted.0.IS-IS level-1.0 0.0 [110/74] via 203. * - candidate default Gateway of last resort is not set O E2 200.15. Serial0 O E2 195.250. M .0.252 is subnetted.255.2 remote-as 100 neighbor 203.255.13.252 [110/138] via 203.1. R .15.250.200.250.1.255 area 0 network 128.0 255.IS-IS level-2.250.255. B .255.0 interface Ethernet0 ip address 203. 00:00:16.250. 00:00:15.250.15.255. 00:00:14.1.static. L1 .0 0. 00:00:14.13.255.255.213.255.250. Serial0 O 203. 00:00:14.0 [110/2000] via 203. Serial0 203. 2 masks O 203.0 [110/2000] via 203.0.250.14.0.250.15.0 neighbor 128.RIP.0 [110/2000] via 203. 2 subnets C 203.208.10.0.250.10.1 255.213.0 is directly connected.252 router ospf 10 redistribute bgp 100 metric 2000 subnets passive-interface Serial0 network 203. 2 masks O E2 128.OSPF inter area E1 .0 255.250.0.1.0.255.0.2 update-source Loopback0 The routing table will look like this: RTB#sh ip rou Codes: C .213.250.15.RTA# hostname RTA ip subnet-zero interface Loopback0 ip address 203.255.0.0 255. Serial0 128.EIGRP.13.15.Serial0 O 128.EIGRP external. 00:00:15.0 [110/2000] via 203. I .1.2 Page 89 Sam Halabi-cisco Systems .63.41 255.255.14. 00:00:15.15.0 is variably subnetted.250.255.255.0 mask 255.250.0 interface Serial0 ip address 128.213.

0 0. because it will not sync up with OSPF due to the difference in masks.255.0. I will also keep sync off on RTB in order for it to advertise 203.255 area 0 router bgp 100 no synchronization network 203.250. The updated configs of RTA and RTB follow: RTA# hostname RTA ip subnet-zero interface Loopback0 ip address 203.1 255.255. I will also enable OSPF on serial 1 of RTB and make it passive in order for RTA to know about the nexthop 192.2 update-source Loopback0 1/26/96-Rev: A1.The BGP entries have disappeared because OSPF has a better distance (110) than internal bgp (200).255.0.255.63.0.0 interface Serial0 ip address 128.255.0 neighbor 128.5 via IGP.250.213.250. Let us bring RTB’s s1 up and see what all the routes will look like.41 255. I will also turn sync off on RTA in order for it to advertise 203.0 interface Ethernet0 ip address 203.0 0.2 remote-as 100 neighbor 203.0.15.250.255 area 0 network 128. Otherwise some looping will occur because in order to get to nexthop 192.255.2 Page 90 Sam Halabi-cisco Systems .10.0.15.250.2 remote-as 200 neighbor 203.255.252 router ospf 10 redistribute bgp 100 metric 2000 subnets passive-interface Serial0 network 203.250.5 we would have to go the other way via EBGP.15.250.208.10.14.213.208.213.255.13.1 255.0.250.255.0 mask 255.63.13.0 for the same reason.0.

0.13.0.5 remote-as 300 neighbor 203.15.250.2 0 200 400 i *> 203.255.208.0.0 192. > best.10.250.6 255.0.213.10.208.0.0 128.208.63.250.10.250.0.10.0 0.0.2 0 100 0 i 1/26/96-Rev: A1.10.41 remote-as 100 And the BGP tables look like this: RTA#sh ip bgp BGP table version is 117.213.255.250.255.EGP.2 255.213.255.208.5 100 0 300 500 i * 128.13.63.250. ? . d damped.0 0.213.0.250.10.255.0.15.2 0 0 200 i *>i192.0 0.0 0 32768 i *>i203.208.250.14. * valid.0 0.5 0 100 0 300 i *>i195.255 area 0 network 192.15.208.0 192.10.0 neighbor 192.IGP.15.255.2 Page 91 Sam Halabi-cisco Systems .2 0 200 400 500 i *> 200.41 Status codes: s suppressed.0 203. e .RTB# hostname RTB ip subnet-zero interface Serial0 ip address 203.incomplete Network Next Hop Metric LocPrf Weight Path *> 128.13. i -internal Origin codes: i .250.200.211.0 0 32768 i *> 203.252 router ospf 10 redistribute bgp 100 metric 1000 subnets passive-interface Serial1 network 203.252 interface Serial1 ip address 192.0 128.63.255 area 0 router bgp 100 no synchronization network 203. h history. local router ID is 203.

213.0 0.10. Potential asymmetry might occur if traffic going out from RTA comes back via RTB. One service provider might be closer to a certain destination than another.10.41 0 100 0 i *> 203.250. In our example.RTB#sh ip bgp BGP table version is 12.incomplete Network Next Hop Metric LocPrf Weight Path *>i128.10.10. We could learn partial routes from one of the ISPs and default routes to both ISPs.250.2 0 100 0 200 i * 192.15.208.0 192.2 Page 92 Sam Halabi-cisco Systems .5 0 300 500 i *>i200.0. h history. Because of aggregation your whole AS might look as one whole entity to the outside world and entry points to your network could occur via RTA or RTB.200. > best. i -internal Origin codes: i .213.IGP.250.208.EGP. traffic from AS400 destined to your network will always come in via RTA because of the shorter path.13. You might try to affect that decision by prepending path numbers to your updates to make the path length look longer (set as-path prepend).0 0 32768 i There are multiple ways to design our network to talk to the two different ISPs AS200 and AS300.208.10. This is the final configuration for all of the routers: 1/26/96-Rev: A1. I have chosen two different major nets when talking to the two ISPs. if AS400 has somehow set its exit point to be via AS200 based on attributes such as local preference or metric or weight then there is nothing you can do.13.0. This way I could balance outgoing traffic between the two ISPs. I have chosen to receive partial routes from AS200 and only local routes from AS300.13. One other potential reason for asymmetry is the different advertised path length to reach your AS. One way is to have a primary ISP and a backup ISP.208.63. * valid.63.5 0 300 500 400 200 i *> 192.0.5 0 300 500 400 i *>i203.250.10.250.10.208.10 Status codes: s suppressed.15.0 203. Both RTA and RTB are generating default routes into OSPF with RTB being more preferred (lower metric).2 100 0 200 400 i * 192.5 0 0 300 i *> 195.0 192.211. e . In this example. You might find out that all incoming traffic to your AS is coming via one single point even though you have multiple points to the internet.14.0 203.213.41 0 100 0 i *>i203. d damped. This might occur if you are using the same pool of IP addresses (same major net) when talking to the two ISPs. local router ID is 203.0 128. But.0 128. In our example. ? .250.

0.2 update-source Loopback0 ip classless ip default-network 200.255.213.250.1 255.250.200.255.0 into the IGP domain.15.2 remote-as 100 neighbor 203. For IGRP and EIGRP. the default information is injected into the IGP domain after redistributing BGP into IGRP/EIGRP.0.255.0 interface Serial0 ip address 128.0.2 Page 93 Sam Halabi-cisco Systems .0.0.0 0.250.0.252 router ospf 10 redistribute bgp 100 metric 2000 subnets passive-interface Serial0 network 203.63.255. This command is also used with ISIS and BGP.RTA# hostname RTA ip subnet-zero interface Loopback0 ip address 203.63.63. I have also picked network 200.0.1 255.200.0. For RIP.255 area 0 default-information originate metric 2000 router bgp 100 no synchronization network 203.0 0. Also with IGRP/EIGRP we can redistribute a static route to 0.13.0.250.2 route-map setlocalpref in neighbor 203.0 interface Ethernet0 ip address 203.0 is automatically redistributed into RIP without additional configuration.0 network 203.255.255 area 0 network 128.255.213.255.250.14.0 route-map setlocalpref permit 10 set local-preference 200 On RTA. The “default-information originate” command is used with OSPF to inject the default route inside the OSPF domain.255.0 neighbor 128.41 255.213.250. 0. 1/26/96-Rev: A1.2 remote-as 200 neighbor 128.14.0.250.0 to be the candidate default.15. using the “ip default-network” command.13. the local preference for routes coming from AS200 is set to 200.213.

10.208.6 0.41 remote-as 100 ! ip classless ip default-network 192.0.255 area 0 network 192.252 ! interface Serial1 ip address 192.14.0 0.250.0.0 neighbor 192.0.255.255.15.0 interface Serial1 ip address 203.5 remote-as 300 neighbor 192.252 router ospf 10 network 203.0.250.208.6 255.255.250.255.2 255.255.255.255.255.10.255.2 Page 94 Sam Halabi-cisco Systems .RTF# hostname RTF ip subnet-zero interface Ethernet0 ip address 203.208.15.0.250.250.15.250.0 0.255.0 area 0 default-information originate metric 1000 ! router bgp 100 no synchronization network 203.2 255.208.10 255.10.250.10.5 route-map localonly in neighbor 203.0.10.252 interface Serial0 ip address 203.255.0 ip as-path access-list 1 permit ^300$ route-map localonly permit 10 match as-path 1 set local-preference 300 1/26/96-Rev: A1.255.208.15.255 area 0 ip classless RTB# hostname RTB ip subnet-zero interface Loopback1 ip address 203.250.1 255.252 router ospf 10 redistribute bgp 100 metric 1000 subnets passive-interface Serial1 network 203.13.

213.255.63. d damped.0.15.213.IGP.255.0.213.213.252 ! interface Serial2/1 ip address 128. the local preference for updates coming in from AS300 is set to 300 which is higher than the IBGP updates coming in from RTA.213.63.255. This way AS100 will pick RTB for AS300’s local routes.63.63.213.5 0 300 0 300 RTC# hostname RTC ip subnet-zero interface Loopback0 ip address 128.255.252 router bgp 200 network 128.0.0.213.208. and this way RTA will be preferred.208.192 interface Serial2/0 ip address 128. h history.1 remote-as 100 neighbor 128.10.213.63.For RTB. > best.0/16 and indicated the specific routes to be injected into AS100.6 remote-as 400 ip classless access-list 1 deny 195.250. ? .incomplete Network Next Hop Metric LocPrf Weight Path *> 192.130 255.211.213. i - internal Origin codes: i .0. Any other routes on RTB (if they exist) will be sent internally with a local preference of 100 which is lower than 200 coming in from RTA. * valid.255 access-list 1 permit any On RTC.0.63.255.0 192. Note that I have only advertised AS300’s local routes. local router ID is 203. Any path info that does not match ^300$ will be dropped. I have aggregated 128. 1/26/96-Rev: A1.2 255.255.0 summary-only neighbor 128.1 distribute-list 1 out neighbor 128.255.0 0.0 255.255.10 Status codes: s suppressed.EGP.5 255. If you wanted to advertise the local routes and the neighbor routes (customers of the ISP) you can use the following: ^300_[0-9]* This is the output of the regular expression indicating AS300’s local routes: RTB#sh ip bgp regexp ^300$ BGP table version is 14.10. e . If the ISP refuses to do this task then you have to filter on the incoming end of AS100.0 aggregate-address 128.2 Page 95 Sam Halabi-cisco Systems .

252 interface Serial1 ip address 195.6 remote-as 100 RTG# hostname RTG ip subnet-zero interface Loopback0 ip address 195.211.255 access-list 2 permit any access-list 101 permit ip 195.252 router bgp 500 network 195.2 Page 96 Sam Halabi-cisco Systems .255.211.211.208.255.10.211.2 route-map setcommunity out neighbor 195.0 route-map setcommunity permit 20 match ip address 2 ! route-map setcommunity permit 10 match ip address 1 set community no-export 1/26/96-Rev: A1.211.10.0 255.255.255.0 summary-only neighbor 192.255.252 ! interface Serial0/1 ip address 192.255 host 255.10.2 send-community neighbor 192.255.10.1 255.10.174 255.0 aggregate-address 195.10.208.10.255.208.208.208.10.255.0 neighbor 192.10.192 ! interface Serial0/0 ip address 192.211.RTD# hostname RTD ip subnet-zero interface Loopback0 ip address 192.2 255.255.10.10.0.192 interface Serial0 ip address 192.255.252 router bgp 300 network 192.208.5 255.0.0 0.255.0.0.2 remote-as 400 ! ip classless access-list 1 permit 195.10.1 remote-as 500 neighbor 192.10.174 255.0.10.255.0 0.255.255.208.211.0.208.1 255.208.255.208.255.2 remote-as 300 neighbor 192.0.

e .incomplete Network Next Hop Metric LocPrf Weight Path *> 128.0.250. d damped.2 0 200 0 200 i *>i192.250.On RTG. And following are the final bgp and routing tables for RTA.13.0 summary-only neighbor 128.63.255.0 203.200. local router ID is 203.0 0.213.14.1 255.0 aggregate-address 200. It doesn’t matter in our case because RTB is not accepting these routes anyway.211.41 Status codes: s suppressed.0.5 remote-as 200 neighbor 195.0 192. ? .0 0.10. I have demonstrated the use of community filtering by adding a no-export community to 195.5 0 300 0 300 i *> 200.200.15.250.63.IGP.0. h history.211.10.0.255.0 0 32768 i *> 203.63.0.10. RTF and RTB: RTA#sh ip bgp BGP table version is 21.10.252 router bgp 400 network 200.208.6 255. * valid.0/16 128.0.213.213.0.255.255.2 0 100 0 i 1/26/96-Rev: A1.10. > best.0 255.255. This way RTD will not export that route to RTB.200.200.15.0 updates towards RTD.2 255.250.EGP.10.252 interface Serial1 ip address 128.0 interface Serial0 ip address 195.0.0.211. i - internal Origin codes: i .13.213.255. RTE# hostname RTE ip subnet-zero interface Loopback0 ip address 200.0 128.2 Page 97 Sam Halabi-cisco Systems .2 200 0 200 400 i *> 203.213.255.0 0 32768 i *>i203.63.0/16.1 remote-as 500 ip classless RTE is aggregating 200.250.0.200.208.

IGRP.213. IA . 00:41:26 C 128.0 [20/0] via 128. 3 masks O 203.0 is variably subnetted.IS-IS.0. R .14.mobile.252 [110/74] via 203. EX .0 255.250.250.2 to network 200.2.255.2.static.250. 3 subnets.OSPF external type 1.connected.OSPF external type 2.13. 00:41:25 C 203.EIGRP.255. Ethernet0 C 203.255. Ethernet0 B 203.63.RTA#sh ip rou Codes: C .15. M . 00:41:25. O .208.10.BGP D .250.2. 00:41:25.0.14.213. I .15. Loopback0 203. E2 .0 is directly connected.0.RIP. L1 .255.0.10.255.0 255. 00:02:38 1/26/96-Rev: A1.213.15. 00:41:25.255.0 255. Ethernet0 O 192.0 [110/1000] via 203.0 192.0 [200/0] via 203.2.2. * - candidate default Gateway of last resort is 128. S .10 255.208.14.EIGRP external.10.0 is variably subnetted.208.255.EGP i .250.252 is directly connected.200.2. B .2 Page 98 Sam Halabi-cisco Systems .250.4 255.2.250.250.63. Serial0 B* 200.15. 00:41:25.63.14.255.255.255.250.0 [20/0] via 128.IS-IS level-1.255 [110/75] via 203.0 is directly connected.252 [110/138] via 203.15.255.0 is variably subnetted.OSPF inter area E1 . 2 subnets.14.213.63.0 255. E .0.0 255.0.0 255. 2 subnets.200. 2 masks O E2 192.250. Ethernet0 O 203.255. 2 masks B 128. Ethernet0 128.255.250.213.OSPF.213.IS-IS level-2. L2 .255.

0. 01:12:09.0 [110/2000] via 203. IA .250.0 255. EX .0 [110/1000] via 203.0 [110/2000] via 203.EIGRP external.250.0 192.250.252 is directly connected.0 is variably subnetted. E . Ethernet0 O 128.1.250.15.250. Serial1 C 203.255. R .200.252 [110/74] via 203.14.255.255.13.0 255. 1/26/96-Rev: A1. * - candidate default Gateway of last resort is 203.0.0. 2 subnets.0.255.250. Ethernet0 O E2 200. The gateway of last resort is set to RTB.250. 2 subnets.255.250.14.0 [110/2000] via 203. 2 subnets. L2 . Serial1 O 192.13.RTF#sh ip rou Codes: C .EGP i . E2 .2 to network 0. 00:03:47.15. M .0 [110/1000] via 203.213. L1 .IS-IS.250.15. Other known networks such as 200. Ethernet0 128.208.255. Serial1 203.IGRP. 2 masks O 203. Ethernet0 203.0 255.0 is variably subnetted.213.OSPF external type 2. 2 masks O E2 192.0 are to be reached via RTB.250. 01:12:11. I . Ethernet0 O*E2 0.10.15. 00:48:50. S .13. 01:12:09.255.200.1.0 255.14.OSPF.14.208.250.250.255.0 255.0 is variably subnetted. 2 masks O E2 128.2. In case something happens to the connection between RTB and RTD.250.0 255. 00:03:33.0.255 [110/65] via 203.255. Serial1 Note RTF’s routing table which indicates that networks local to AS300 such as 192.10 255.14. Ethernet0 O E2 203.208.15. B .1.0.0.250. then the default advertised by RTA will kick in with a metric of 2000. O .static.0 0.250.63.10.15.10.255 [110/11] via 203.2.255. Serial1 C 203.OSPF external type 1. 2 masks O 203.0.15.250.2.IS-IS level-1.mobile.255.1. 00:45:01.255.OSPF inter area E1 .0.208.0 are to be reached via RTA.255.10.15.connected.0. 01:12:09.0. 01:12:09.0 is variably subnetted.255.255.14.EIGRP.0 is directly connected.IS-IS level-2.RIP.2 Page 99 Sam Halabi-cisco Systems .1.213.BGP D .252 [110/128] via 203. 2 subnets.0.255.41 255.4 255.2.250.

EGP i . R .2 200 0 200 400 i *>i203. EX .0 255.0. 00:50:46 C 192. S .250.250. 2 subnets.15. Serial0 128.255. Serial0 O 128.250.10.255.213.1.250.15.41 0 100 0 i *> 203.0 is directly connected.BGP D .10 Status codes: s suppressed. L2 .250.63.15.255.13. 01:20:33. 01:15:40.252 is directly connected.0 255.RIP.0 [20/0] via 192.255.255.63.0 203.250.10.15.0. ? .mobile.63.15.5.8 is directly connected.13.208.208.0 * 192.OSPF inter area E1 .213.255.15.250.0 255. Serial0 O E2 200.1.14. 2 subnets.200.0. E .255.213.250.0.1.0 192.incomplete Network Next Hop Metric LocPrf Weight Path *>i128. L1 . B .250.0 255.1.0 0 32768 i RTB#sh ip rou Codes: C .250.250. 2 masks O 203.252 [110/138] via 203.14.208. 2 masks B* 192.0 203.0 [110/2000] via 203.13.10.0 is variably subnetted.connected. e .255. * - candidate default Gateway of last resort is 192.0 0.OSPF external type 2. local router ID is 203.10.255.0.13.250.255 [110/75] via 203.0 128.200.255. Serial0 203.250.static.208.15.250. IA .208.250.0.IS-IS level-1.2 0 200 0 200 i *> 192.10. I .250. 2 subnets. i - internal Origin codes: i . > best.0 is variably subnetted.208.255.2 Page 100 Sam Halabi-cisco Systems . d damped.4 255. * valid.15.0/16 128.255.5 0 300 0 300 i *>i200.15.41 255.10. 2 masks O E2 128. Serial0 O 203.0.0 255. 01:20:33.0.13.10.213.10.250. Serial0 1/26/96-Rev: A1.0 255. h history.IS-IS.213.RTB#sh ip bgp BGP table version is 14. Loopback1 C 203.EIGRP external.13.250.0 [110/74] via 203.0.0 is variably subnetted.OSPF external type 1. Serial0 O E2 203.IGRP.EIGRP.OSPF.0 [110/2000] via 203.213.15.208. O .5 to network 192.252 is subnetted.EGP.15.255. E2 .250.0 [110/2000] via 203.IGP.41 0 100 0 i *>i203.1.1. 2 subnets C 203. 00:05:42. 00:46:55.255.IS-IS level-2. 01:20:34.208. M . Serial1 203.