Practice
Resources
Contests
Online IDE
New
Free Mock
Events New Scaler
Practice
Improve your coding skills with our resources
Contests
Compete in popular contests with top coders
logo
Events
Attend free live masterclass hosted by top tech professionals
New
Scaler
Explore Offerings by SCALER
exit-intent-icon

Download Interview guide PDF

Before you leave, take this BGP Interview Questions interview guide with you.
Get a Free Personalized Career Roadmap
Answer 4 simple questions about you and get a path to a lucrative career
expand-icon Expand in New Tab
/ Interview Guides / BGP Interview Questions

BGP Interview Questions

Last Updated: Jan 03, 2024

Download PDF


Your requested download is ready!
Click here to download.
Certificate included
About the Speaker
What will you Learn?
Register Now

What is BGP?

Border Gateway Protocol (BGP) is the Internet's postal service. When someone places a letter in a mailbox, the Postal Service processes it and determines the most efficient way to send it to its intended destination. When someone sends data over the Internet, BGP is in charge of analysing all of the possible paths for the data to take and selecting the best one, which frequently involves hopping between autonomous systems. BGP is the protocol that allows data to be routed across the Internet. For example, the border gateway protocol is the protocol that allows a user in Singapore to communicate swiftly and efficiently with origin servers in Argentina when they visit a website.

The protocol can link any autonomous system's internetwork together utilising any topology. The sole need is that each autonomous system should have at least one BGP-capable router that is connected to the BGP router of at least one other autonomous system. The primary purpose of BGP is to communicate network reachability information with other BGP systems. Based on the information transmitted between BGP routers, the Border Gateway Protocol creates an autonomous systems graph.

BGP Interview Questions for Freshers

1. What are the different types of attributes present in BGP?

Following are the different types of attributes present in bgp:

  • Well-known mandatory: All BGP peers recognise it, it is forwarded to all peers, and it is present in all Update messages. The following are some of the well-known mandatory attributes :
    • Next-hop
    • Origin
    • AS PATH
  • Well-known discretionary: All routers recognise it, it's sent to all peers, and it's optionally included in the Update message. The following are some of the well-known discretionary attributes :
    • Local Preference
    • Atomic Aggregate
  • Optional transitive: It's possible that BGP routers will recognise it and transmit it on to BGP peers. When optional transitive qualities are not recognised, they are denoted as partial. The following are examples of optional transitive attributes:
    • Aggregator
    • Community
  • Optional non-transitive: BGP routers may recognise it, but it is not forwarded to peers. The following are some of the optional non-transitive attributes :
    • Multi-exit discriminator (MED)
    • Originator ID
    • Cluster-ID
Create a free personalised study plan Create a FREE custom study plan
Get into your dream companies with expert guidance
Get into your dream companies with expert..
Real-Life Problems
Prep for Target Roles
Custom Plan Duration
Flexible Plans

2. What exactly do you mean by a route reflector in the context of Border Gateway Protocol? Why is it necessary?

In BGP, a route reflector is a router which is capable of breaking the internal Border Gateway Protocol (iBGP) loop avoidance rule. Under certain settings, a route reflector can broadcast updates received from an iBGP peer to another iBGP peer.

By breaking the criterion and designing iBGP networks that scale quickly and cleanly, route reflectors are employed to eliminate the full mesh requirement.

3. Mention some of the well known BGP metric’s attributes.

BGP path selection is based on the values of the following attributes:

  • Weight
  • Local Preference (highest local value will be preferred, default value is 100)
  • Originate
  • AS path length
  • Origin code
  • Multi-Exit Discriminator (MED)
  • eBGP path over iBGP path
  • Shortest IGP path to BGP next hop
  • Oldest path
  • Router ID
  • Neighbor IP address.
You can download a PDF version of Bgp Interview Questions.

Download PDF


Your requested download is ready!
Click here to download.

4. What are the characteristics of the Border Gateway Protocol (BGP)?

