JIR - Chapter 5: BGP Flashcards
What are the six BGP neighbor states?
V2-5-7
- Idle
- Connect
- Active
- OpenSent
- OpenConfirm
- Established
What are the five BGP message types and how big is the fixed header size?
(V2-5-9)
- Open
- Update
- Keepalive
- Notification message
- Refresh
Each BGP message type uses the same fix header size which is 19 bytes.
What happens when a BGP neighbor goes down?
V2-5-10
The BGP speaker deletes all routes learned from that peer and updates its other peers accordingly.
Define the Update message type:
V2-5-9
BGP uses update messages to transport routing information between BGP peers.
Define the Open message type:
V2-5-9
The Open message is sent once the TCP three-way handshake is complete. The open message initiates the BGP session and contains details about the BGP neighbor and information about supported and negotiated options.
Define the Keepalive message type:
V2-5-9
Peers exchange keepalives as often as needed to ensure that the hold timer does not expire.
Define the Notification message type:
V2-5-9
BGP uses Notification messages to signal when something is wrong with the BGP session. A notification is sent when an unsupported option is sent in an Open message and when a peer fails to send an update or keepalive. When an error is detected, the BGP session is closed.
Define the Refresh message type:
V2-5-9
Normally a BGP speaker can’t be made to re-advertise routes that have already been sent and acknowledged (using TCP). The route refresh message supports soft-clearing of BGP sessions by allowing a peer to re-advertise routes that have already been sent.
List and describe the four BGP attribute classes defined in RFC-1771
(V2-5-17)
- Well-known mandatory: Must be supported by all BGP implementations and must be included in every BGP update.
- Well-known discretionary: Must be supported by all BGP implementations but does not have to be included in every BGP update.
- Optional transitive: Not required to be supported by all BGP implementations, but if they are, they should be passed along, unchanged, to other BGP peers.
- Optional nontransitive: Not required to be supported by all BGP implementations. If an optional nontransitive attribute is un recognized, it is ignored and not passed down to other peers.
List the ten BGP attributes and their associated attribute class:
(V2-5-17)
- AS Path / well-known mandatory
- Local Preference / well-known mandatory
- MED / Optional nontransitive
- Origin / well-known mandatory
- Next Hop / well-known mandatory
- Community / Optional transitive
- Aggregator / Optional transitive
- Atomic Aggregator / Well-known discretionary
- Cluster List / Optional nontransitive
- Originator ID / Optional nontransitive
Describe the “Next Hop” BGP attribute
V2-5-19
- The Next-hop attribute is an IP address of a BGP peer.
- It is used to verify connectivity of a remote BGP peer.
- A BGP peer can be an immediately connected host or remote host.
- The IP address specified in the next-hop field must be reachable by the local router before the route becomes active in the routing table
- By default, the router that originally sourced the route into BGP places its peer address into the attribute field; the next-hop value is then typically changed when the route is transmitted across EBGP links.
- BGP routes for which the next-hop is not reachable are placed into the routing table as hidden routes.
What is the command to view hidden routes?
> show route hidden
Describe the “Local-preference” attribute
V2-5-20
- You can use the local-preference attribute to direct all outbound traffic through a specific peer.
- The designated peer sets the local-preference value on all routes received to control how all routes leave the AS, then all peers use those routes in their RIB-Local tables.
- The default value is 100; the higher the value the better the metric
- JunOS allows you to set the local-preference value using BGP configuration or through routing policy; if you configure both, the system will use routing policy.
Describe the “AS Path” attribute
V2-5-22
- The AS Path attribute describes the path of autonomous systems the route has been through since it was sourced into BGP.
- When a router receives routes in an Update message, the first action is to examine the current AS Path to see if the local AS number is in the path. If it’s in the path, it indicates the route has been through the AS already; accepting it would create a loop, therefor BGP drops the route.
- By default, the AS-path value is changed as a route transitions between autonomous systems.
- The AS-path value is null until the associated route is advertised out of the originating system.
- Using routing policy you can prepend your ANS information to the AS-Path attribute; by doing this multiple times you can affect the routing decision made by other routers in other ASs and discourage them from using that path because of the longer AS-Path.
Describe the “Origin” attribute
V2-5-23
- The BGP router that injects the route into the BGP process is responsible for placing the Origin attribute into the route; this attribute describes where the original router received the route:
- IGP: BGP assigns a value of 0. Examples of IGP routes include OSPF, IS-IS, static, and aggregate
- EGP: BGP assigns a value of 1. EGP routes are from the original EGP protocol which was the predecessor to BGP.
- Incomplete: BGP assigns a value of 2. These are routes that did not come from IGP or EGP.
- By default, JunOS assigns all routes injected into BGP an origin value of “I” for IGP; you can alter this default value using routing policy.
Describe the “MED” attribute
V2-5-24
- By default, BGP uses the Multiple Exit Discriminator (MED) value only when the BGP’s router AS has two or more connections to the same upstream AS.
- An AS uses the MED value in an attempt to influence data traffic headed back towards the AS.
- The remote AS picks routes based on the lowest MED values it finds.
- BGP assumes the MED value to be 0 if its missing.
-
What commands can configure a BGP MED metric?
V2-5-24
- You can use the “metric-out” statement at the BGP protocol, group, or neighbor level.
- You can define and apply a routing policy that alters the MED value using “metric” as an action in the “then” statement.
Describe the “Community” attribute
V2-5-25
- A BGP identifier is an identifier that represents a group of destination prefixes that share a common property.
- Communities are used to tag specific routes that can be easily identified later for various purposes.
- BGP includes Community attributes as a path attribute in BGP update messages.
Under what hierarchy do you define BGP Communities?
V2-5-25
[edit policy-options]
List the BGP route selection process in order (9 steps):
V2-5-26
The route preference is evaluated (if multiple routes to the same prefix exists, the lower route preference is preferred).
- Prefer the HIGHEST “local preference” router (the only choice based on a higher vs. lower number).
- Prefer the shortest AS-Path length. This is often a common tiebreaker for routes.
- Prefer the lowest “Origin” value (I [IGP] < E [EGP] < ? [incomplete])
- Prefer the lowest “MED” value. The absence of a MED value is interpreted as 0.
- Prefer routes learned from an EBGP peer over an IBGP peer. If all remaining routes were learned from EBGP the router skips to Step 9.
- Prefer best exit from AS
- Prefer routes from the peer with the lowest RID.
- Prefer paths with lowest cluster length
- The router prefers routes from the router with the lowest peer-ID