BGP Path Attributes - Netcerts
BGP Path Attributes - Netcerts
net
netcerts.net
Routing & Switching
Contact
▼ BGP (5)
Well- Known BGP Path Attributes fall into two sub-categories Recent Posts
known as
Exploring HTTP and PKI
1. Mandatory (Called as Well-known Mandatory)
Configuring Cisco router as a
2. Discretionary (Called as Well-Known Discretionary)
DHCP client
QoS Congestion Avoidance
Mandatory: This means the attribute must be always included and
CBWFQ and LLQ
carried in all BGP update messages to peers. The BGP
Custom Queuing and Priority
implementation has to recognize the attribute, accept it and also
Queuing
advertise it to its peers.
http://netcerts.net/bgppathattributesandthedecisionprocess/ 1/18
5/26/2017 BGP Path Attributes – netcerts.net
ORIGIN ATTRIBUTE:
As the name suggests the ORIGIN attribute specifies the origin of
the routing update. This is a Well-known Mandatory BGP Attribute
and hence has to be recognized and sent to peers by all BGP
implementations. The Origin attribute can contain one of these
three values
1. IGP
2. EGP
3. Incomplete
IGP: It means that the NLRI was learnt from an internal routing
protocol of the originating AS.
EGP: This ORIGIN code specifies that the NLRI was learnt from
EGP.
Incomplete: Usually misunderstood, this value means that the
NLRI was learnt from some other means, it does not mean that the
route is faulty, it only specifies that the information to determine
the ORIGIN is not complete. All redistributed routes into BGP
have an Incomplete ORIGIN attribute, since the origin of these
routes cannot be determined.
http://netcerts.net/bgppathattributesandthedecisionprocess/ 3/18
5/26/2017 BGP Path Attributes – netcerts.net
AS_PATH ATTRIBUTE:
http://netcerts.net/bgppathattributesandthedecisionprocess/ 4/18
5/26/2017 BGP Path Attributes – netcerts.net
Also, BGP Speaker will add its AS number to the AS_Path only
when an Update message is being sent to the neighbor which
means only when BGP is advertising the route to the peer it will
prepend its AS number to the AS_Path attribute.
http://netcerts.net/bgppathattributesandthedecisionprocess/ 5/18
5/26/2017 BGP Path Attributes – netcerts.net
NEXT_HOP ATTRIBUTE:
2. If the BGP peers are in the same AS (IBGP Peers), and the
destination network being advertised in the update message is also
in the same AS, then the NEXT_HOP IP address that will be sent in
the update message will be the IP address of the advertising
router.
3. If the BGP peers are in the same AS (IBGP Peers), and the
destination network being advertised in the update message is in
an external AS, then the NEXT_HOP IP address that will be sent in
the update message will be the IP address of the external peer
router which sent the advertisement to this AS.
http://netcerts.net/bgppathattributesandthedecisionprocess/ 6/18
5/26/2017 BGP Path Attributes – netcerts.net
In this
example,
the EBGP
update is
pretty
straight
forward.
As the
rule
states If
the BGP
Peers are
in
different
Autonomo
us
Systems
then the
NEXT_HO
P IP
address
that will be sent in the update message will be the IP address of
the advertising router.
http://netcerts.net/bgppathattributesandthedecisionprocess/ 7/18
5/26/2017 BGP Path Attributes – netcerts.net
NEXT
_HOP
addre
ss for
the
BGP
peers
in the
same
Auto
nomo
us Systems is the address of the advertising router which in this
case is RTR-A. Both RTR-A and RTR-C are IBGP Peers, When
RTR-A sends an update message indicating the reachabilty
information for network 10.10.10.0/24, it puts its own IP address in
the NEXT_HOP. For RTR-C to reach the network 10.10.10.0/24, it
will have the NEXT_HOP IP address of RTR-A and not RTR-B to
which it is directly connected.
http://netcerts.net/bgppathattributesandthedecisionprocess/ 8/18
5/26/2017 BGP Path Attributes – netcerts.net
RTR-C which is the IBGP peer of RTR-A, now knows to reach the
network 172.16.30.0/24 it has to use the next hop ip address of
172.16.10.1 (which is the ip address on router in AS-100).
This could cause an issue because RTR-C does not know how to
reach the address 172.16.10.1 and the packets for the destination
in 172.16.20.0/24 are dropped. The route 172.16.30.0/24 is
installed in BGP table but it is not installed in the IGP as the next
hop IP address specified is not reachable and is considered as an
invalid address. This issue can be resolved in one of the three ways.
1. Use static routes to link external addresses to internal routers,
not a very feasible solution to use.
2. Run IGP is passive mode on the external interfaces.
3. BGP implementation gives a more practical solution called as
“Next_Hop_Self” this when configured on the local RTR-A it will
cause RTR-A to set its own IP address in the NEXT_HOP attribute.
The internal peers RTR-B and RTR-C will now have a NEXT_HOP IP
address of 192.168.10.1 to reach the network 172.16.30.0/24 in
http://netcerts.net/bgppathattributesandthedecisionprocess/ 9/18
5/26/2017 BGP Path Attributes – netcerts.net
Note that the Local Preference will only affect the traffic leaving
the AS.
In this example, the customer is peering with two ISPs to get the
internet routing table, assuming that the connection to ISP-1 is a
Gig connection and the connection to ISP-2 is only a T1, the
customer wants to use ISP-1 and keep ISP-2 as a backup in case
the link to ISP-1 fails.
Assuming that both the ISPs are advertising the same destination
http://netcerts.net/bgppathattributesandthedecisionprocess/ 10/18
5/26/2017 BGP Path Attributes – netcerts.net
routes then RTR-C, the internal BGP Peer receives the routes from
both RTR-A and RTR-B and will select RTR-A because the
LOCAL_PREF value is higher on the routes advertised by RTR-A.
Also note that RTR-B will also prefer the routes advertised by ISP-
1 connected to RTR-A. that is all internal routers within the
customer AS in the diagram will now prefer Routes received from
ISP-1.
LOCAL_PREF affects the traffic leaving the AS, the traffic leaving
the Customer-AS in this example will prefer the routes from ISP1
to reach the destination networks. If there are any destination
routes that ISP2 is advertising which are not being advertised on
ISP1 for some reason, then traffic destined for those routes which
are missing in ISP1’s advertisements will leave from RTR-B to
ISP2 in order to reach those destinations network prefixes.
http://netcerts.net/bgppathattributesandthedecisionprocess/ 11/18
5/26/2017 BGP Path Attributes – netcerts.net
http://netcerts.net/bgppathattributesandthedecisionprocess/ 12/18
5/26/2017 BGP Path Attributes – netcerts.net
occurred.
AGGREGATOR:
AS_SET:
http://netcerts.net/bgppathattributesandthedecisionprocess/ 13/18
5/26/2017 BGP Path Attributes – netcerts.net
d
if
f
e
r
e
n
t
A
S
.
M
E
D
o
n
l
y
a
p
p
lies to the routes advertised by a single AS.
Also in this example the MED attribute will only take affect if AS-
200’s BGP implementation recognizes the MED attribute, or else
setting these MED attribute values on the routes for a preferred
entry point into AS will not have any affect.
Note: By default MED values are not compared for routes to the
same destination received from tw0 or more different autonomous
systems. There is however a way for enabling this by using the
command “bgp-always-comapre-med”. when this command is
used, MED values on the received routes for same destination from
different autonomous systems are compared. If this command is
configured then it needs to be configured on every BGP router in
the AS.
http://netcerts.net/bgppathattributesandthedecisionprocess/ 14/18
5/26/2017 BGP Path Attributes – netcerts.net
COMMUNITY ATTRIBUTE:
http://netcerts.net/bgppathattributesandthedecisionprocess/ 15/18
5/26/2017 BGP Path Attributes – netcerts.net
A route can carry more than one community attribute, and the BGP
peer that receives such a route with multiple community attributes
can act based on one, some or all of the community attributes. A
router can also add or modify the community attributes before
passing them to other BGP peers.
http://netcerts.net/bgppathattributesandthedecisionprocess/ 16/18
5/26/2017 BGP Path Attributes – netcerts.net
http://netcerts.net/bgppathattributesandthedecisionprocess/ 17/18
5/26/2017 BGP Path Attributes – netcerts.net
Leave A Reply
http://netcerts.net/bgppathattributesandthedecisionprocess/ 18/18