Following are the characteristics of the Border Gateway Protocol:

  • Configuration of Inter-Autonomous Systems: The Border Gateway Protocol's primary function is to provide communication between two autonomous systems.
  • Next-Hop Paradigm is supported by the Border Gateway Protocol.
  • Within the autonomous system, there is coordination among several BGP speakers.
  • Path Information: In addition to the reachable destination and next destination pair, BGP advertisements offer path information.
  • In the routing-decision algorithm of BGP, numerous attributes are used.
  • External neighbours between various autonomous systems are communicated via eBGP.
  • Internal neighbours inside the same autonomous system use iBGP.
  • It uses weight to alter the outward traffic routing from a single locally configured router.
  • Policy Support: The Border Gateway Protocol can implement policies that the administrator can configure. A router running BGP, for example, can be set to discriminate between routes known within the autonomous system and routes known from outside the autonomous system.
  • TCP (Transmission Control Protocol) is used in conjunction with Border Gateway Protocol.
  • Border Gateway Protocol helps networks save bandwidth.
  • Classless Inter-Domain Routing (CIDR) is supported by BGP.
  • Security is also supported by BGP.

5. What are the various BGP Neighbor Adjacency States?

Before any routing information is transmitted, BGP establishes a neighbour adjacency with other routers, similar to OSPF (Open Shortest Path First) or EIGRP (Enhanced Interior Gateway routing Protocol). BGP, on the other hand, does not use broadcast or multicast for BGP neighbour discovery; instead, neighbours are manually configured and communicate over TCP/179.

Two BGP systems will go through a succession of BGP Neighbor Adjacency States before becoming neighbours. They are as follows:

  • Idle - The router initialises BGP resources. Attempts to establish a BGP incoming connection are rejected. The BGP protocol establishes a TCP connection with the peer.
  • Connect - BGP waits for the three way handshake to finish. The OPEN message is transmitted to the peer if it is successful, and BGP shifts to the OpenSent state. If we are unsuccessful, we will return to the Active state. If the ConnectRetry timeout expires, however, BGP will continue in this condition, with the timer reset and a new three way handshake launched.
  • Active - BGP returns to the Connect state after the ConnectRetry timeout is reset.
  • OpenSent - BGP waits for an OPEN message from its peer before sending it. BGP enters the OpenConfirm state after receiving a message.
  • OpenConfirm - BGP waits for a peer to send a keepalive message. BGP goes to the Established state if a response is received before the timeout ends. Otherwise, BGP switches to Idle mode.
  • Established - Both peers exchange UPDATE messages once the connection is established. If any of the UPDATE messages include an error, the BGP peer will send a NOTIFICATION message and enter the Idle state.

Learn via our Video Courses

6. Is it possible to utilise BGP (Border Gateway Protocol) instead of any IGP (Interior Gateway Protocol)?

No, we can't use BGP instead of any IGP because BGP connects different autonomous systems, whereas IGP works inside autonomous systems.

7. What are the different types of Timers present in BGP?

Following are the different types of Timers present in BGP :

  • Keep Alive Timer : This is the heartbeat timer, in which a local neighbour sends a BGP heart-beat packet to a remote neighbour at regular intervals to check reachability and availability. This interval is set to '30' seconds by default.
  • Hold down Timer : This is the amount of time that the local neighbour must wait before declaring the remote neighbour unavailable. This interval is set at "90" seconds by default, which is '3' times the Keep-Alive Interval. In other words, if a local neighbour misses three Keep-Alive packets in a row from a remote neighbour, the local neighbour considers the remote neighbour unavailable and changes the status of the neighbourship, as well as removing all associated routes advertised by the neighbour from the routing table/BGP table. Before and after the hold-down timer expires, the BGP neighbour status changes. The hold down timer is set to 90 seconds by default, and after that, the local neighbour moves through various stages like 'idle,' 'connect,' and 'active.' The status changes to 'Idle' at first, then to 'Connect' after 5 seconds, and then to 'Active' after 10 seconds.
  • Advertisement Interval : The BGP Advertisement Interval is a timer that determines how much time must pass between a route being advertised and being removed from a BGP peer. For eBGP peers, the default is 30 seconds, and for iBGP peers, it's 5 seconds. This can be modified on a per-neighbor basis.
Advance your career with   Mock Assessments Refine your coding skills with Mock Assessments
Real-world coding challenges for top company interviews
Real-world coding challenges for top companies
Real-Life Problems
Detailed reports

8. In BGP, what is the order of preference?

