bgp short
bgp short
bgp short
AS:
An autonomous system (AS) is a collection of connected Peer:
prefixes under the control of one or more network operators. internal peer – iBGP;
Each AS is assigned an autonomous system number (ASN), external peer: eBGP;
for use in Border Gateway Protocol (BGP) routing. prefix: address with mask
Single homed: you are connected to a single ISP using a single link.
Dual homed: you are connected to a single ISP using dual links.
Single multi-homed: you are connected to two ISPs using single links.
Dual multi-homed: you are connected to two ISPs using dual links
BGP Message:
OPEN - is used to set up and establish BGP neighbor adjacency.
BGP Version Number latest v4 - has to be the same
AS Number;
Hold Time default Cisco 180s, lower value is prefer; min =3; to disable - keepalive=0;
KEEPALIVE - messages ensure that BGP neighbors are still alive, default time = 60 (180/3)
NOTIFICATION - messages will be sent if errors are detected in the BGP session
UPDATE - messages are used for advertising and exchanging routing information between BGP
neighbors.
Attributes:
Well-known mandatory:Recognized by all BGP peers, passed to all peers, and present in all
Update messages. Includes:
Next-hop – Origin – AS PATH
Well-known discretionary: Recognized by all routers, passed to all peers, and optionally included
in the Update message.
Local Preference and Atomic Aggregate
Optional transitive:Possibly recognized by BGP routers and passed to BGP peers. Optional
transitive attributes are marked as partial when not recognized.
include:- Aggregator- Community
Optional non-transitive:Possibly recognized by BGP routers but not passed to peers. Optional
non-transitive attributes include:- Multi-exit discriminator (MED)- Originator ID- Cluster-ID
AS_PATH attribute represents the list of the AS the prefix has crossed. Each AS is added in front of
the current AS PATH.
ORIGIN: record where a prefix came from. (EGP/IGP/Incvomplete)
NEXT-HOP: indicates the IPv4 address of the BGP router that is the next-hop to reach the IPv4
prefixes
LOCAL_PREF attribute is a well-known attribute that should be included in every route advertised
to an IBGP or confederation-EBGP peer.
Best path:
1. Prefer the path with the highest WEIGHT.
2. Prefer the path with the highest LOCAL_PREF.
3. Prefer the path that was locally originated via a network or aggregate BGP subcommand or
through redistribution from an IGP.
Local paths that are sourced by the network or redistribute commands are preferred over local
aggregates that are sourced by the aggregate-address command.
4. Prefer the path with the shortest AS_PATH.
5. Prefer the path with the lowest origin type.
6. Prefer the path with the lowest multi-exit discriminator (MED).
7. Prefer eBGP over iBGP paths.
R1(config)#router bgp 1
R1(config-router)#neighbor 11.0.0.2 remote-as 2
R1(config-router)#network 1.1.1.0 mask 255.255.255.0
R2(config)#router bgp 2
R2(config-router)#neighbor 11.0.0.1 remote-as 1