SlideShare a Scribd company logo
1 of 65
BGP
Border gateway protocol
Border Gateway Protocol
• Routing Protocol used to exchange routing information
between networks
– exterior gateway protocol
• RFC1771
– work in progress to update
– draft-ietf-idr-bgp4-17.txt
• Currently Version 4
• Runs over TCP
Terms
• IGP (Interior Gateway Protocol) - RIP, IGRP, EIGRP, OSPF = Routing protocol
used to exchange routing information within an autonomous system.
• EGP (Exterior Gateway Protocol) - BGP = Routing protocol used to
exchange routing information between autonomous systems.
• Autonomous System = (From RFC 1771) “A set of routers under the single
technical administration, using an IGP and common metrics to route
packets within the AS, and using an EGP to route packets to other AS’s.”
• BGP is a path vector or an advanced distance vector routing protocol.
BGP
• Path Vector Protocol
• Incremental Updates
• Many options for policy enforcement
• Classless Inter Domain Routing (CIDR)
• Widely used for Internet backbone
• Autonomous systems
When to use BGP and when not to use BGP
Use BGP when the effects of BGP are well understood and one of the following conditions exist:
The AS allows packets to transit through it to reach another AS (transit AS).
The AS has multiple connections to other AS’s.
The flow of traffic entering or exiting the AS must be manipulated. This is policy based routing
and based on attributes.
When to use BGP and when not to use BGP
Do not use BGP if you have one or more of the following conditions:
A single connection to the Internet or another AS
No concern for routing policy or routing selection
A lack of memory or processing power on your routers to handle constant BGP updates
A limited understanding of route filtering and BGP path selection process
Low bandwidth between AS’s
Path Vector Protocol
• BGP is classified as a path vector routing
protocol (see RFC 1322)
– A path vector protocol defines a route as a pairing
between a destination and the attributes of the
path to that destination.
12.6.126.0/24 207.126.96.43 1021 0 6461 7018 6337 11268 i
AS Path
Overview of autonomous systems
• An AS is a group of routers that share similar routing policies and operate
within a single administrative domain.
• An AS can be a collection of routers running a single IGP, or it can be a
collection of routers running different protocols all belonging to one
organization.
• In either case, the outside world views the entire Autonomous System as a
single entity.
Overview of autonomous systems
AS Numbers
• Each AS has an identifying number that is assigned by an Internet registry
or a service provider.
• This number is between 1 and 65,535.
• AS numbers within the range of 64,512 through 65,535 are reserved for
private use.
• This is similar to RFC 1918 IP addresses.
• Because of the finite number of available AS numbers, an organization
must present justification of its need before it will be assigned an AS
number.
Single-homed autonomous systems
• If an AS has only one exit point to outside networks, it is considered a single-
homed system.
• Single-homed autonomous systems are often referred to as stub networks or
stubs.
• Stubs can rely on a default route to handle all traffic destined for non-local
networks.
• BGP is not normally needed in this situation.
Multihomed nontransit autonomous systems
• Multihomed nontransit autonomous systems do not really need to run BGP4
with their providers.
• It is usually recommended and often required by ISPs.
• As it will be seen later in this module, BGP4 offers numerous advantages,
including increased control of route propagation and filtering.
Multihomed nontransit autonomous systems
• Incoming route advertisements influence your outgoing traffic, and outgoing
advertisements influence your incoming traffic.
• If the provider advertises routes into your AS via BGP, your internal routers
have more accurate information about external destinations.
– BGP also provides tools for setting routing policies for external
destinations.
• If your internal routes are advertised to the provider via BGP, you have
influence over which routes are advertised at which exit point.
– BGP also provides tools for your influencing (to some degree) the choices
the provider makes when sending traffic into your AS.
Multi-homed Transit Autonomous Systems
• When BGP is running inside an AS, it is referred to as Internal BGP (IBGP).
• When BGP runs between autonomous systems, it is called External BGP
(EBGP).
• If the role of a BGP router is to route IBGP traffic, it is called a transit router.
• Routers that sit on the boundary of an AS and that use EBGP to exchange
information with the ISP are called border or edge routers.
FSM
In order to make decisions in its operations with peers, a BGP
peer uses a simple finite state machine (FSM) that consists of six
states: Idle; Connect; Active; OpenSent; OpenConfirm; and
Established. For each peer-to-peer session, a BGP
implementation maintains a state variable that tracks which of
these six states the session is in. The BGP defines the messages
that each peer should exchange in order to change the session
from one state to another
FSM diagram
FSM ideal state
• Refuse all incoming BGP connections
• Start the initialization of event triggers.
• Initiates a TCP connection with its configured BGP peer.
• Listens for a TCP connection from its peer.
• Changes its state to Connect.
• If an error occurs at any state of the FSM process, the BGP session is
terminated immediately and returned to the Idle state. Some of the reasons
why a router does not progress from the Idle state are:
– TCP port 179 is not open.
– A random TCP port over 1023 is not open.
– Peer address configured incorrectly on either router.
– AS number configured incorrectly on either router .
Connect state
• Waits for successful TCP negotiation with peer.
• BGP does not spend much time in this state if the TCP session has been
successfully established.
• Sends Open message to peer and changes state to OpenSent.
• If an error occurs, BGP moves to the Active state. Some reasons for the
error are:
– TCP port 179 is not open.
– A random TCP port over 1023 is not open.
– Peer address configured incorrectly on either router.
– AS number configured incorrectly on either router.
Active state
• If the router was unable to establish a successful TCP session, then it ends
up in the Active state.
• BGP FSM tries to restart another TCP session with the peer and, if
successful, then it sends an Open message to the peer.
• If it is unsuccessful again, the FSM is reset to the Idle state.
• Repeated failures may result in a router cycling between the Idle and
Active states. Some of the reasons for this include:
– TCP port 179 is not open.
– A random TCP port over 1023 is not open.
– BGP configuration error.
– Network congestion.
– Flapping network interface.
OpenSent State
• BGP FSM listens for an Open message from its peer.
• Once the message has been received, the router checks the validity of the
Open message.
• If there is an error it is because one of the fields in the Open message does
not match between the peers, e.g., BGP version mismatch, MD5 password
mismatch, the peering router expects a different My AS, etc. The router
then sends a Notification message to the peer indicating why the error
occurred.
• If there is no error, a Keepalive message is sent, various timers are set and
the state is changed to OpenConfirm.
OpenConfirm State
• The peer is listening for a Keepalive message from its peer.
• If a Keepalive message is received and no timer has expired before
reception of the Keepalive, BGP transitions to the Established state.
• If a timer expires before a Keepalive message is received, or if an error
condition occurs, the router transitions back to the Idle state.
Established State
• In this state, the peers send Update messages to exchange information
about each route being advertised to the BGP peer.
• If there is any error in the Update message then a Notification message is
sent to the peer, and BGP transitions back to the Idle state.
• If a timer expires before a Keepalive message is received, or if an error
condition occurs, the router transitions back to the Idle state.
BGP message Header
Each BGP Message contains the following header:
• Marker: The marker field is used to either authenticate incoming BGP
messages or to detect loss of synchronization between two BGP peers.
• Length: The length field indicates the total BGP message length, including
the header.
BGP message Header
Type: Type of BGP message. The following values are defined:
• Open (1)
• Update (2)
• Notification (3)
• KeepAlive (4)
After the TCP session is established, both neighbors send Open messages.
• This message is used to establish connections with peers.
• Each neighbor uses this message to identify itself and to specify its BGP
operational parameters including:
– BGP version number (defaults to version 4)
– AS number: AS number of the originating router, determines if BGP
session is EBGP or IBGP.
– BGP identifier: IP address that identifies the neighbor using the
same method as OSPF router ID.
– Optional parameter: authentication, multiprotocol support and
route refresh.
Type 1:
BGP Open Message
Type 2: BGP Keepalive Message
• This message type is sent periodically between peers to maintain connections
and verify paths held by the router sending the keepalive.
• If a router accepts the parameters specified in its neighbor’s Open message, it
responds with a Keepalive.
• Subsequent Keepalives are sent every 60 seconds by Cisco default or equal to
one-third the agreed-upon hold time (180 seconds).
• If the periodic timer is set to a value of zero (0), no keepalives are sent
Type 3: BGP Update Message
• The UPDATE messages contain all the information BGP uses to construct a
loop-free picture of the internetwork.
• Update messages advertises feasible routes, withdrawn routes, or both.
• The three basic components of an UPDATE message are:
– Network-Layer Reachability Information (NLRI)
– Path Attributes
– Withdrawn Routes
Type 3: BGP Update Message
Network-Layer Reachability Information (NLRI)
• This is one or more (Length, Prefix) tuples that advertise IP address
prefixes and their lengths.
• 192.168.160.0/19
– Prefix = 192.168.160.0
– Prefix Length = 19
Path Attributes
• This is described later, providing the information that allows BGP to
choose a shortest path, detect routing loops, and determine routing
policy.
Withdrawn Routes
• These are (Length, Prefix) tuples describing destination that have become
unreachable and are being withdrawn from service.
• An update message that has no NLRI or path attribute information is used
to advertise only routes to be withdrawn from service.
Type 4 Notification Message
• Error Code---Indicates the type of error that occurred. The following are the error types
defined by the field:
• Message Header Error: Indicates a problem with a message header, such as unacceptable
message length, unacceptable marker field value, or unacceptable message type.
• Open Message Error: Indicates a problem with an open message, such as unsupported
version number, unacceptable autonomous system number or IP address, or
unsupported authentication code.
• Update Message Error: Indicates a problem with an update message, such as a
malformed attribute list, attribute list error, or invalid next-hop attribute
Notification message
• Hold Time Expired: Indicates that the hold-time has expired, after which time
a BGP node will be considered nonfunctional.
• Finite State Machine Error: Indicates an unexpected event.
• Cease: Closes a BGP connection at the request of a BGP device in the absence
of any fatal errors
• Error Subcode---Provides more specific information about the nature of the
reported error.
• Error Data---Contains data based on the error code and error subcode fields.
This field is used to diagnose the reason for the notification message.
BGP attribute
Routes learned via BGP have associated properties that are used to
determine the best route to a destination when multiple paths exist to a
particular destination. These properties are referred to as BGP attributes, and
an understanding of how BGP attributes influence route selection is required
for the design of robust networks. This section describes the attributes that
BGP uses in the route selection process:
• Weight
• Local preference
• Multi-exit discriminator
• Origin
• AS_path
• Next hop
• Community
Weight attribute
• Weight is a Cisco-defined attribute that is local to a router. The weight attribute is
not advertised to neighboring routers. If the router learns about more than one
route to the same destination, the route with the highest weight will be
preferred.
• Router A is receiving an advertisement for network 172.16.1.0 from routers B
and C. When Router A receives the advertisement from Router B, the associated
weight is set to 50. When Router A receives the advertisement from Router C,
the associated weight is set to 100. Both paths for network 172.16.1.0 will be in
the BGP routing table, with their respective weights. The route with the highest
weight will be installed in the IP routing table.
Local Preference Attribute
• The local preference attribute is used to prefer an exit point from the local
autonomous system (AS). Unlike the weight attribute, the local preference attribute
is propagated throughout the local AS. If there are multiple exit points from the AS,
the local preference attribute is used to select the exit point for a specific route
• AS 100 is receiving two advertisements for network 172.16.1.0 from AS 200. When
Router A receives the advertisement for network 172.16.1.0, the corresponding
local preference is set to 50. When Router B receives the advertisement for
network 172.16.1.0, the corresponding local preference is set to 100. These local
preference values will be exchanged between routers A and B. Because Router B
has a higher local preference than Router A, Router B will be used as the exit point
from AS 100 to reach network 172.16.1.0 in AS 200.
Multi-Exit Discriminator Attribute
• The multi-exit discriminator (MED) or metric attribute is used as a suggestion to
an external AS regarding the preferred route into the AS that is advertising the
metric.
• The term suggestion is used because the external AS that is receiving the MEDs
may be using other BGP attributes for route selection.
• Router C is advertising the route 172.16.1.0 with a metric of 10, while Route D is
advertising 172.16.1.0 with a metric of 5. The lower value of the metric is
preferred, so AS 100 will select the route to router D for network 172.16.1.0 in AS
200. MEDs are advertised throughout the local AS.
Origin Attribute
• The origin attribute indicates how BGP learned about a particular route.
The origin attribute can have one of three possible values:
• IGP - The route is interior to the originating AS. This value is set when the
network router configuration command is used to inject the route into
BGP.
• EGP - The route is learned via the Exterior Border Gateway Protocol
(EBGP).
• Incomplete - The origin of the route is unknown or learned in some other
way. An origin of incomplete occurs when a route is redistributed into BGP.
• The origin attribute is used for route selection
AS_path attribute
• When a route advertisement passes through an autonomous system, the AS number is
added to an ordered list of AS numbers that the route advertisement has traversed
autonomous systems.
• AS1 originates the route to 172.16.1.0 and advertises this route to AS 2 and AS 3, with
the AS_path attribute equal to {1}. AS 3 will advertise back to AS 1 with AS-path
attribute {3,1}, and AS 2 will advertise back to AS 1 with AS-path attribute {2,1}. AS 1
will reject these routes when its own AS number is detected in the route
advertisement. This is the mechanism that BGP uses to detect routing loops. AS 2 and
AS 3 propagate the route to each other with their AS numbers added to the AS_path
attribute. These routes will not be installed in the IP routing table because AS 2 and
AS 3 are learning a route to 172.16.1.0 from AS 1 with a shorter AS_path list.
Next-Hop Attribute
• The EBGP next-hop attribute is the IP address that is used to reach the advertising
router. For EBGP peers, the next-hop address is the IP address of the connection
between the peers. For IBGP, the EBGP next-hop address is carried into the local AS
• Router C advertises network 172.16.1.0 with a next hop of 10.1.1.1. When Router A
propagates this route within its own AS, the EBGP next-hop information is
preserved. If Router B does not have routing information regarding the next hop,
the route will be discarded. Therefore, it is important to have an IGP running in the
AS to propagate next-hop routing information.
Community Attribute
• The community attribute provides a way of grouping destinations, called
communities, to which routing decisions (such as acceptance, preference, and
redistribution) can be applied. Route maps are used to set the community
attribute. Predefined community attributes are listed here:
• no-export - Do not advertise this route to EBGP peers.
• no-advertise - Do not advertise this route to any peer.
• internet - Advertise this route to the Internet community; all routers in the
network belong to it.
Fig :2Fig :1
Figure 1: BGP no-export Community Attribute illustrates the no-export community. AS 1
advertises 172.16.1.0 to AS 2 with the community attribute no-export. AS 2 will propagate
the route throughout AS 2 but will not send this route to AS 3 or any other external AS.
Figure 2: BGP no-advertise Community Attribute, AS 1 advertises 172.16.1.0 to AS 2 with
the community attribute no-advertise. Router B in AS 2 will not advertise this route to
any other router.
Figure: BGP internet Community Attribute demonstrates the internet community
attribute. There are no limitations to the scope of the route advertisement from AS 1.
BGP Path Selection
BGP could possibly receive multiple advertisements for the same route from multiple sources.
BGP selects only one path as the best path. When the path is selected, BGP puts the selected
path in the IP routing table and propagates the path to its neighbors. BGP uses the following
criteria, in the order presented, to select a path for a destination:
 If the path specifies a next hop that is inaccessible, drop the update.
 Prefer the path with the largest weight.
 If the weights are the same, prefer the path with the largest local preference.
 If the local preferences are the same, prefer the path that was originated by BGP running