The order of preference in BGP differs depending on whether the attributes are used for inbound or outbound updates.

The following is the order of preference for inbound updates:

  1. Route-map
  2. Filter-list
  3. Prefix-list
  4. distribute-list

The following is the order of preference for outgoing updates:

  1. Filter-list
  2. Route-map | unsuppress-map
  3. Advertise-map (conditional-advertisement)
  4. Prefix-list
  5. distribute-list.

9. Is authentication possible with BGP? If yes, explain how.

Yes. MD5 authentication is supported by BGP. BGP allows neighbours to authenticate each other using MD5 and a shared password. It is set up with the following  command neighbour {ip-address | peer-group-name} password password in BGP router setup mode. When authentication is enabled, BGP verifies the source of each routing update and authenticates every TCP segment from its peer. Authentication is required by most ISPs for their EBGP peers.

Peering works only if both routers have the same password and are configured for authentication. When a router has a password configured for a neighbour but the neighbour router does not, the console displays a message like this when the routers try to create a BGP session.

 %TCP-6-BADAUTH: No MD5 digest from [peer's IP address]:11003 to
 [local router's IP address]:179

Similarly, if the two routers are configured with different passwords, a message like this will appear on the screen:

 %TCP-6-BADAUTH: Invalid MD5 digest from [peer's IP ​address]:11004 to [local router's IP address]:179

10. What do you understand by peers in the context of BGP? What is the purpose of BGP peer groups?

BGP peers are two routers that have established a link for exchanging BGP information. Such BGP peers provide routing information via TCP-based BGP sessions, which are dependable, connection-oriented, and error-free protocols. 

The above image shows a BGP peering session between two BGP routers. We may utilise peer groups to simplify BGP configuration and reduce the amount of updates BGP has to produce. We can create a peer group with the neighbours and then apply all of our setups to it.

11. What do you understand about poison reverse in the context of BGP?

Poison Reverse: The Poison Reverse algorithm is a widely used distance-vector routing algorithm. To solve the count-to-infinity problem, poison reverse is used. To put it another way, poison reverse is the inverse of the split horizon. Route advertisements that would be muted by split horizon are instead advertised at a distance of infinity with poison reverse. Poison reverse is a RIP (Routing Information Protocol) technique. When path information becomes invalid, routers do not instantly remove it from the routing database; instead, they broadcast a hop-count of 16, which is an unreachable metric value. This increases the size of the routing table but aids in the elimination of loops. It can break any loop between neighbouring routers right away. The main notion of poison reverse is to ensure that a path does not return to the same node if the network's cost has changed.

12. What do you understand about split horizon in the context of BGP? Explain with an example.

Split Horizon: The split horizon is a  method employed by distance vector protocols to prevent network routing loops. The underlying premise is straightforward: never send routing information back in the same direction it came from. It is necessary to have a split-horizon because distance vector protocols like Routing Information Protocol (RIP) are prone to routing loops, which occur when a data packet is caught in an unending loop and routed through the same routers over and over again. Split horizon is frequently used in protocols to avoid loops. Different strategies are used to prevent packet looping in other protocols, such as Open Shortest Path First. 

When split horizon is enabled, a router is prevented from advertising a route back to the router from whence it learnt it. To put it another way, if a router receives routing information from another router, the first router will not broadcast it back to the second router, preventing routing loops.

Example: An example of three routers used to forward packets between networks is shown in the diagram below. The R3 router transmits routing information about the 10.0.0.0/16 network to the R2 router in this simple architecture. This information is received by the R2 router, which modifies its routing table and broadcasts it to the R1 router. The R1 router modifies its routing database when it receives this information.

The modified routing information allows the R1 router to send packets to the 10.0.0.0/16 network via the R2 and R3 routers. The R1 router will not be able to advertise this network route back to the R2 router if a split horizon is enabled. If the R1 router does not have split-horizon enabled, it will broadcast the route to the R2 router, which will update its routing table to reflect the network route available through the R1 router.

The presence of the R1 route in the R2 routing database is not an issue in typical operations because it is plainly a lot more expensive route than a direct R2-to-R3 connection. If the R2-to-R3 connection fails and the R2 router receives a packet from R1 destined for the 10.0.0.0/16 network, the R2 router will return the packet to R1 because the router advertised a functional network path. However, based on its own routing information, the R1 router will just return the packet to the R2 router, resulting in a routing loop that will continue until the packet dies. The R1 router will not advertise the network route to the R2 router if the split horizon is enabled, preventing the routing loop.

13. Differentiate between internal Border Gateway Protocol (iBGP) and external Border Gateway Protocol (eBGP).

  • internal Border Gateway Protocol(iBGP): Inside autonomous systems, IBGP is used. Its purpose is to feed data to your internal routers. For prefix learning, all devices in the same autonomous system must form a full mesh topology or use either Route reflectors or Confederation.
  • external Border Gateway Protocol (eBGP): It is employed between autonomous systems. It's used and deployed at the edge or border router, which connects two or more autonomous systems together. It is the protocol that allows networks from various organisations or the Internet to communicate with one another.

The following table lists the differences between the internal Border Gateway Protocol and the external Border Gateway Protocol:

internal Border Gateway Protocol (iBGP) external Border Gateway Protocol (eBGP)
It connects two BGP routers in a single autonomous system. It connects two BGP routers in separate independent systems.
Its Administrative Distance is set to 200 by default. Its Administrative Distance is set to 20 by default.
IBGP routes obtained from an IBGP peer can be broadcast to an EBGP peer but not to another IBGP peer. EBGP routes can be published to EBGP and IBGP peers when received from an EBGP peer.
It necessitates the use of full mesh topology. It does not necessitate a complete mesh topology.
Within the same corporation, it's used. It's used between corporations or between corporations and Internet service providers.
For loop prevention, it employs BGP Split Horizon. It prevents loops by using an AS path.
TTL (Time To Live) = 255 is the default setting for peers. TTL (Time To Live) = 1 is the default setting for peers.
Attributes such as local preference are exchanged between IBGP peers. Attributes such as local preference are not communicated between EBGP peers.
The next hop remains constant when a route is advertised to an IBGP peer. When a route is announced to an EBGP peer, the local router becomes the next hop.

14. What do you understand by Routing Information Protocol (RIP) in the context of networking?

The Routing Information Protocol (RIP) is a dynamic routing protocol that finds the optimum path between the source and destination networks by using hop count as a routing metric. It is a distance-vector routing protocol with an AD value of 120 that operates at the OSI application layer. The RIP protocol uses port 520. The number of routers between the source and destination networks is referred to as the hop count. The path with the fewest hops is deemed the best route to a network and is thus entered into the routing table. The number of hops allowed in a path between source and destination is limited by RIP, which eliminates routing loops. The maximum number of hops allowed by RIP is 15, and a hop count of 16 is considered unreachable by the network.

Following are the features of Routing Information Protocol (RIP):

  • Network updates are exchanged on a regular basis.
  • Routing information (updates) are always broadcast.
  • Routing tables in their entirety are sent in updates.
  • Routing information received from nearby routers is always trusted by routers. This is also known as rumour routing.

15. Is it possible to run two BGP processes on the same router?

No, you can't have two BGP processes running on the same router. This is because BGP is an Exterior Gateway Protocol.

16. Is it possible for routers on different subnets to become BGP neighbours?

 BGP is frequently set up between two routers that are directly connected and belong to distinct autonomous systems. BGP routers don't require their neighbours to be on the same subnet. Instead, they employ a TCP connection between the routers to send and receive BGP messages, allowing neighbouring routers to be on the same or distinct subnets.

17. What port number is used by the border gateway protocol?

The Border Gateway Protocol uses the Transmission Control Protocol (TCP) port number 179.

BGP Interview Questions for Experienced

1. What are the different types of loop prevention mechanisms in BGP?

Following are the different ways of loop prevention mechanisms in BGP :

  • A router does not advertise the same routes to another iBGP peer when one iBGP peer specifies routes for it.
  • When you use AS PATH, you can do the following: A BGP router adds its own ASN to the AS PATH when we advertise to an eBGP peer. When a BGP router receives an update and the route announcement includes an AS PATH with its ASN, the route is ignored.

Conclusion:

In this article, we have covered the most frequently asked interview questions on Border Gateway Protocol (BGP). If you are preparing for a BGP interview, you can expect questions from networking as well. Do not worry, we got you covered. To go through the most frequently asked interview questions on networking, visit this link.

2. What do you understand about TTL Security in the context of BGP? What is the need for TTL security in BGP?

When constructing an eBGP neighborship through a Service Provider Network, there is a security risk of an attack from an unprotected Internet Service Provider domain to a secured client environment. A disadvantage of eBGP multihop is that a DOS attack can be carried out by spoofing legal packets towards a BGP router in large numbers.

TTL-Security is a method we employ to secure our eBGP session from DOS attacks like this. Only eBGP sessions, not iBGP sessions, can employ the BGP TTL Security check. Only one of TTL Security and eBGP multihop can be enabled to generate directly linked or multihop peering sessions. A simple command can be used to configure the TTL-Security feature against an eBGP neighbour:

neighbor TTL-security hops

By default, BGP sends packets with a TTL of 1 to external neighbours and accepts packets with a TTL of 0 or higher from external neighbours (as measured after the local router has decremented the TTL of the incoming packet).

By requiring BGP to originate packets with a TTL of 255, the TTL-Security modifies the default behaviour of originating.

3. Differentiate between Enhanced Interior Gateway Routing Protocol (EIGRP) and Border Gateway Protocol (BGP).

Enhanced Interior Gateway Routing Protocol (EIGRP): If two routers in the same area exist, EIGRP is used to share information between them. It's also a complicated protocol, but it's simple to set up and use in both small and big networks. It's also a hybrid protocol, as it combines elements of both distance vector and link-state routing protocols.

Following table lists the differences between Enhanced Interior Gateway Routing Protocol (EIGRP) and Border Gateway Protocol (BGP):

Enhanced Interior Gateway Routing Protocol (EIGRP) Border Gateway Protocol (BGP)
In EIGRP, the Dual Distance Vector Algorithm is used. It is based on the best-path algorithm.
It is primarily used by large organisations. In comparison to EIGRP, it is mostly used for very large organisations.
It is a hybrid type. It's a type of Vector State.
It is a protocol for intelligent routing. It outperforms EIGRP in terms of routing intelligence.
It is a protocol for internal gateways. It is a protocol for connecting to an external gateway.
It has administrative distances of 90 (internal) and 170 (external). Its administrative distances are 20 (internal) and 200 (external).

4. Differentiate between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP).

Following are the differences between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP) :

