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 exactly do you mean by a route reflector in the context of Border Gateway Protocol? Why is it necessary?

Answer»

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.

2.

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

Answer»

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

What are the different types of attributes present in BGP?

Answer»

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

What are the various BGP Neighbor Adjacency States?

Answer»

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

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

Answer»

No, we can't USE BGP instead of any IGP because BGP connects different AUTONOMOUS SYSTEMS, whereas IGP WORKS inside autonomous systems.

6.

What are the different types of Timers present in BGP?

Answer»

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

In BGP, what is the order of preference?

Answer»

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

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

Answer»

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

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

Answer»

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.

10.

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

Answer»

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.

11.

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

Answer»

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.

12.

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

Answer»
  • 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.
13.

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

Answer»

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

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

Answer»

No, you can't have TWO BGP PROCESSES running on the same router. This is because BGP is an Exterior GATEWAY PROTOCOL.

15.

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

Answer»

 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.

16.

What port number is used by the border gateway protocol?

Answer»

The Border Gateway Protocol uses the TRANSMISSION CONTROL Protocol (TCP) port number 179.

17.

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

Answer»

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.