on this router.
 If no route was originated, prefer the route that has the shortest AS_path.
 If all paths have the same AS_path length, prefer the path with the lowest origin type
(where IGP is lower than EGP, and EGP is lower than incomplete).
 If the origin codes are the same, prefer the path with the lowest MED attribute.
 If the paths have the same MED, prefer the external path over the internal path.
 If the paths are still the same, prefer the path through the closest IGP neighbor.
 Prefer the path with the lowest IP address, as specified by the BGP router ID.
IBGP vs EBGP
• When BGP is running inside an AS,
it is referred to as Internal BGP
(IBGP).
– If a BGP router’s role is to route
IBGP traffic, it is called a transit
router.
• When BGP runs between
autonomous systems, it is called
External BGP (EBGP).
– Routers that sit on the
boundary of an AS and use
EBGP to exchange information
with the ISP are called border
routers.
AS 100
AS 200
Vail
Aspen
Taos
192.168.100.0/24
192.168.200.0/24
192.168.1.216/30
192.168.1.226/30
192.168.1.225/30
192.168.1.221/30
192.168.1.222/30
192.168.1.224/30
192.168.1.220/30
EBGP
IBGP
…
 Routers A and B are running EBGP (BGP), and Routers B and C are running
IBGP.
 Note that the EBGP (BGP) peers are directly connected and that the IBGP
