Feel Free to correct anything.
#BGP Study FAQ.
#General Knowledge Section.
Q: What is BGP
A: BGP is an InterDomain Routing Protocol also Known as an EGP.
Q: Which is the Current Version of BGP
A: BGP Version 4 (BGP4).
Q: What kind of routing Protocol is BGP
A: BGP is a policy based routing protocol.
Q: How is BGP called when it is running inside an AS.
A: iBGP (Internal BGP).
Q: How is BGP called when it is running between different ASs.
A: eBGP (External BGP).
Q: Which are the three common ways to achieved multihoming with BGP.
A: Default routes from ISP
A: Default route + partial routes from ISP.
A: Full routing table from ISPs.
Q: What does BGP uses as transport protocol
A: BGP Information is carried inside TCP segments using protocol 179.
Q: How often does BGP sends keepalive messages
A: by default every 60 seconds.
#BGP neighbor Establishment and neighbor States.
Q: Which are the Requirements for an eBGP neighbor relationship
A: Different ASs
A: Neighbor Definition (TCP session).
A: IP reachability.
Q: Which are the requirements for an iBGP neighbor relationship.
A: Same AS
A: Neighbor Definition (TCP Session).
A: IP Reachability.
Q: Do iBGP neighbors need to be directly connected
A: Routers running iBGP does not have to be directly connected as long as they
can reach each other and establish a TCP Session.
Q: Can BGP use Broadcast.
A: Because TCP cannot use broadcasting. BGP cannot use it either.
Q: Why do iBGP neighbors requires a full mesh relation.
A: Because each iBGP router needs to send routes to all the other iBGP neighbors in the same AS, and they cannot use broadcast, they must use fully meshed BGP (TCP) Sessions.
Q: Which are the BGP neighbor States
A: IDLE
A: CONNECT
A: ACTIVE
A: OPEN SENT
A: OPEN CONFIRM
A: ESTABLISHED
#Synchronization.
Q: What is BGP Sync
A: The BGP syn rule states that a BGP route should not use, or advertise to an external neighbor, a route learned by iBGP , unless that route is local or is learned from the IGP.
Q: When is necessary to enable sync
A: Syn should be enabled if there are router in the BGP transit path in the AS that are not running
BGP (and therefore do not have fullmesh iBGP within the AS).
#BGP Tables.
Q: Which tables do BGP uses.
A: BGP Table
A: BGP neighbor Table.
Q: Which is process is used to install routes in the routing table by BGP
A: After establishing an adjacency, the neighbors exchange their best BGP routes.And places them in the BGP forwarding Database.
A: The best routes from each network are selected from the BGP forwarding database using the BGP route-selection process and then are offered to the IP routing table.
#BGP Message Types.
Q: Which are the main BGP message types.
A:Open
A:Keepalive
A:Update
A:Notification
Q: Which are the components of a Open message
A: Version
A: AS
A: Holdtime
A: BGP router ID
A: Optional Parameters.
Q: What does a update message contains
A: An update message has information on one path only.multiple paths require multiple messages.
Q: Which are the fields of an update message.
A: Withdrawn routes
A: Path attributes
A: Network layer reachability Information (NLRI).
Q: When is an Notification message used
A: A BGP router sends a nofitication message when it detects an error condition.
A: The BGP router closes the BGP connection immediately after sending the
Notification message.
#BGP attributes.
Q: How are BGP attributes categorized
A: Well known or optional
A: mandatory or discretionary
A: Transitive or non transitive
A: partial.
Q: What is a well-known attribute
A: A well-known attribute is one that all BGP implementations must recognize and
propagate to BGP neighbors.
Q: Which are the types of well-known attributes
A: Well-known mandatory
A: Well-known discretionary
Q: Which are the Optional attributes
A: Attributes that are not well-known are called optional.
Q: Which are the types of optional attributes
A: Optional transitive
A: Optional Nontransitive
#ASPath Attribute.
Q: What is the AS-Path attribute
A: The AS-path attribute is the list of AS system numbers that a router has
traversed to reach a destination. With the number of the AS that originated the route at the end of the list.
#The Next-Hop Attribute
Q: What is the NextHop attribute
A: The BGP Next-Hop attribute is a well-known mandatory attribute that indicates the next-hop IP address that is to be used to each a destination.
Q: For eBGP which is the next hop IP address.
A: for eBGP, the next hop address is the IP address of the neighbor that sent the update.
Q: how is the next hop behaviour on iBGP
A: For iBGP, the protocol states that the next hop advertised by eBGP should be carried into iBGP.
A: The iBGP neighboring router performs a recursive lookup to find out how to reach the BGP next-hop address by using its IGP entries in the routing table.
Q: Which is the next hop behaviour on Multiaccess networks
A: When running BGP over multiaccess networks suc as Ethernet, a BGP router uses the appropriate address as the nexthop address (by changing the nexthop attribute) to avoid inserting additional hops into the path.
#Origin Attribute.
Q: What is the origin attribute.
A: The Origin is a well-known mandatory attribute that defines the origin of the path information.
Q: Which are the three values of the Origin attribute:
A: IGP: the route is interior to the originating AS this normally happens when a network command is used to advertise the route via BGP. Its indicated with an i in the bgp table.
A: EGP: the route is learned via EGP. this is indicated with an e in the BGP table.
A: Incomplete: the route`s origin is unknown or is learned via some other means. This usually occurs when a route is redistributed into BGP. An incomplete origin is indicated with a ? in the BGP table.
#Local Preference Attribute
Q: Which are the main characteristics of the Local preference Attribute.
A: Local Preference is a well-known discretionary attribute that indicates to routers in the AS which path is the preferred to exit the Autonomous System.
A: A path with a higher local preference is preferred.
A: The default value for local preference on a cisco router is 100.
#Community Attribute
Q: What is the community attribute
A: The community attribute is a transitive, optional attribute. The community attribute is a way to group destinations in a certain community and apply routing decisions according to those communities. The routing decisions are accept, prefer, redistribute, among others.
#MED Attribute
Q: What kind of attribute is MED.
A: also called the metric, is an optional nontransitive attribute.
Q: What does the MED does
A: The MED indicates to external neighbors the preferred path into an AS.
A: A lower metric value is preferred.
Q: Which is the difference between MED and local preference
A: MED influences inbound traffic to an AS, whereas local preference influences outbound traffic from an AS.
#Weight Attribute.
Q: What is the Weight attribute
A: The weight attribute is a Cisco Defined attribute used for path selection proccess. The weight attribute is configured locally and provides local routing policy only; it is not propagated to any BGP neighbors.
Q: Which are the main characteristics of the Weight attribute.
A: Routes with a higher weight are preferred when multiple routes to the same destination exist.
A: The weight can have a value from 0 to 65535
A: Path that the router originates have a weight of 32768 by default. and other paths have a weight of 0 by default.
#BGP Route-Selection Decision Process.
Q: On what is the BGP routeSelection Proccess based
A: The decision proccess is based on the attributes.
Q: Which condition makes a route to not be considered
A: A path is not considered if it is interal, sync is on, and the route is not synced, or if the path's nexthop address cannot be reached.
Q: How does BGP chooses the best route on a Cisco router
A: Weight
A: Local Pref
A: Originate (originate by the local router prefer).
A: AS
A: Origin (IGP/EGP/i=incomplete)
A: MED (lowest).
A: Paths (External over internals).
A: Router ID
#Other BGP features
#Route Reflection.
Q: What is Route reflection.
A: Another solution for the explosion of iBGP peering within an AS. an iBGP speaker does not advertise a route that the BGP speaker learned via another iBGP speaker to a third iBGP speaker. You can relax this restriction a bit and provide additional control, which allows a router to advertise, or reflect, iBGP learned routes to other iBGP speakers.
Q: What is a BGP cluster
A: The combination of the RR and the clients is a "cluster".
Q: How does BGP treats more than one RR on a AS.
A: In this situation, an RR treats other RRs just like any other iBGP speaker. Other RRs can belong to the same cluster (client group) or to other clusters.
Q: Which methods are used by RRs to avoid routing loops
A: originator-id
A: cluster-list.
Q: What is a cluster-list
A: A cluster list is a sequence of clusters IDs, that the route has passed.
Q: What is necessary to configure a cluster with multiple RRs
A: You need to configure all RRs in the same cluster with a 4byte cluster ID so that an RR can recognize updates from RRs in the same cluster.
#Confederation.
Q: What does confederation consists of ?
A: Confederation reduces the iBGP mesh inside an AS.
A: The trick is to divide an AS into multiple ASs and assign the whole group to a single confederation. Each AS alone has iBGP fully messhed and has connections to other ASs inside the confederation.
A: Even though these ASs have eBGP peers to ASs withing the confederation, the ASs exchange routing as if they used iBGP.
#Route Flap Dampening
Q: What is Route flap dampening.
A: Route dampening is a mechanism to minimize the instablility that route flapping causes.
Q: How does route flap dampening works
A: You define criteria to identify poorly behaved routes.
A: A route flap gets a penalty of 1000 for each flap.
A: As soon as the cumulative penalty reaches a predefined "supress limit" , supression of the route advertisement occurs.
A: The penalty decays exponentially based on a preconfigured "halflife time".
A: Once the penalty decreases below a predefined "reuse limit" , unsupression of the route advertisement occurs.
#BGP Configuration
# Configuring a Peer Group
Q: What is a peer group
A: Neighbors with the same update policies can be grouped into peer groups.
Q: Which commands are used to define a peer group.
A: Router(configrouter)#neighbor TEST peergroup
Q: Which command is used to assign a neighbor to a peer group
A: Router(configrouter)#neighbor 172.16.1.2 peergroup TEST
Q: Which command is used to reset all BGP connections for all members of a peergroup
A: Router#clear ip bgp peergroup TEST
#Neighbor Configuration.
Q: Which command is used to activate a BGP session
A: Router(configrouter)#neighbor 172.16.1.1 remoteas 65001
#Shutting Down a BGP neighbor
Q: Which command is used to disable (admin shutdown) an existing BGP neighbor or peer group.
A: Router(configrouter)#neighbor 172.16.1.2 shutdown
Q: Which command is used to enable a previously existing neighbor or peer group that had been disabled using the neighbor shutdown command.
A: Router(configrouter)#no neighbor 172.16.1.2 shutdown
#Source IP address Definition
Q: Which command is used to define the update-source interface
A: Router(configrouter)#neighbor 172.16.1.2 updatesource loopback0
#Neighbor Authentication
Q: Which command is used to enable MD5 authentication on a TCP connection between two BGP peers.
A: Router(configrouter)#neighbor 172.16.1.1 password 0 cisco
#Multihop
Q: Which command is used to configure eBGP multihop
A: Router(configrouter)#neighbor 172.16.1.2 ebgpmultihop 2
#Next Hop attribute manipulation
Q: Which command is used to change the nexthop attribute
A: Router(config-router)#neighbor 172.16.1.1 next-hop-self
#Network Advertisement
#Defining networks to be advertised
Q: Which are the two options available to advertise networks in BGP
A: Using the network command.
A: Redistribute routes from an IGP into BGP.
Q: Which is the syntax of the network command
A: Router(config)#router bgp 65001
Router(configrouter)#network 172.16.1.0 mask 255.255.255.0
#autosummary command
Q: What does the autosummary determines on a BGP configuration.
A: The BGP auto summary router config command determines how BGP handles redistributed routes.
Q: Which command is used to configure autosummary
A: Router(config-router)#autosummary
Router(config-router)#no autosummary
#Sync
Q: Which command is used to configure Synchronization.
A: Router(configrouter)#synchronization
Router(configrouter)#no synchronization
#Resetting BGP sessions.
Hard Reset
Soft Reset
Route Refresh
Q: Which command is used to hard reset a BGP session.
A:R Router#clear ip bgp *
Router#clear ip bgp 172.16.1.2
Q: Which command is used to soft reset a BGP session.
A: Router#clear ip bgp 172.16.1.2 soft out
Router#clear ip bgp 172.16.1.2 out
Q: Which are the two ways to perform a soft reset for inbound sessions.
A: Using Stored routing update information
A: Dynamically (route refresh).
Q: Which commands are used to reset inbound sessions using stored routing update info
A: Router(configrouter)#neighbor 172.16.1.2 soft-reconfiguration inbound
A: Router#clear ip bgp 172.16.1.2 soft in
Q: What is needed to configure a route refresh
A: THis new method requeres no preconfig
A: The clear ip bgp neighbor address soft in is the only command required.
Q: Which command is used to determine if a neighbor supports routerefresh
A: To determine whether a BGP router supports this route refresh capability, use the show ip bgp neighbor command.
A: The following message is displayed in the output when the router supports the route refresh capability: Received route refresh capability from peer.
#BGP show and debug commands
Q: Which command displays entries in the BGP topology database
A: show ip bgp
Q: Which command displays BGP routes that were not installed in the routing information base (RIB), and the reason that they were not installed
A: show ip bgp ribfailure
Q: which command displays detailed information about the TCP and BGP connections to neighbors
A: show ip bgp neighbor
Q: Which command displays the status of all BGP connections.
A: show ip bgp summary
Q: Which debug commands can be used to verify BGP operation
A: debug ip bgp
A: debug ip bgp dampening
A: debug ip bgp events
A: debug ip bgp keepalives
A: debug ip bgp updates.
#Troubleshooting BGP
Q: What does IDLE state indicates
A: The idle state indicates that the router does not know how to reach the IP address in the neighbor
statement.
Q: Which are the main reasons for this
A: It is waiting for a static route to that IP address or network to be configured
A: It is waiting for the local routing protocol (IGP) to learn about this network through an advertisement from another router.
Q: What does the Active state indicates
A: If the router is in the active state, this means that it has found the IP address in the neighbor statement an has sent out a BGP open packet , but has not received a response.
Q: Which are the common causes for this.
A: One common cause of this is when the neighbor does not have a return route to the source IP address.
A: another problem associated with the active state is when a BGP router attempts to peer with another BGP router that does not have a neighbor statement peering back at the first router.