Introduction
BGP is a standardized exterior gateway protocol (EGP), as
opposed to RIP, OSPF, and EIGRP which are interior gateway protocols
(IGP’s). BGP Version 4 (BGPv4) is the current standard deployment.
BGP is considered a “Path Vector” routing protocol. BGP was
not built to route within an Autonomous System (AS), but rather to route
between AS’s. BGP maintains a separate routing table based on shortest AS
Path and various other attributes, as opposed to IGP metrics like distance
or cost.
BGP is the routing protocol of choice on the Internet.
Essentially, the Internet is a collection of interconnected Autonomous
Systems.
BGP Autonomous Systems are assigned an Autonomous System
Number (ASN), which is a 16-bit number ranging from 1 – 65535. A specific
subset of this range, 64512 – 65535, has been reserved for private (or
internal) use.
BGP utilizes TCP for reliable transfer of its packets, on
port 179.
BGP Peers (Neighbors)
For BGP to function, BGP routers (called speakers) must form neighbor relationships (called peers).
There are two types of BGP neighbor relationships:
• iBGP Peers – BGP neighbors within the same autonomous system.
• eBGP Peers – BGP neighbors connecting separate autonomous systems.
Note: Do not confuse an IGP, such as OSPF, with iBGP!
By default, BGP assumes that eBGP peers are a maximum of one hop away. This restriction can be bypassed using the ebgp-multihop option with the neighbor command.
The Administrative Distance for routes learned outside the Autonomous System (eBGP routes) is 20, while the AD for iBGP and locally-originated routes is 200.
BGP Peers Messages
BGP forms its peer relationships through a series of messages.
1. First, an OPEN message is sent between peers to initiate the session. The OPEN message contains several parameters:
BGP Version – must be the same between BGP peers Local AS Number BGP Router ID
2. KEEPALIVE messages are sent periodically (every 60 seconds by default) to ensure that the remote peer is still available. If a router does not receive a KEEPALIVE from a peer for a Hold-time period (by default, 180 seconds), the router declares that peer dead.
3. UPDATE messages are used to exchange routes between peers.
4. Finally, NOTIFICATION messages are sent when there is a fatal error condition. If a NOTIFICATION message is sent, the BGP peer session is torn down and reset.
Configuring Neighbors:
RouterB(config)# router bgp 100
RouterB(config-router)# neighbor remote-as
RouterB(config-router)# neighbor 172.16.1.2 remote-as 900
For stability purposes, the source interface used to generate updates to a
particular neighbor can be specified:
RouterB(config)# router bgp 100
RouterB(config-router)# neighbor 172.16.1.2 update-source lo0
RouterC must then point to RouterB’s loopback (assume the address is
1.1.1.1/24) in its neighbor statement:
RouterC(config)# router bgp 900
RouterC(config-router)# neighbor 1.1.1.1 remote-as 100
RouterC must have a route to RouterB’s loopback in its routing table.
Remember though: by default, BGP assumes that external peers are exactly
one hop away. Using the loopback as a source interface puts RouterB two
hops away from RouterC. Thus, the ebgp-multihop feature must be enabled:
RouterC(config)# router bgp 900
RouterC(config-router)# neighbor 1.1.1.1 ebgp-multihop 2
The 2 indicates the number of hops to the eBGP peer. If left blank, the
default is 255.
To authenticate updates between two BGP peers:
RouterB(config)# router bgp 100
RouterB(config-router)# neighbor 172.16.1.2 password CISCO
Further Info :
http://www.routeralley.com/ra/docs/bgp.pdf
Configuring Neighbors:
RouterB(config)# router bgp 100
RouterB(config-router)# neighbor
RouterB(config-router)# neighbor 172.16.1.2 remote-as 900
For stability purposes, the source interface used to generate updates to a
particular neighbor can be specified:
RouterB(config)# router bgp 100
RouterB(config-router)# neighbor 172.16.1.2 update-source lo0
RouterC must then point to RouterB’s loopback (assume the address is
1.1.1.1/24) in its neighbor statement:
RouterC(config)# router bgp 900
RouterC(config-router)# neighbor 1.1.1.1 remote-as 100
RouterC must have a route to RouterB’s loopback in its routing table.
Remember though: by default, BGP assumes that external peers are exactly
one hop away. Using the loopback as a source interface puts RouterB two
hops away from RouterC. Thus, the ebgp-multihop feature must be enabled:
RouterC(config)# router bgp 900
RouterC(config-router)# neighbor 1.1.1.1 ebgp-multihop 2
The 2 indicates the number of hops to the eBGP peer. If left blank, the
default is 255.
To authenticate updates between two BGP peers:
RouterB(config)# router bgp 100
RouterB(config-router)# neighbor 172.16.1.2 password CISCO
Further Info :
http://www.routeralley.com/ra/docs/bgp.pdf
No comments:
Post a Comment