Border Gateway Protocol (BGP) Routing Information Protocol (RIP)
It is based on the best-path algorithm. The Bellman Ford algorithm is used by Routing Information Protocol.
In comparison to RIP, it is mostly utilised for very large organisations It is primarily utilised by companies of a smaller size.
It's a protocol for connecting to an external gateway. It is a dynamic routing protocol that is widely used in the business.
In BGP, the networks are divided into two categories: areas and tables. In RIP, areas, subareas, autonomous systems, and backbone areas are the different types of networks.
The metric is calculated in terms of Hop Count. The metric is calculated in terms of Bandwidth.
It is a hybrid type. It is a Vector State type.
There is no such limit on the number of hops. It allows for a total of 15 hops.

5. Explain the Path selection criteria used in BGP.

BGP seeks to reduce the number of paths available to only one best path; it does not load balance by default. To do so, it looks at the following path properties of any loop-free, synchronised (if synchronisation is enabled) routes with an accessible next-hop:

  • Pick the route that has the most weight.
  • Choose the route with the highest local preference if weight is not specified.
  • Choose routes that began with this router.
  • Choose the Autonomous System path that is the shortest.
  • Select the path with the lowest origin code (lowest is I next is e, and last is?).
  • If the same Autonomous System advertises the available routes, choose the path with the lowest MED.
  • Opt for an EBGP route rather than an IBGP route.
  • Choose the route that passes through the IGP neighbour with the lowest IGP metric.
  • Pick the oldest route.
  • Choose the path that passes through the neighbour with the smallest router ID.
  • Select the path that passes through the neighbour with the smallest IP address.

6. What do you mean by BGP Message Types? Explain the different Message Types in BGP in detail.

The BGP Message types are used to create a neighbour relationship and exchange parameters such as the autonomous system number and authentication values. A BGP message is made up of two parts: a BGP header and data. The header format is the same in all of the BGP messages. TCP is used to transmit BGP messages (port 179). The length of the message ranges from 19 to 4096 octets. Each BGP message's header is 19 octets long and consists of three fields.

The types of BGP messages are listed below:

  • Open : A BGP adjacency is established using the OPEN message. Before a BGP peering is established, both parties negotiate session capabilities. The BGP version number, ASN of the originating router, Hold Time, BGP Identifier, and other optional characteristics that define the session capabilities are all included in the OPEN message.
  • Keepalive : To ensure that the neighbours are still alive, BGP does not rely on the TCP connection status. Every one-third of the Hold Timer agreed upon between the two BGP routers, keepalive messages are exchanged. Generally, the default Hold Time for  devices is 180 seconds, so the default Keepalive interval is 60 seconds. No Keepalive messages are delivered between BGP neighbours if the Hold Time is set to zero.
  • Update : The Update message can either advertise or remove previously advertised routes, or it can do both. When advertising prefixes, the Update message includes the Network Layer Reachability Information (NLRI), which includes the prefix and related BGP PAs. Only the prefix is included in NLRIs that have been withdrawn. To save needless bandwidth, a UPDATE message can be used as a Keepalive.
  • Notification : When a BGP session error is discovered, such as a hold timer expiring, neighbour capabilities changing, or a BGP session reset is requested, a Notification message is sent. The BGP connection is closed as a result of this.

