Border Gateway Protocol (BGP) Questions and Answers
1. What is Border Gateway Protocol (BGP)?
Answer: BGP is a protocol used to advertise, learn, and select the best paths across the global Internet. It enables:
- ISPs to exchange routing information when connected.
- Enterprises to learn Internet routes from ISPs and influence traffic paths using BGP when multiple Internet connections exist.
2. Can routers on different subnets become BGP neighbors?
Answer: Yes, BGP does not require neighbors to be on the same subnet. It uses TCP connections to exchange messages, allowing neighbors to be on the same or different subnets.
3. What TCP port number does BGP use for connection?
Answer: BGP uses TCP port 179.
4. What is the difference between eBGP and iBGP neighbors?
Answer:
- iBGP: Neighborship is within the same Autonomous System (AS).
- eBGP: Neighborship is between different AS.
5. What Administrative Distance (AD) does BGP use?
Answer:
- AD for iBGP: 200
- AD for eBGP: 20
6. Explain the loop prevention mechanism in BGP.
Answer: BGP uses two methods to prevent loops:
- iBGP Rule: Routes learned from one iBGP peer are not advertised to another iBGP peer.
- AS_PATH: BGP adds its ASN to the AS_PATH when advertising to eBGP peers. If a router sees its own ASN in the AS_PATH, it discards the route.
7. Does BGP require a 3-way handshake for communication?
Answer: Yes, BGP requires a TCP 3-way handshake for establishing communication.
8. What is the difference between hard reset and soft reset in BGP?
Answer:
- Hard Reset: Tears down the BGP neighborship and clears all routes. Command: clear ip bgp *
- Soft Reset: Refreshes the BGP table without disconnecting the neighborship. Command: clear ip bgp * soft
9. What are the different BGP message types?
Answer:
- Open: Establishes a neighbor relationship and exchanges parameters.
- Keepalive: Maintains the neighbor relationship.
- Update: Exchanges Path Attributes and associated prefixes (NLRI).
- Notification: Reports errors and resets the neighbor relationship.
10. Explain the various states of BGP.
Answer:
- Idle: Waiting for the next retry attempt.
- Connect: Waiting for the TCP connection to complete.
- Active: Retries the TCP handshake.
- Opensent: Open message sent; waiting for a response.
- Openconfirm: Open messages exchanged; awaiting Keepalive/Notification.
- Established: Neighbor parameters matched; Update messages can be exchanged.
11. Which layer does BGP work on?
Answer: BGP operates at the Application Layer (Layer 7) of the OSI model.
12. What is the difference between eBGP multihop and TTL security?
Answer:
- eBGP Multihop: Allows BGP neighborship between routers multiple hops away.
- TTL Security: Checks the TTL value to protect against unauthorized BGP connections.
13. How do you configure BGP?
Answer: Basic configuration example:
router bgp <as-number> neighbor <ip-address> remote-as <remote-as-number>
Example:
R1(config)# router bgp 100 R1(config-router)# neighbor 10.0.0.2 remote-as 200
14. How do you configure BGP with a loopback address?
Answer: Configuration example:
R1(config)# interface Loopback0 R1(config-if)# ip address 1.1.1.1 255.255.255.255 R1(config)# router bgp 100 R1(config-router)# neighbor 2.2.2.2 remote-as 200 R1(config-router)# neighbor 2.2.2.2 update-source Loopback0 R1(config)# ip route 2.2.2.2 255.255.255.255 10.0.0.2
15. What is the order of preference of attributes in BGP?
Answer:
- Highest weight (Cisco proprietary)
- Highest LOCAL_PREF
- Shortest AS_PATH
- Lowest MED
- eBGP over iBGP
- Lowest IGP cost to the next hop
- Lowest router ID
Let me know if you need further explanations or additional questions!
BGP interview Questions and Answers
First file
Second file
Third file
Download Product Specs
Only you can see this. To display the widget on your site, open the Settings Panel & open the Dashboard to upload files for the desired products.