peers are not. (They can be.)
 As long as there is an IGP running that allows the two neighbors to reach
one another, IBGP peers do not have to be directly connected.
 All BGP speakers within an AS must establish a peer relationship with each
other, that is, the BGP speakers within an AS must be fully meshed logically.
(later)
 BGP4 provides two techniques that alleviate the requirement for a logical full
mesh: confederations and route reflectors. (later)
 AS 200 is a transit AS for AS 100 and AS 300---that is, AS 200 is used to
transfer packets between AS 100 and AS 300.
BGP
Configuration
• To begin configuring a BGP process, issue the following familiar command:
Router(config)#router bgp AS-number
• BGP configuration commands appear on the surface to mirror the syntax of
familiar IGP (for example, RIP, OSPF) commands.
• Although the syntax is similar, the function of these commands is significantly
different.
• Note: Cisco IOS permits only one BGP process to run at a time, thus, a router
cannot belong to more than one AS.
Router(config-router)#network network-number [mask network-
mask]
• The network command is used with IGPs, such as RIP, to determine the interfaces on
which to send and receive updates, as well as which directly connected networks to
advertise.
• However, when configuring BGP, the network command does not affect what interfaces
BGP runs on.
• In BGP, the network command tells the BGP process what locally learned networks to
advertise. .
BGP
Configuration
• These networks must also exist in the local router’s routing table
(show ip route), or they will not be sent out in updates.
• You can use the mask keyword with the network command to specify
individual subnets.
• Routes learned by the BGP process are propagated by default, but are
often filtered by a routing policy.
BGP
Configuration
Router(config-router)#neighbor ip-address remote-as AS-
number
• In order for a BGP router to establish a neighbor relationship with another
BGP router, you must issue the this configuration command.
• This command serves to identify a peer router with which the local router will
establish a session.
• The AS-number argument determines whether the neighbor router is an EBGP
or an IBGP neighbor.
BGP
Configuration
BGP Configuration
• If the AS-number configured in the router bgp command is identical to the
AS-number configured in the neighbor statement, BGP will initiate an
internal session - IBGP.
• If the field values are different, BGP will build an external session - EBGP.
EBGP
RTA(config)#router bgp 100
RTA(config-router)#neighbor 10.1.1.1 remote-as 200
RTB(config)#router bgp 200
RTB(config-router)#neighbor 10.1.1.2 remote-as 100
• RTB: Note that the neighbor command’s remote-as value, 100, is different
from the AS number specified by the router bgp command (200).
• Because the two AS numbers are different, BGP will start an EBGP connection
with RTA.
• Communication will occur between autonomous systems.
IBGP
RTB(config)#router bgp 200
RTB(config-router)#neighbor 172.16.1.2 remote-as 200
RTB(config-router)#neighbor 172.16.1.2 update-source loopback 0
RTC(config)#router bgp 200
RTC(config-router)#neighbor 172.16.1.1 remote-as 200
RTC(config-router)#neighbor 172.16.1.1 update-source loopback 0
• Since the remote-as value (200) is the same as RTB’s BGP AS number, BGP recognizes that this
connection will occur within AS 200, so it attempts to establish an IBGP session.
• In reality, AS 200 is not a remote AS at all; it is the local AS, since both routers live there. But for
simplicity, the keyword remote-as is used when configuring both EBGP and IBGP sessions.
RTB(config-router)#neighbor 172.16.1.2 update-source loopback 0
RTC(config-router)#neighbor 172.16.1.1 update-source loopback 0
• The update-source loopback 0 command is used to instruct the router to use any
operational interface for TCP connections (as long as Lo0 is up and configured with an IP
address).
• Without the update-source loopback 0 command, BGP routers can use only the closest
IP interface to the peer.
• The ability to use any operational interface provides BGP with robustness in the event
the link to the closet interface fails.
– Since EBGP sessions are typically point-to-point, there is no need to use this
command with EBGP.
• Assume the following route appears in RTB’s table:
0 192.168.1.0/24 [110/74] via 10.2.2.1, 00:31:34,
Serial2
• RTB learned this route via an IGP, in this case, OSPF.
• This AS uses OSPF internally to exchange route information.
• Can RTB advertise this network via BGP?
• Certainly, redistributing OSPF into BGP will do the trick, but the BGP network
command will do the same thing.
RTB(config)#router bgp 200
RTB(config-router)#network 172.16.1.0 mask 255.255.255.254
RTB(config-router)#network 10.1.1.0 mask 255.255.255.254
RTB(config-router)#network 192.168.1.0
• The first two network commands in include the mask keyword, so that only a particular
subnet is specified.
• The third network command results in the OSPF route being advertised by BGP without
redistribution.
• Remember that the BGP network command works differently than the IGP network
command!
• EBGP peers must be directly connected, but there are certain exceptions to this
requirement.
• In contrast, IBGP peers merely require TCP/IP connectivity within the same AS.
– As long as RTY can communicate with RTW using TCP, both routers can establish
an IBGP session.
– If needed, an IGP such as OSPF can provide IBGP peers with routes to each other.
EBGP vs IBGP
EBGP
• EBGP neighbors must be directly connected in order to establish an EBGP session.
• However, EBGP multihop is a Cisco IOS option allows RTW and RTU to be logically
connected in an EBGP session, despite the fact that RTV does not support BGP.
• The EBGP multihop option is configured on each peer with the following command:
Router(config-router)#neighbor IP-address ebgp-multihop
[hops]
EBGP Multihop
EBGP Multihop
I do not speak BGP. But RTW
and RTU can use EBGP
multihop to speak BGP.
EBGP
EBGP Multihop
EBGP Multihop
I do not speak BGP. But RTW and
RTU can use EBGP multihop to
speak BGP.
EBGP Multihop
RTW(config)#router bgp 200
RTW(config-router)#neighbor 1.1.1.2 remote-as 300
RTW(config-router)#neighbor 1.1.1.2 ebgp-multihop 2
AS200
AS300
1.1.1.1
1.1.1.2
RTU(config)#router bgp 300
RTU(config-router)#neighbor 1.1.1.1 remote-as 200
RTU(config-router)#neighbor 1.1.1.1 ebgp-multihop 2
BGP Configuration
• Finally, whenever you are configuring BGP, you will notice that changes
you make to an existing configuration may not appear immediately.
• To force BGP to clear its table and reset BGP sessions, use the clear ip bgp
command. The easiest way to enter this command is as follows:
Router#clear ip bgp *
Router#clear ip bgp 10.0.0.0
Use this command with CAUTION, better yet, not at all, in a production
network. From the net…
• “clear ip bgp *
Verifying BGP Configuration
• If the router has not installed the BGP routes you expect, you can use the show
ip bgp command to verify that BGP has learned these routes.
RTA#show ip bgp
BGP table version is 3, local router ID is 10.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i1.0.0.0 192.168.1.6 0 100 0 200 400 e
*>i10.1.1.1/32 10.1.1.1 0 100 0 i
*>i172.16.1.0/24 10.1.1.1 0 100 0 i
* i192.168.1.32/27 192.168.1.6 0 100 0 200 i
Verifying BGP Configuration
• If an expected BGP route does not appear in the BGP table, you can use the show ip bgp
neighbors command to verify that your router has established a BGP connection with its
neighbors.
RTA#show ip bgp neighbors
BGP neighbor is 172.24.1.18, remote AS 200, external link
BGP version 4, remote router ID 172.16.1.1
BGP state = Established, up for 00:03:25
Last read 00:00:25, hold time is 180, keepalive interval is
60 seconds
Neighbor capabilities:
Route refresh: advertised and received
Address family IPv4 Unicast: advertised and received
Received 7 messages, 0 notifications, 0 in queue
Sent 8 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
<output omitted>
BGP Show
Commands
BGP Show
Commands
BGP Show
Commands
• RouterC#show ip bgp
• BGP table version is 8, local router ID is 200.200.200.66
• Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
• Origin codes: i - IGP, e - EGP, ? - incomplete
• Network Next Hop Metric LocPrf Weight Path
• *> 11.0.0.0 0.0.0.0 0 32768 i
• *> 12.0.0.0 200.200.200.65 0 300 200 i
• *> 192.10.2.0 200.200.200.65 0 0 300 i
• BGP table version - Internal version number of the table. This number is incremented
whenever the table changes.
• local router ID - IP address of the router.
• Status codes - Status of the table entry. The status is displayed at the beginning of each
line in the table. It can be one of the following values:
s —The table entry is suppressed.
* —The table entry is valid.
> —The table entry is the best entry to use for that network.
i —The table entry was learned via an internal BGP (iBGP) session
show ip bgp
Thank you