7. Explain the various types of communities used in BGP.

Following are the various types of communities used in BGP:

  • No-Advertise Community

When a route is associated with a No-Advertise community, the BGP speaker will not advertise the route to any internal or external BGP peers.

R1 does not advertise a No-Advertise Route (10.10.10.0/24) to peers R11, R12, and R111 in the following example.

  • Community with No Exports

When a No-Export community is associated with a route, the router will only advertise the route to internal peers.

R1, R11, and R12 are not advertising a No-Export Route (10.10.10.0/24) to their external peer, R111, as seen in the following example.

R1 will not advertise the route to R111 in this situation, just to R11 and R12, because they are internal BGP peers. As a result, because R111 is an external BGP peer, R11 and R12 will not advertise either route to it.

  • Local AS Community 

There is an important regulation about internal BGP neighbours to avoid BGP routing loops: an IBGP neighbour cannot advertise a route to another IBGP neighbour if it obtained that route from another IBGP neighbour.

A Local AS Route (10.10.10.0/24) is not promoted between IBGP neighbours (R11 and R111) within the local AS in the following example.

According to the criteria indicated above, R11 advertises the route to R22, but R22 does not advertise the path to R111. There are several options for getting the route to R111, including constructing a full mesh of IBGP sessions between AS11 routers or dividing the AS 11 into a sub-AS within a confederation.

Outside of AS11, no one knows what AS 1000 and AS1001 are. R111 can now receive the 10.10.10.0/24 route even if it does not have full mesh BGP peering. Outside of the sub-AS, the Local-AS community does not advertise routes.

  • Graceful Shutdown Community

When a router's peer router is about to be purposely shut down, the Graceful SHUTDOWN (65535:0) community is used to seamlessly shut down paths it could use. Consider the following scenario: R111 is utilising R11 to access the 10.10.10.0/24 network, but R11 will be rebooted to be upgraded:

R111 replies by transferring traffic to R12 with minimum disruption when R11 announces this community:

  • Extended Community 

An Extended community is an 8-byte value that is split into two parts:

  • The first two bytes indicate the sort of community.
  • The last six bytes provide information that is specific to the type of community.

There are three fields in an extended community: kind, administrator, and assigned number (type:administrator:assigned-number). The administrator field can be an AS or an IP address, depending on the value of the high-order byte in the Type field. MPLS-VPN is the most well-known use for extended communities, as it uses two extended communities:

  • Route Target community: Determines which routers are capable of receiving a given set of routes.
  • Route Origin community: This group of routers is responsible for injecting a specified set of routes into BGP.

A Virtual Routing and Forwarding (VRF) table is a virtual routing table that can have its own routing policies that are independent of the global routing table or other VRFs. Essentially, you can connect numerous client sites and create a distinct routing table (VRF) throughout the entire network exclusively for this customer, with routing policies that differ from those of other customers.

  • Route Target Community 

