Uses public or private AS numbers. Note: [reserved-asn]
| Range | Description |
|---|---|
| 1-64495 | Public |
| 64496-65511 | Reserved for use in Documentation |
| 65512-65534 | Reserved for private use (like RFC 1918 IP addresses) |
Uses tcp/179 for reliability
Used in three major configuration options: default routes, partial updates, full updates.
Used to provide outbound and inbound high availability for internet connectivity.
Defaults to use AS_Path as metric, so the route with less AS_Paths (Hops) wins.
iBGP is used internally (same ASN)
eBGP is used with external partners, providers (different ASN)
neighbor ipaddr password pass)| BGP Router ID | 32 Bit Identifier, dotted-decimal notation Configured: bgp router-id RID Highest Loopback: Use highest numeric IP address of up/up loopback interface Highest other interface: Use highest numeric IP address of up/up interface |
|---|---|
| MD5 Authentication | Must be configured on none or both routers, passwords must match |
| TCP | Routers create a TCP connection before exchanging BGP messages. IOS, by default, picks the IP address of the outgoing interface as a source address for the TCP connection. If there are multiple paths to reach a neighbor (2x T1 to same ISP) BGP could be configured twice, using each interface’s IP Address or one could configure BGP to use a loopback address as source address for any given neighbor. |
| State | Reason |
|---|---|
| Idle | BGP process is either administratively down or awaiting the next retry attempt |
| Connect | Waiting for the TCP connection to be completed |
| Active | TCP connection established, no BGP messages sent |
| Opensent | BGP Open Message has been sent, but no matching Open Massage has been received yet |
| Openconfirm | Open Massages sent and received. Waiting for BGP Keepalive (all Neighbor parameters match) or BGP Notification (to learn there is some mismatch in neighbor parameters) |
| Established | All neighbor parameters match, relationship works, peers can now exchange BGP Update messages |
Unlike other routing protocols the network command is not used to enable bgp on a specified interface, the network command is only used to inject routes into the bgp process.
Another possibility to get networks into bgp is to used redistribution, even though it might not be very useful to fully redistribute a IGP into BGP. Redistribute connected can be used instead.
Summarizes network to class full boundaries.
Auto-Summary turned off by default from 12.2(8)T and newer
Turn it off for earlier versions: (config-router)#no auto-summary
BGP does not use or advertise a route learned from iBGP until that route has also been learned from an internal routing protocol (try to prevent network blackholes)
Is turned off by default from 12.2(8)T and newer
Turn it off in earlier versions: (config-router)#no synchronization
For eBGP peers: Change the next hop address
For iBGP peers: Don’t change the next hop address
Update next hop addresses for routes advertised to this neighbor: (config-router)#neighbor x.x.x.x next-hop-self
There are five Types of BGP Attributes
| Well Known | Supported by all vendors |
|---|---|
| Mandatory | Must be in every update |
| Discretionary | Optional |
| Transitive | Advertised to eBGP peers, so ‘travels’ between AS |
| Non-Transitive | Stay “local” to Autonomous Systems |
AS-Path
Next Hop Address
Origin
BGP has to find one (and only one) best route for every destination, so if routes tie the following Attributes are used to break the tie (ordered)
| N | Next Hop reachable? |
|---|---|
| W | Prefer higher Weight (Cisco, Default 0) |
| L | Prefer highest Local Preference (Default 100) |
| L | Prefer locally originated via network command |
| A | Prefer shortest AS_PATH length |
| O | Origin prefer I > E > ? |
| M | Prefer lowest metric/Multi Exit Discriminator |
| N | Neighbor type, prefer eBGP over iBGP |
| I | Prefer route with smaller IGP metric to next Hop |
Is local to the ROUTER!
!Set all routes received from this neighbor to 30
(config-router)#neighbor x.x.x.x weight 30
!Use a route map to set weight for specific routes
route-map set weight
Is local to the Autonomous System, if set on one router it is advertised into the local AS
!Set the default local_pref for this router to 200
(config-router)#bgp default local-preference 200
!Use a route map to set local_pref for specific routes
route-map set local-preference