More Related Content

What's hot

Border Gateway Protocol
Border Gateway ProtocolBorder Gateway Protocol
Border Gateway ProtocolKashif Latif
 
MPLS + BGP Presentation
MPLS + BGP PresentationMPLS + BGP Presentation
MPLS + BGP PresentationGino McCarty
 
An Overview of Border Gateway Protocol (BGP)
An Overview of Border Gateway Protocol (BGP)An Overview of Border Gateway Protocol (BGP)
An Overview of Border Gateway Protocol (BGP)Jasim Alam
 
Border Gateway Protocol (BGP)
Border Gateway Protocol (BGP)Border Gateway Protocol (BGP)
Border Gateway Protocol (BGP)Nutan Singh
 
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]APNIC
 
Bidirectional Forwarding Detection (BFD)
Bidirectional Forwarding Detection (BFD) Bidirectional Forwarding Detection (BFD)
Bidirectional Forwarding Detection (BFD) KHNOG
 
BGP Techniques for Network Operators
BGP Techniques for Network OperatorsBGP Techniques for Network Operators
BGP Techniques for Network OperatorsAPNIC
 
Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)Respa Peter
 
CCNA Advanced Routing Protocols
CCNA Advanced Routing ProtocolsCCNA Advanced Routing Protocols
CCNA Advanced Routing ProtocolsDsunte Wilson
 
MPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - BasicMPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - BasicEricsson
 
Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)Alan Mark
 
Juniper MPLS Tutorial by Soricelli
Juniper MPLS Tutorial by SoricelliJuniper MPLS Tutorial by Soricelli
Juniper MPLS Tutorial by SoricelliFebrian ‎
 

What's hot (20)

Bgp
BgpBgp
Bgp
 
Border Gateway Protocol
Border Gateway ProtocolBorder Gateway Protocol
Border Gateway Protocol
 
Ospf.ppt
Ospf.pptOspf.ppt
Ospf.ppt
 
BGP
BGP BGP
BGP
 
MPLS + BGP Presentation
MPLS + BGP PresentationMPLS + BGP Presentation
MPLS + BGP Presentation
 
An Overview of Border Gateway Protocol (BGP)
An Overview of Border Gateway Protocol (BGP)An Overview of Border Gateway Protocol (BGP)
An Overview of Border Gateway Protocol (BGP)
 
Border Gateway Protocol (BGP)
Border Gateway Protocol (BGP)Border Gateway Protocol (BGP)
Border Gateway Protocol (BGP)
 
BGP Overview
BGP OverviewBGP Overview
BGP Overview
 
Bgp (1)
Bgp (1)Bgp (1)
Bgp (1)
 
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
 
Bidirectional Forwarding Detection (BFD)
Bidirectional Forwarding Detection (BFD) Bidirectional Forwarding Detection (BFD)
Bidirectional Forwarding Detection (BFD)
 
BGP Techniques for Network Operators
BGP Techniques for Network OperatorsBGP Techniques for Network Operators
BGP Techniques for Network Operators
 
Routing Protocols
Routing Protocols Routing Protocols
Routing Protocols
 
Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)
 
CCNA Advanced Routing Protocols
CCNA Advanced Routing ProtocolsCCNA Advanced Routing Protocols
CCNA Advanced Routing Protocols
 
MPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - BasicMPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - Basic
 
Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)
 
OSPF Fundamental
OSPF FundamentalOSPF Fundamental
OSPF Fundamental
 
Juniper MPLS Tutorial by Soricelli
Juniper MPLS Tutorial by SoricelliJuniper MPLS Tutorial by Soricelli
Juniper MPLS Tutorial by Soricelli
 
CCNP Route EIGRP Overview
CCNP Route  EIGRP OverviewCCNP Route  EIGRP Overview
CCNP Route EIGRP Overview
 

Viewers also liked

Deploying IP/MPLS VPN - Cisco Networkers 2010
Deploying IP/MPLS VPN - Cisco Networkers 2010Deploying IP/MPLS VPN - Cisco Networkers 2010
Deploying IP/MPLS VPN - Cisco Networkers 2010Febrian ‎
 
Operationalizing BGP in the SDDC
Operationalizing BGP in the SDDCOperationalizing BGP in the SDDC
Operationalizing BGP in the SDDCCumulus Networks
 
Linux firewall-201503
Linux firewall-201503Linux firewall-201503
Linux firewall-201503Kenduest Lee
 
MPLS (Multi-Protocol Label Switching)
MPLS (Multi-Protocol Label Switching)MPLS (Multi-Protocol Label Switching)
MPLS (Multi-Protocol Label Switching)Vipin Sahu
 
