0% found this document useful (0 votes)
28 views4 pages

BGP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

BGP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

BGP (Border Gateway Protocol)

Overview

 Type: Path vector protocol, used for inter-domain (inter-AS) routing.


 Purpose: Designed to exchange routing information between different
autonomous systems (AS) on the Internet.
 RFC: BGP is defined in several RFCs, with the primary one being RFC 4271
for BGP-4.

Key Features

1. Inter-Domain Routing: BGP is used to connect different networks on the


Internet, allowing for policy-based routing.
2. Scalability: BGP is designed to handle a large number of routes efficiently,
making it suitable for the global Internet.
3. Path Vector Protocol: BGP maintains the path information that gets updated
dynamically as the network topology changes, which helps to prevent routing
loops.
4. Policy-Based Routing: BGP allows administrators to define routing policies
based on various attributes, enabling control over route selection and
advertisement.
5. Reliable Transport: BGP runs over TCP, which ensures reliable delivery of
routing information.
6. Multihoming Support: BGP supports connections to multiple ISPs for
redundancy and load balancing.
7. Support for Classless Inter-Domain Routing (CIDR): BGP can advertise IP
prefixes of variable lengths, allowing for more efficient use of IP address
space.

BGP Operation

1. Establishing Sessions:
o BGP peers (neighbors) establish a TCP connection on port 179.
o The BGP session goes through several states: Idle, Connect,
OpenSent, OpenConfirm, Established.
o Only in the Established state can BGP peers exchange routing
information.
2. Route Advertisement:
o BGP routers advertise routes to their neighbors using UPDATE
messages.
o These messages can contain new routes, withdrawals of routes, and
path attributes.
3. Keepalive Messages:
o BGP sends periodic keepalive messages to maintain the session and
check the status of the connection.

BGP Attributes
BGP routes are associated with various attributes that influence routing decisions.
The main attributes include:

1. AS Path: A list of ASes that the route has traversed. It helps prevent routing
loops.
2. Next Hop: The IP address of the next hop to reach the destination.
3. Local Preference: Indicates the preferred path for outbound traffic. Higher
values are preferred.
4. Multi-Exit Discriminator (MED): Suggests the preferred path into an AS from
a neighboring AS. Lower values are preferred.
5. Origin: Indicates how the route was learned. Possible values include:
o IGP (Interior Gateway Protocol)
o EGP (Exterior Gateway Protocol)
o Incomplete (learned via another mechanism)
6. Community: A way to group routes and apply routing policies to multiple
prefixes simultaneously.

Route Selection Process

When BGP receives multiple routes to the same destination, it follows a specific
decision process to select the best route:

1. Highest Local Preference: Prefer the route with the highest Local Preference
attribute.
2. Shortest AS Path: Prefer the route with the shortest AS Path.
3. Lowest Origin Type: Prefer IGP over EGP, and EGP over Incomplete.
4. Lowest Multi-Exit Discriminator (MED): Prefer routes with the lowest MED
value.
5. eBGP over iBGP: Prefer routes learned via eBGP over those learned via
iBGP.
6. Lowest IGP Metric to the Next Hop: If all other criteria are equal, prefer the
route with the lowest IGP metric to the next hop.
7. BGP Router ID: In case of ties, the BGP router ID is used as a tiebreaker.
8. External vs. Internal: eBGP routes are preferred over iBGP routes.

BGP Configuration Example

1. Basic Configuration:

router bgp 65001


neighbor 192.168.1.1 remote-as 65002
network 10.0.0.0 mask 255.255.255.0

2. Configuring Local Preference:

route-map set-localpref permit 10


set local-preference 200
exit
neighbor 192.168.1.1 route-map set-localpref out

3. Configuring MED:
route-map set-med permit 10
set metric 100
exit
neighbor 192.168.1.1 route-map set-med out

4. Configuring BGP Communities:

route-map set-community permit 10


set community 65001:100
exit
neighbor 192.168.1.1 route-map set-community out

5. Viewing BGP Information:


o To view BGP neighbors:

show ip bgp neighbors

o To view the BGP routing table:

show ip bgp

6. Viewing BGP Summary:

show ip bgp summary

Advanced BGP Features

1. BGP Route Reflectors:


o Allows BGP routers to share routing information without requiring a full
mesh of iBGP connections, reducing the number of peerings.
2. BGP Confederations:
o Breaks a large AS into smaller sub-ASes to reduce complexity while
maintaining a single AS number externally.
3. BGP Flap Damping:
o A mechanism to minimize the impact of unstable routes by suppressing
route advertisements temporarily when flapping occurs.
4. Route Aggregation:
o Combines multiple IP prefixes into a single, summarized route,
reducing the size of the routing table.
5. BGP Security:
o Use of MD5 authentication for BGP sessions to prevent unauthorized
access.
o Route filtering to control the advertisement and acceptance of routes.

Troubleshooting BGP

1. Check BGP Neighbors:

show ip bgp neighbors

2. Check BGP Routes:


show ip bgp

3. Check BGP Summary:

show ip bgp summary

4. Check BGP State Changes:

debug ip bgp

5. Check BGP Updates:

debug bgp updates

BGP Best Practices

1. Plan for Scalability: As networks grow, ensure that BGP configurations can
handle increased route counts.
2. Implement Route Filtering: Use prefix lists and route maps to control which
routes are advertised and accepted.
3. Monitor BGP Sessions: Regularly check the health of BGP sessions to
ensure stable routing.
4. Secure BGP Sessions: Use MD5 authentication and prefix filtering to
enhance security.
5. Document Configurations: Keep detailed documentation of BGP
configurations and policies for future reference.

Conclusion

BGP is a critical protocol for inter-domain routing on the Internet. Its policy-based
routing capabilities, along with support for various attributes and features, make it
highly flexible and powerful for managing routing decisions across autonomous
systems. Understanding BGP's operational mechanics, configuration, and
troubleshooting methods is essential for network professionals.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy