Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

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

Answer»

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?

Answer»

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).

Answer»

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).

Answer»

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 organisationsIt 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.

Answer»

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.

Answer»

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.

Answer»

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:

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?

Answer»

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?

Answer»

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.

Answer»

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

BasisHard ResetSoft Reset
GoalThe 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. 

DirectionThe 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 memoryIt 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 connectivityOnly those prefixes affected by the policy change will be affected by the soft reset.
Use CaseWhen 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.
PrerequisiteThere 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 Usedclear 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).

Answer»

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.