Multi-Protocol Label Switching: Basics and Applications
Multi-Protocol Label Switching: Basics and ApplicationsMulti-Protocol Label Switching: Basics and Applications
Multi-Protocol Label Switching: Basics and ApplicationsVishal Sharma, Ph.D.
 
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...Edureka!
 

Viewers also liked (12)

bgp(border gateway protocol)
bgp(border gateway protocol)bgp(border gateway protocol)
bgp(border gateway protocol)
 
Deploying IP/MPLS VPN - Cisco Networkers 2010
Deploying IP/MPLS VPN - Cisco Networkers 2010Deploying IP/MPLS VPN - Cisco Networkers 2010
Deploying IP/MPLS VPN - Cisco Networkers 2010
 
Mpls Services
Mpls ServicesMpls Services
Mpls Services
 
MPLS: Multiprotocol Label Switching
MPLS: Multiprotocol Label SwitchingMPLS: Multiprotocol Label Switching
MPLS: Multiprotocol Label Switching
 
Mpls
MplsMpls
Mpls
 
Operationalizing BGP in the SDDC
Operationalizing BGP in the SDDCOperationalizing BGP in the SDDC
Operationalizing BGP in the SDDC
 
Linux firewall-201503
Linux firewall-201503Linux firewall-201503
Linux firewall-201503
 
MPLS (Multi-Protocol Label Switching)
MPLS (Multi-Protocol Label Switching)MPLS (Multi-Protocol Label Switching)
MPLS (Multi-Protocol Label Switching)
 
Multi-Protocol Label Switching: Basics and Applications
Multi-Protocol Label Switching: Basics and ApplicationsMulti-Protocol Label Switching: Basics and Applications
Multi-Protocol Label Switching: Basics and Applications
 
BGP protocol presentation
BGP protocol  presentationBGP protocol  presentation
BGP protocol presentation
 
MPLS Presentation
MPLS PresentationMPLS Presentation
MPLS Presentation
 
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
 

Similar to Border Gatway Protocol

Similar to Border Gatway Protocol (20)

Bgp training
Bgp trainingBgp training
Bgp training
 
BGP
BGPBGP
BGP
 
Bgp
BgpBgp
Bgp
 
Part1
Part1Part1
Part1
 
Final Presentation on the Network layer
Final Presentation on the Network layerFinal Presentation on the Network layer
Final Presentation on the Network layer
 
Bgp Toc
Bgp TocBgp Toc
Bgp Toc
 
Bgp
BgpBgp
Bgp
 
Study Notes BGP Exam
Study Notes BGP ExamStudy Notes BGP Exam
Study Notes BGP Exam
 
Qs.pptx
Qs.pptxQs.pptx
Qs.pptx
 
15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocols
 
10 routing-bgp
10 routing-bgp10 routing-bgp
10 routing-bgp
 
Routing algorithms
Routing algorithmsRouting algorithms
Routing algorithms
 
U5CSS2 (1).pdf
U5CSS2 (1).pdfU5CSS2 (1).pdf
U5CSS2 (1).pdf
 
bgp protocol
 bgp protocol bgp protocol
bgp protocol
 
BGP.pdf
BGP.pdfBGP.pdf
BGP.pdf
 
Bgp, a brief Introduction
Bgp, a brief IntroductionBgp, a brief Introduction
Bgp, a brief Introduction
 
Bigbgp (1)
Bigbgp (1)Bigbgp (1)
Bigbgp (1)
 
NP - Unit 5 - Bootstrap, Autoconfigurion and BGP
NP - Unit 5 - Bootstrap, Autoconfigurion and BGPNP - Unit 5 - Bootstrap, Autoconfigurion and BGP
NP - Unit 5 - Bootstrap, Autoconfigurion and BGP
 
Cisco BGP Exam 642-661 Review Notes
Cisco BGP Exam 642-661 Review NotesCisco BGP Exam 642-661 Review Notes
Cisco BGP Exam 642-661 Review Notes
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
 

More from Shashank Asthana

Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management Shashank Asthana
 
GSM Cell planning and frequency reuse
GSM Cell planning and frequency reuseGSM Cell planning and frequency reuse
GSM Cell planning and frequency reuseShashank Asthana
 
IPv4 addressing and subnetting
IPv4 addressing and subnettingIPv4 addressing and subnetting
IPv4 addressing and subnettingShashank Asthana
 
Call flow and MS attach in LTE
Call flow and MS attach in LTECall flow and MS attach in LTE
Call flow and MS attach in LTEShashank Asthana
 

More from Shashank Asthana (6)

Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management
 
GSM Cell planning and frequency reuse
GSM Cell planning and frequency reuseGSM Cell planning and frequency reuse
GSM Cell planning and frequency reuse
 
IPv4 addressing and subnetting
IPv4 addressing and subnettingIPv4 addressing and subnetting
IPv4 addressing and subnetting
 
Masters porting linux
Masters porting linuxMasters porting linux
Masters porting linux
 
Call flow and MS attach in LTE
Call flow and MS attach in LTECall flow and MS attach in LTE
Call flow and MS attach in LTE
 
LTE 3GPP
LTE 3GPPLTE 3GPP
LTE 3GPP
 

Recently uploaded

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