In MPLS VPN setups, the Route Target community is used to segregate two customers' routing tables, as depicted in the diagram below:

VRF Customer RED is only present on R1 and R12, and VRF Customer BLUE is only present on R11 and R22 in this scenario, but they may have been present on all four routers.

When a route is exported from VRF Red using BGP, the route-target 100:100 is assigned to the route. When the route reaches R12, the route from R1 is imported, allowing the sites connected to R1 and R12 to communicate.

  • Route Origin Community 

The route origin community is used in an MPLS VPN environment to identify where routes originated from so that readvertisement back to that site is avoided.

When PE1 receives the route from CE1, it attaches the route origin community in addition to the route-target that is linked to the route (through export).

The route reaches PE2, but PE2 does not inform CE2 because it is aware that it originated at the location.

8. What do you understand about communities in the context of BGP?

A BGP community is a transitive, optional BGP property that is recognised and sent between BGP peers. A BGP community is a tag that is appended to the BGP routes that are exchanged between two BGP peers. A community is a 32-bit number that is divided into two 16-bit sections. The first 16 bits indicate the community's AS number, while the following 16 bits represent a unique number assigned by the AS. Because each AS number is distinct, each community on the internet is similarly distinct. This means that an AS with the ASN 9999 (or 0x270F in hex) can have communities ranging from 0x270F0000 to 0x270FFFFF.

9. What do the various BGP Path Attributes mean?

BGP offers a variety of Path Attributes, which are used to compare competing BGP pathways (routes) in the BGP table to identify the best possible path (route).

The following are some BGP Path Attributes:

  • Next Hop: The Next Hop Path Attributes are used to list the IP address of the prefix's next hop. It determines whether the Next Hop is achievable. The router does not use this route if no other route can reach Next Hop.
  • Weight: When you receive updates from a router, the weight Path Attributes is a numeric value provided by the router to impact the route for a prefix. It is not publicised among BGP peers, and a heavier weight is preferred.
  • Local Preference: Local Preference is a numeric value set as well. It is conveyed within a single autonomous system in order for all routers in that autonomous system to determine the optimum route to a certain network. The higher the value, the better.
  • Routes injected locally: The routes injected with the network command are known as locally injected routes. These are preferable to iBGP/eBGP.
  • Multi-Exit Discriminator: The Multi-Exit Discriminator (MED) allows one autonomous system to inform a neighbouring autonomous system about the optimum path to take for packet forwarding. The smaller the better.
  • AS Path: The number of ASNs (Autonomous System Number) in the AS Path is specified by the AS Path. The smaller the better.

10. Differentiate between hard reset and soft reset in the context of BGP.

Following are the differences between hard reset and soft reset in the context of BGP:

Basis Hard Reset Soft Reset
Goal The TCP session with the BGP neighbour is killed by Hard Reset, and it must be restarted. It terminates the TCP connection between the peers, re-establishes the connection with a BGP open message, and resumes normal peer-to-peer message exchanges.

There are two types of soft resets:

1. Soft reset with Route refresh: A soft reset with Route refresh allows BGP peers to seek an update without destroying the neighbour relationship.

2. Soft-reconfiguration: Because the route-refresh request is not issued to the BGP neighbour, soft-reconfiguration stores a copy of BGP routes sent in the BGP update from our peer. 

Direction The direction of connection in hard reset can be both in and out. The direction of connection in soft reset is either in or out.
Utilization of memory It does not necessitate any additional RAM to store another table. It necessitates more RAM because the router now stores two BGP tables for each neighbour instead of one.
Impact  The hard reset has the potential to drastically impair network connectivity Only those prefixes affected by the policy change will be affected by the soft reset.
Use Case When a soft reset fails to resolve the problem, a hard reset should be utilised as a final resort. The soft technique is the most popular and widely employed.
Prerequisite There are no requirements for this activity. In soft reset with the Route refresh functionality, both peers may be required to provide the Route Refresh capability.
Rate Of Convergence  Because processing the entire table takes a lengthy time, it necessitates an extremely long convergence time. Its convergence time is significantly less than that of a hard reset.
Commands Used clear ip bgp {* | neighbor ip | peer-group}