Border Gatway Protocol

  • 2. Border Gateway Protocol • Routing Protocol used to exchange routing information between networks – exterior gateway protocol • RFC1771 – work in progress to update – draft-ietf-idr-bgp4-17.txt • Currently Version 4 • Runs over TCP
  • 3. Terms • IGP (Interior Gateway Protocol) - RIP, IGRP, EIGRP, OSPF = Routing protocol used to exchange routing information within an autonomous system. • EGP (Exterior Gateway Protocol) - BGP = Routing protocol used to exchange routing information between autonomous systems. • Autonomous System = (From RFC 1771) “A set of routers under the single technical administration, using an IGP and common metrics to route packets within the AS, and using an EGP to route packets to other AS’s.” • BGP is a path vector or an advanced distance vector routing protocol.
  • 4. BGP • Path Vector Protocol • Incremental Updates • Many options for policy enforcement • Classless Inter Domain Routing (CIDR) • Widely used for Internet backbone • Autonomous systems
  • 5. When to use BGP and when not to use BGP Use BGP when the effects of BGP are well understood and one of the following conditions exist: The AS allows packets to transit through it to reach another AS (transit AS). The AS has multiple connections to other AS’s. The flow of traffic entering or exiting the AS must be manipulated. This is policy based routing and based on attributes.
  • 6. When to use BGP and when not to use BGP Do not use BGP if you have one or more of the following conditions: A single connection to the Internet or another AS No concern for routing policy or routing selection A lack of memory or processing power on your routers to handle constant BGP updates A limited understanding of route filtering and BGP path selection process Low bandwidth between AS’s
  • 7. Path Vector Protocol • BGP is classified as a path vector routing protocol (see RFC 1322) – A path vector protocol defines a route as a pairing between a destination and the attributes of the path to that destination. 12.6.126.0/24 207.126.96.43 1021 0 6461 7018 6337 11268 i AS Path
  • 8. Overview of autonomous systems • An AS is a group of routers that share similar routing policies and operate within a single administrative domain. • An AS can be a collection of routers running a single IGP, or it can be a collection of routers running different protocols all belonging to one organization. • In either case, the outside world views the entire Autonomous System as a single entity.
  • 9. Overview of autonomous systems AS Numbers • Each AS has an identifying number that is assigned by an Internet registry or a service provider. • This number is between 1 and 65,535. • AS numbers within the range of 64,512 through 65,535 are reserved for private use. • This is similar to RFC 1918 IP addresses. • Because of the finite number of available AS numbers, an organization must present justification of its need before it will be assigned an AS number.
  • 10. Single-homed autonomous systems • If an AS has only one exit point to outside networks, it is considered a single- homed system. • Single-homed autonomous systems are often referred to as stub networks or stubs. • Stubs can rely on a default route to handle all traffic destined for non-local networks. • BGP is not normally needed in this situation.
  • 11. Multihomed nontransit autonomous systems • Multihomed nontransit autonomous systems do not really need to run BGP4 with their providers. • It is usually recommended and often required by ISPs. • As it will be seen later in this module, BGP4 offers numerous advantages, including increased control of route propagation and filtering.
  • 12. Multihomed nontransit autonomous systems • Incoming route advertisements influence your outgoing traffic, and outgoing advertisements influence your incoming traffic. • If the provider advertises routes into your AS via BGP, your internal routers have more accurate information about external destinations. – BGP also provides tools for setting routing policies for external destinations. • If your internal routes are advertised to the provider via BGP, you have influence over which routes are advertised at which exit point. – BGP also provides tools for your influencing (to some degree) the choices the provider makes when sending traffic into your AS.
  • 13. Multi-homed Transit Autonomous Systems • When BGP is running inside an AS, it is referred to as Internal BGP (IBGP). • When BGP runs between autonomous systems, it is called External BGP (EBGP). • If the role of a BGP router is to route IBGP traffic, it is called a transit router. • Routers that sit on the boundary of an AS and that use EBGP to exchange information with the ISP are called border or edge routers.
  • 14. FSM In order to make decisions in its operations with peers, a BGP peer uses a simple finite state machine (FSM) that consists of six states: Idle; Connect; Active; OpenSent; OpenConfirm; and Established. For each peer-to-peer session, a BGP implementation maintains a state variable that tracks which of these six states the session is in. The BGP defines the messages that each peer should exchange in order to change the session from one state to another
  • 16. FSM ideal state • Refuse all incoming BGP connections • Start the initialization of event triggers. • Initiates a TCP connection with its configured BGP peer. • Listens for a TCP connection from its peer. • Changes its state to Connect. • If an error occurs at any state of the FSM process, the BGP session is terminated immediately and returned to the Idle state. Some of the reasons why a router does not progress from the Idle state are: – TCP port 179 is not open. – A random TCP port over 1023 is not open. – Peer address configured incorrectly on either router. – AS number configured incorrectly on either router .
  • 17. Connect state • Waits for successful TCP negotiation with peer. • BGP does not spend much time in this state if the TCP session has been successfully established. • Sends Open message to peer and changes state to OpenSent. • If an error occurs, BGP moves to the Active state. Some reasons for the error are: – TCP port 179 is not open. – A random TCP port over 1023 is not open. – Peer address configured incorrectly on either router. – AS number configured incorrectly on either router.
  • 18. Active state • If the router was unable to establish a successful TCP session, then it ends up in the Active state. • BGP FSM tries to restart another TCP session with the peer and, if successful, then it sends an Open message to the peer. • If it is unsuccessful again, the FSM is reset to the Idle state. • Repeated failures may result in a router cycling between the Idle and Active states. Some of the reasons for this include: – TCP port 179 is not open. – A random TCP port over 1023 is not open. – BGP configuration error. – Network congestion. – Flapping network interface.
  • 19. OpenSent State • BGP FSM listens for an Open message from its peer. • Once the message has been received, the router checks the validity of the Open message. • If there is an error it is because one of the fields in the Open message does not match between the peers, e.g., BGP version mismatch, MD5 password mismatch, the peering router expects a different My AS, etc. The router then sends a Notification message to the peer indicating why the error occurred. • If there is no error, a Keepalive message is sent, various timers are set and the state is changed to OpenConfirm.
  • 20. OpenConfirm State • The peer is listening for a Keepalive message from its peer. • If a Keepalive message is received and no timer has expired before reception of the Keepalive, BGP transitions to the Established state. • If a timer expires before a Keepalive message is received, or if an error condition occurs, the router transitions back to the Idle state.
  • 21. Established State • In this state, the peers send Update messages to exchange information about each route being advertised to the BGP peer. • If there is any error in the Update message then a Notification message is sent to the peer, and BGP transitions back to the Idle state. • If a timer expires before a Keepalive message is received, or if an error condition occurs, the router transitions back to the Idle state.
  • 22. BGP message Header Each BGP Message contains the following header: • Marker: The marker field is used to either authenticate incoming BGP messages or to detect loss of synchronization between two BGP peers. • Length: The length field indicates the total BGP message length, including the header.
  • 23. BGP message Header Type: Type of BGP message. The following values are defined: • Open (1) • Update (2) • Notification (3) • KeepAlive (4)
  • 24. After the TCP session is established, both neighbors send Open messages. • This message is used to establish connections with peers. • Each neighbor uses this message to identify itself and to specify its BGP operational parameters including: – BGP version number (defaults to version 4) – AS number: AS number of the originating router, determines if BGP session is EBGP or IBGP. – BGP identifier: IP address that identifies the neighbor using the same method as OSPF router ID. – Optional parameter: authentication, multiprotocol support and route refresh. Type 1: BGP Open Message
  • 25. Type 2: BGP Keepalive Message • This message type is sent periodically between peers to maintain connections and verify paths held by the router sending the keepalive. • If a router accepts the parameters specified in its neighbor’s Open message, it responds with a Keepalive. • Subsequent Keepalives are sent every 60 seconds by Cisco default or equal to one-third the agreed-upon hold time (180 seconds). • If the periodic timer is set to a value of zero (0), no keepalives are sent
  • 26. Type 3: BGP Update Message • The UPDATE messages contain all the information BGP uses to construct a loop-free picture of the internetwork. • Update messages advertises feasible routes, withdrawn routes, or both. • The three basic components of an UPDATE message are: – Network-Layer Reachability Information (NLRI) – Path Attributes – Withdrawn Routes
  • 27. Type 3: BGP Update Message Network-Layer Reachability Information (NLRI) • This is one or more (Length, Prefix) tuples that advertise IP address prefixes and their lengths. • 192.168.160.0/19 – Prefix = 192.168.160.0 – Prefix Length = 19 Path Attributes • This is described later, providing the information that allows BGP to choose a shortest path, detect routing loops, and determine routing policy. Withdrawn Routes • These are (Length, Prefix) tuples describing destination that have become unreachable and are being withdrawn from service. • An update message that has no NLRI or path attribute information is used to advertise only routes to be withdrawn from service.
  • 28. Type 4 Notification Message • Error Code---Indicates the type of error that occurred. The following are the error types defined by the field: • Message Header Error: Indicates a problem with a message header, such as unacceptable message length, unacceptable marker field value, or unacceptable message type. • Open Message Error: Indicates a problem with an open message, such as unsupported version number, unacceptable autonomous system number or IP address, or unsupported authentication code. • Update Message Error: Indicates a problem with an update message, such as a malformed attribute list, attribute list error, or invalid next-hop attribute
  • 29. Notification message • Hold Time Expired: Indicates that the hold-time has expired, after which time a BGP node will be considered nonfunctional. • Finite State Machine Error: Indicates an unexpected event. • Cease: Closes a BGP connection at the request of a BGP device in the absence of any fatal errors • Error Subcode---Provides more specific information about the nature of the reported error. • Error Data---Contains data based on the error code and error subcode fields. This field is used to diagnose the reason for the notification message.
  • 30. BGP attribute Routes learned via BGP have associated properties that are used to determine the best route to a destination when multiple paths exist to a particular destination. These properties are referred to as BGP attributes, and an understanding of how BGP attributes influence route selection is required for the design of robust networks. This section describes the attributes that BGP uses in the route selection process: • Weight • Local preference • Multi-exit discriminator • Origin • AS_path • Next hop • Community
  • 31. Weight attribute • Weight is a Cisco-defined attribute that is local to a router. The weight attribute is not advertised to neighboring routers. If the router learns about more than one route to the same destination, the route with the highest weight will be preferred. • Router A is receiving an advertisement for network 172.16.1.0 from routers B and C. When Router A receives the advertisement from Router B, the associated weight is set to 50. When Router A receives the advertisement from Router C, the associated weight is set to 100. Both paths for network 172.16.1.0 will be in the BGP routing table, with their respective weights. The route with the highest weight will be installed in the IP routing table.
  • 32. Local Preference Attribute • The local preference attribute is used to prefer an exit point from the local autonomous system (AS). Unlike the weight attribute, the local preference attribute is propagated throughout the local AS. If there are multiple exit points from the AS, the local preference attribute is used to select the exit point for a specific route • AS 100 is receiving two advertisements for network 172.16.1.0 from AS 200. When Router A receives the advertisement for network 172.16.1.0, the corresponding local preference is set to 50. When Router B receives the advertisement for network 172.16.1.0, the corresponding local preference is set to 100. These local preference values will be exchanged between routers A and B. Because Router B has a higher local preference than Router A, Router B will be used as the exit point from AS 100 to reach network 172.16.1.0 in AS 200.
  • 33. Multi-Exit Discriminator Attribute • The multi-exit discriminator (MED) or metric attribute is used as a suggestion to an external AS regarding the preferred route into the AS that is advertising the metric. • The term suggestion is used because the external AS that is receiving the MEDs may be using other BGP attributes for route selection. • Router C is advertising the route 172.16.1.0 with a metric of 10, while Route D is advertising 172.16.1.0 with a metric of 5. The lower value of the metric is preferred, so AS 100 will select the route to router D for network 172.16.1.0 in AS 200. MEDs are advertised throughout the local AS.
  • 34. Origin Attribute • The origin attribute indicates how BGP learned about a particular route. The origin attribute can have one of three possible values: • IGP - The route is interior to the originating AS. This value is set when the network router configuration command is used to inject the route into BGP. • EGP - The route is learned via the Exterior Border Gateway Protocol (EBGP). • Incomplete - The origin of the route is unknown or learned in some other way. An origin of incomplete occurs when a route is redistributed into BGP. • The origin attribute is used for route selection
  • 35. AS_path attribute • When a route advertisement passes through an autonomous system, the AS number is added to an ordered list of AS numbers that the route advertisement has traversed autonomous systems. • AS1 originates the route to 172.16.1.0 and advertises this route to AS 2 and AS 3, with the AS_path attribute equal to {1}. AS 3 will advertise back to AS 1 with AS-path attribute {3,1}, and AS 2 will advertise back to AS 1 with AS-path attribute {2,1}. AS 1 will reject these routes when its own AS number is detected in the route advertisement. This is the mechanism that BGP uses to detect routing loops. AS 2 and AS 3 propagate the route to each other with their AS numbers added to the AS_path attribute. These routes will not be installed in the IP routing table because AS 2 and AS 3 are learning a route to 172.16.1.0 from AS 1 with a shorter AS_path list.
  • 36. Next-Hop Attribute • The EBGP next-hop attribute is the IP address that is used to reach the advertising router. For EBGP peers, the next-hop address is the IP address of the connection between the peers. For IBGP, the EBGP next-hop address is carried into the local AS • Router C advertises network 172.16.1.0 with a next hop of 10.1.1.1. When Router A propagates this route within its own AS, the EBGP next-hop information is preserved. If Router B does not have routing information regarding the next hop, the route will be discarded. Therefore, it is important to have an IGP running in the AS to propagate next-hop routing information.
  • 37. Community Attribute • The community attribute provides a way of grouping destinations, called communities, to which routing decisions (such as acceptance, preference, and redistribution) can be applied. Route maps are used to set the community attribute. Predefined community attributes are listed here: • no-export - Do not advertise this route to EBGP peers. • no-advertise - Do not advertise this route to any peer. • internet - Advertise this route to the Internet community; all routers in the network belong to it.
  • 38. Fig :2Fig :1 Figure 1: BGP no-export Community Attribute illustrates the no-export community. AS 1 advertises 172.16.1.0 to AS 2 with the community attribute no-export. AS 2 will propagate the route throughout AS 2 but will not send this route to AS 3 or any other external AS. Figure 2: BGP no-advertise Community Attribute, AS 1 advertises 172.16.1.0 to AS 2 with the community attribute no-advertise. Router B in AS 2 will not advertise this route to any other router.
  • 39. Figure: BGP internet Community Attribute demonstrates the internet community attribute. There are no limitations to the scope of the route advertisement from AS 1.
  • 40. BGP Path Selection BGP could possibly receive multiple advertisements for the same route from multiple sources. BGP selects only one path as the best path. When the path is selected, BGP puts the selected path in the IP routing table and propagates the path to its neighbors. BGP uses the following criteria, in the order presented, to select a path for a destination:  If the path specifies a next hop that is inaccessible, drop the update.  Prefer the path with the largest weight.  If the weights are the same, prefer the path with the largest local preference.  If the local preferences are the same, prefer the path that was originated by BGP running on this router.  If no route was originated, prefer the route that has the shortest AS_path.  If all paths have the same AS_path length, prefer the path with the lowest origin type (where IGP is lower than EGP, and EGP is lower than incomplete).  If the origin codes are the same, prefer the path with the lowest MED attribute.  If the paths have the same MED, prefer the external path over the internal path.  If the paths are still the same, prefer the path through the closest IGP neighbor.  Prefer the path with the lowest IP address, as specified by the BGP router ID.
  • 41. IBGP vs EBGP • When BGP is running inside an AS, it is referred to as Internal BGP (IBGP). – If a BGP router’s role is to route IBGP traffic, it is called a transit router. • When BGP runs between autonomous systems, it is called External BGP (EBGP). – Routers that sit on the boundary of an AS and use EBGP to exchange information with the ISP are called border routers. AS 100 AS 200 Vail Aspen Taos 192.168.100.0/24 192.168.200.0/24 192.168.1.216/30 192.168.1.226/30 192.168.1.225/30 192.168.1.221/30 192.168.1.222/30 192.168.1.224/30 192.168.1.220/30 EBGP IBGP …
  • 42.  Routers A and B are running EBGP (BGP), and Routers B and C are running IBGP.  Note that the EBGP (BGP) peers are directly connected and that the IBGP peers are not. (They can be.)  As long as there is an IGP running that allows the two neighbors to reach one another, IBGP peers do not have to be directly connected.
  • 43.  All BGP speakers within an AS must establish a peer relationship with each other, that is, the BGP speakers within an AS must be fully meshed logically. (later)  BGP4 provides two techniques that alleviate the requirement for a logical full mesh: confederations and route reflectors. (later)  AS 200 is a transit AS for AS 100 and AS 300---that is, AS 200 is used to transfer packets between AS 100 and AS 300.
  • 44. BGP Configuration • To begin configuring a BGP process, issue the following familiar command: Router(config)#router bgp AS-number • BGP configuration commands appear on the surface to mirror the syntax of familiar IGP (for example, RIP, OSPF) commands. • Although the syntax is similar, the function of these commands is significantly different. • Note: Cisco IOS permits only one BGP process to run at a time, thus, a router cannot belong to more than one AS.
  • 45. Router(config-router)#network network-number [mask network- mask] • The network command is used with IGPs, such as RIP, to determine the interfaces on which to send and receive updates, as well as which directly connected networks to advertise. • However, when configuring BGP, the network command does not affect what interfaces BGP runs on. • In BGP, the network command tells the BGP process what locally learned networks to advertise. . BGP Configuration
  • 46. • These networks must also exist in the local router’s routing table (show ip route), or they will not be sent out in updates. • You can use the mask keyword with the network command to specify individual subnets. • Routes learned by the BGP process are propagated by default, but are often filtered by a routing policy. BGP Configuration
  • 47. Router(config-router)#neighbor ip-address remote-as AS- number • In order for a BGP router to establish a neighbor relationship with another BGP router, you must issue the this configuration command. • This command serves to identify a peer router with which the local router will establish a session. • The AS-number argument determines whether the neighbor router is an EBGP or an IBGP neighbor. BGP Configuration
  • 48. BGP Configuration • If the AS-number configured in the router bgp command is identical to the AS-number configured in the neighbor statement, BGP will initiate an internal session - IBGP. • If the field values are different, BGP will build an external session - EBGP.
  • 49. EBGP RTA(config)#router bgp 100 RTA(config-router)#neighbor 10.1.1.1 remote-as 200 RTB(config)#router bgp 200 RTB(config-router)#neighbor 10.1.1.2 remote-as 100 • RTB: Note that the neighbor command’s remote-as value, 100, is different from the AS number specified by the router bgp command (200). • Because the two AS numbers are different, BGP will start an EBGP connection with RTA. • Communication will occur between autonomous systems.
  • 50. IBGP RTB(config)#router bgp 200 RTB(config-router)#neighbor 172.16.1.2 remote-as 200 RTB(config-router)#neighbor 172.16.1.2 update-source loopback 0 RTC(config)#router bgp 200 RTC(config-router)#neighbor 172.16.1.1 remote-as 200 RTC(config-router)#neighbor 172.16.1.1 update-source loopback 0 • Since the remote-as value (200) is the same as RTB’s BGP AS number, BGP recognizes that this connection will occur within AS 200, so it attempts to establish an IBGP session. • In reality, AS 200 is not a remote AS at all; it is the local AS, since both routers live there. But for simplicity, the keyword remote-as is used when configuring both EBGP and IBGP sessions.
  • 51. RTB(config-router)#neighbor 172.16.1.2 update-source loopback 0 RTC(config-router)#neighbor 172.16.1.1 update-source loopback 0 • The update-source loopback 0 command is used to instruct the router to use any operational interface for TCP connections (as long as Lo0 is up and configured with an IP address). • Without the update-source loopback 0 command, BGP routers can use only the closest IP interface to the peer. • The ability to use any operational interface provides BGP with robustness in the event the link to the closet interface fails. – Since EBGP sessions are typically point-to-point, there is no need to use this command with EBGP.
  • 52. • Assume the following route appears in RTB’s table: 0 192.168.1.0/24 [110/74] via 10.2.2.1, 00:31:34, Serial2 • RTB learned this route via an IGP, in this case, OSPF. • This AS uses OSPF internally to exchange route information. • Can RTB advertise this network via BGP? • Certainly, redistributing OSPF into BGP will do the trick, but the BGP network command will do the same thing.
  • 53. RTB(config)#router bgp 200 RTB(config-router)#network 172.16.1.0 mask 255.255.255.254 RTB(config-router)#network 10.1.1.0 mask 255.255.255.254 RTB(config-router)#network 192.168.1.0 • The first two network commands in include the mask keyword, so that only a particular subnet is specified. • The third network command results in the OSPF route being advertised by BGP without redistribution. • Remember that the BGP network command works differently than the IGP network command!
  • 54. • EBGP peers must be directly connected, but there are certain exceptions to this requirement. • In contrast, IBGP peers merely require TCP/IP connectivity within the same AS. – As long as RTY can communicate with RTW using TCP, both routers can establish an IBGP session. – If needed, an IGP such as OSPF can provide IBGP peers with routes to each other. EBGP vs IBGP
  • 55. EBGP • EBGP neighbors must be directly connected in order to establish an EBGP session. • However, EBGP multihop is a Cisco IOS option allows RTW and RTU to be logically connected in an EBGP session, despite the fact that RTV does not support BGP. • The EBGP multihop option is configured on each peer with the following command: Router(config-router)#neighbor IP-address ebgp-multihop [hops] EBGP Multihop EBGP Multihop I do not speak BGP. But RTW and RTU can use EBGP multihop to speak BGP.
  • 56. EBGP EBGP Multihop EBGP Multihop I do not speak BGP. But RTW and RTU can use EBGP multihop to speak BGP.
  • 57. EBGP Multihop RTW(config)#router bgp 200 RTW(config-router)#neighbor 1.1.1.2 remote-as 300 RTW(config-router)#neighbor 1.1.1.2 ebgp-multihop 2 AS200 AS300 1.1.1.1 1.1.1.2 RTU(config)#router bgp 300 RTU(config-router)#neighbor 1.1.1.1 remote-as 200 RTU(config-router)#neighbor 1.1.1.1 ebgp-multihop 2
  • 58. BGP Configuration • Finally, whenever you are configuring BGP, you will notice that changes you make to an existing configuration may not appear immediately. • To force BGP to clear its table and reset BGP sessions, use the clear ip bgp command. The easiest way to enter this command is as follows: Router#clear ip bgp * Router#clear ip bgp 10.0.0.0 Use this command with CAUTION, better yet, not at all, in a production network. From the net… • “clear ip bgp *
  • 59. Verifying BGP Configuration • If the router has not installed the BGP routes you expect, you can use the show ip bgp command to verify that BGP has learned these routes. RTA#show ip bgp BGP table version is 3, local router ID is 10.2.2.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * i1.0.0.0 192.168.1.6 0 100 0 200 400 e *>i10.1.1.1/32 10.1.1.1 0 100 0 i *>i172.16.1.0/24 10.1.1.1 0 100 0 i * i192.168.1.32/27 192.168.1.6 0 100 0 200 i
  • 60. Verifying BGP Configuration • If an expected BGP route does not appear in the BGP table, you can use the show ip bgp neighbors command to verify that your router has established a BGP connection with its neighbors. RTA#show ip bgp neighbors BGP neighbor is 172.24.1.18, remote AS 200, external link BGP version 4, remote router ID 172.16.1.1 BGP state = Established, up for 00:03:25 Last read 00:00:25, hold time is 180, keepalive interval is 60 seconds Neighbor capabilities: Route refresh: advertised and received Address family IPv4 Unicast: advertised and received Received 7 messages, 0 notifications, 0 in queue Sent 8 messages, 0 notifications, 0 in queue Route refresh request: received 0, sent 0 Minimum time between advertisement runs is 30 seconds <output omitted>
  • 64. • RouterC#show ip bgp • BGP table version is 8, local router ID is 200.200.200.66 • Status codes: s suppressed, d damped, h history, * valid, > best, i - internal • Origin codes: i - IGP, e - EGP, ? - incomplete • Network Next Hop Metric LocPrf Weight Path • *> 11.0.0.0 0.0.0.0 0 32768 i • *> 12.0.0.0 200.200.200.65 0 300 200 i • *> 192.10.2.0 200.200.200.65 0 0 300 i • BGP table version - Internal version number of the table. This number is incremented whenever the table changes. • local router ID - IP address of the router. • Status codes - Status of the table entry. The status is displayed at the beginning of each line in the table. It can be one of the following values: s —The table entry is suppressed. * —The table entry is valid. > —The table entry is the best entry to use for that network. i —The table entry was learned via an internal BGP (iBGP) session show ip bgp