clear ip bgp {neighbor ip} soft out

clear ip bgp {neighbor ip} soft in 

11. Differentiate between Open Shortest Path First (OSPF) and Border Gateway Protocol (BGP).

Open Shortest Path First (OSPF): Open shortest path first (OSPF) is a link-state routing protocol that uses its own shortest path first (SPF) algorithm to discover the optimum path between the source and destination router. A link-state routing protocol employs the idea of triggered updates, in which updates are only triggered when a change in the learnt routing table is detected, as opposed to the distance-vector routing protocol, in which the routing table is exchanged over a period of time. Open shortest path first (OSPF) is an Interior Gateway Protocol (IGP)  that tries to move packets within a large autonomous system or routing domain. It's a network layer protocol that uses AD value 110 and runs on protocol number 89. OSPF employs the multicast address 224.0.0.5 for routine communication and 224.0.0.6 for updates to designated routers (DRs) and backup designated routers (BDRs) (BDR).

Following are the differences between Border Gateway Protocol (BGP) and Open Shortest Path First (OSPF):

Open Shortest Path First (OSPF) Border Gateway Protocol (BGP)
Open Shortest Path First is a fast concurrency protocol. BGP is a slow concurrency protocol.
OSPF is a network topology or design that is hierarchical. It uses a sort of mesh topology or design.
Internal gateway protocol is another name for it. It is referred to as an external gateway protocol.
OSPF is a simple protocol to set up. BGP implementation is challenging.
It connects to port 89. It works with port number 179.
The internet protocol is employed in OSPF. Transmission control protocol is employed in this.
OSPF is a type of Link State. BGP is a Vector State type.
The Dijkstra algorithm is employed in OSPF. The best path algorithm is employed in this case.
OSPF prioritises the quickest path over the shortest path. BGP prefers the best path.

BGP MCQ

1.

What does the "s" in front of the line for a network imply in the output of the show ip bgp command?

2.

What criteria does BGP use to choose the best path?

3.

Which condition denotes that an open message has been delivered but no response from the neighbour has been received in more than 5 seconds?

4.

Which of the following routing methods best defines BGP?

5.

Which command tells a BGP router whether an IP address is associated with an IBGP or an EBGP neighbour?

6.

Which command resends the routing table without resetting the TCP session and marks routes as "withdrawals" that the neighbour, 192.168.200.1, would no longer see? (If a BGP router's outbound policy has changed, you should use this command.)

7.

Which BGP message creates a BGP session and contains the BGP router ID and hold time?

8.

When advertising to a BGP neighbour, which command makes the next-hop address the source IP address of the update?

9.

For normal BGP neighbour operations, which BGP neighbour state is appropriate?

10.

Which command is the most inconvenient and should be avoided when restarting BGP sessions?

11.

When an error condition is recognised, which BGP message is sent?

12.

By default, which of the following is NOT a way for IBGP neighbours to generate an adjacency?

13.

Which command makes a BGP update's source IP address the IP address of a specified interface?

14.

What are the components of a BGP update?

15.

Which of the following statements concerning BGP is correct?

Excel at your interview with Masterclasses Know More
Certificate included
What will you Learn?
Free Mock Assessment
Fill up the details for personalised experience.
Phone Number *
OTP will be sent to this number for verification
+91 *
+91
Change Number
Graduation Year *
Graduation Year *
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
*Enter the expected year of graduation if you're student
Current Employer
Company Name
College you graduated from
College/University Name
Job Title
Job Title
Engineering Leadership
Software Development Engineer (Backend)
Software Development Engineer (Frontend)
Software Development Engineer (Full Stack)
Data Scientist
Android Engineer
iOS Engineer
Devops Engineer
Support Engineer
Research Engineer
Engineering Intern
QA Engineer
Co-founder
SDET
Product Manager
Product Designer
Backend Architect
Program Manager
Release Engineer
Security Leadership
Database Administrator
Data Analyst
Data Engineer
Non Coder
Other
Please verify your phone number
Edit
Resend OTP
By clicking on Start Test, I agree to be contacted by Scaler in the future.
Already have an account? Log in
Free Mock Assessment
Instructions from Interviewbit
Start Test