Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
86 views54 pages

BGP Interview Question and Answers Prepared by VKT

BGP, or Border Gateway Protocol, is a dynamic Exterior Gateway Protocol that facilitates communication between different networks on the internet, using TCP port 179. It employs a Path-Vector Routing Protocol to maintain a list of Autonomous Systems (AS) that data must traverse, preventing routing loops through AS number tracking. BGP supports both eBGP for inter-AS communication and iBGP for intra-AS communication, ensuring scalability and reliability in routing information across vast networks.

Uploaded by

vinayntwk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views54 pages

BGP Interview Question and Answers Prepared by VKT

BGP, or Border Gateway Protocol, is a dynamic Exterior Gateway Protocol that facilitates communication between different networks on the internet, using TCP port 179. It employs a Path-Vector Routing Protocol to maintain a list of Autonomous Systems (AS) that data must traverse, preventing routing loops through AS number tracking. BGP supports both eBGP for inter-AS communication and iBGP for intra-AS communication, ensuring scalability and reliability in routing information across vast networks.

Uploaded by

vinayntwk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

➢ BGP-INTRODUCTION

1. What is BGP, and what does it stand for?

Answer: BGP stands for Border Gateway Protocol. It’s a set of rules (protocol) that helps networks talk to
each other and share information about how to reach different destinations on the internet. Think of it like a
GPS for the internet, guiding data to the right place.

Easy Explanation: Imagine BGP as a postman who knows the best route to deliver mail between different
cities (networks). It’s used to connect big networks, like those of internet providers.

Memory Tip: BGP = Best Gateway Picker – it picks the best path for data to travel across networks.

2. Is BGP a dynamic routing protocol?

Answer: Yes, BGP is a dynamic routing protocol. This means it automatically updates and shares routing
information between networks without someone manually setting every route.

Easy Explanation: Think of BGP like a smart traffic app that updates road directions as traffic changes,
instead of using a fixed paper map.

Memory Tip: Dynamic = Auto-Updating – BGP keeps routes fresh without manual work.

3. What type of protocol is BGP: Interior or Exterior?

Answer: BGP is an Exterior Gateway Protocol (EGP). It’s used to share routing information between
different networks (called Autonomous Systems), like between two internet providers.

Easy Explanation: BGP is like a diplomat who negotiates routes between different countries (networks), not
within a single country.

Memory Tip: EGP = External Gateway Protocol – BGP works outside one network.

4. Why is BGP called the “Protocol of the Internet”?

Answer: BGP is called the Protocol of the Internet because it’s the main protocol that helps the entire
internet share routing information, connecting all the big networks worldwide.

Easy Explanation: BGP is like the internet’s phonebook, helping every network find every other network.

Memory Tip: Internet = BGP’s Playground – BGP connects the whole internet.

5. What layer does BGP work on, and what port does it use?

Answer: BGP works on the application layer (Layer 4) and uses TCP port 179 to communicate.
Easy Explanation: BGP sits on top of TCP, like an app on your phone that uses the internet to talk to other
devices. Port 179 is like its special phone number.

Memory Tip: 179 = BGP’s Phone Number – BGP uses TCP port 179 to chat.

6. What is a Path-Vector Routing Protocol?

Answer: BGP is a Path-Vector Routing Protocol, which means it keeps a list of all the networks (called
Autonomous Systems or AS) that data must pass through to reach its destination.

Easy Explanation: Imagine BGP keeping a list of cities your package travels through to reach you, so it knows
the exact path.

Memory Tip: Path-Vector = Path List – BGP tracks the path of networks to the destination.

7. What are Autonomous Systems (AS) in BGP?

Answer: An Autonomous System (AS) is a group of networks under one organization, like an internet
provider. BGP uses AS numbers to identify and connect these networks.

Easy Explanation: Think of an AS as a big company with its own set of computers. BGP helps these
companies talk to each other.

Memory Tip: AS = A System – Each AS is like one big network system.

8. What are the two types of BGP, and how are they different?

Answer: BGP has two types: eBGP (External BGP) and iBGP (Internal BGP).

• eBGP: Used between different AS (like between two internet providers). The routers must be
directly connected.

• iBGP: Used within the same AS (inside one organization). Routers don’t need to be directly
connected.

Easy Explanation: eBGP is like two different companies shaking hands directly. iBGP is like coworkers in the
same company passing messages, even if they’re far apart.

Memory Tip: eBGP = External, iBGP = Internal – e for outside, i for inside.

9. How does BGP prevent routing loops?

Answer: BGP prevents loops by using AS numbers. It keeps track of the AS path. If a router sees its own AS
number in the path, it drops the route to avoid a loop.

Easy Explanation: Imagine BGP checking a package’s travel history. If it sees it’s already been to the same city
(AS), it stops to avoid going in circles.

Memory Tip: AS Path = No Loops – BGP uses AS numbers to stop data from circling back.
10. What are BGP peers, and how are they set up?

Answer: BGP peers are routers that share BGP information, also called BGP speakers. They don’t
automatically find each other; you must manually set them up to talk.

Easy Explanation: BGP peers are like friends who agree to share directions, but you have to introduce them
first—they don’t meet automatically.

Memory Tip: Peers = Planned Pals – BGP neighbors need manual setup.

11. What is the Administrative Distance for BGP updates?

Answer: BGP has two Administrative Distances:

• 20 for External BGP (eBGP) updates (from another AS).

• 200 for Internal BGP (iBGP) updates (within the same AS).
Lower numbers are preferred, so eBGP is trusted more than iBGP.

Easy Explanation: Administrative Distance is like a trust score. eBGP (20) is more trusted than iBGP (200), so
routers prefer eBGP routes.

Memory Tip: 20 = External, 200 = Internal – Lower number wins for eBGP.

12. Does BGP support load balancing?

Answer: No, BGP does not use load balancing. It picks one best path per network and uses only that path.

Easy Explanation: BGP is picky—it chooses one road for data to travel, not multiple roads at once.

Memory Tip: One Path = BGP’s Rule – BGP sticks to a single best route.

13. What types of IP addressing does BGP support?

Answer: BGP is classless and supports FLSM (Fixed-Length Subnet Mask), VLSM (Variable-Length Subnet
Mask), and CIDR (Classless Inter-Domain Routing).

Easy Explanation: BGP can handle any type of IP address splitting, whether fixed or flexible, making it
versatile for big networks.

Memory Tip: Classless = Flexible – BGP works with all IP address styles.

14. How does BGP send updates?

Answer: BGP sends updates as unicast (one-to-one) to manually defined neighbors. Updates are
incremental (only changes are sent) and triggered (sent when something changes).
Easy Explanation: BGP sends updates like targeted text messages to specific friends, only when there’s new
information.

Memory Tip: Unicast Updates = Targeted Texts – BGP sends changes to specific peers.

15. Why is BGP used for scalability and reliability?

Answer: BGP is used for scalability because it can handle huge numbers of routes (like the whole internet).
It’s reliable because it carefully chooses paths and avoids loops.

Easy Explanation: BGP is like a super-organized librarian who can manage millions of books (routes) and
always finds the right one without mistakes.

Memory Tip: Scalability = Big, Reliability = Safe – BGP handles big networks safely.

Color-Coded Text Picture for Easy Understanding

Below is a visual representation of key BGP concepts using color-coded text to make it easy to understand
and remember. Colors are chosen to be clear in both dark and light themes.

BGP BASICS

BGP = Border Gateway Protocol: Connects big networks (like internet providers).

Dynamic Routing: Auto-updates routes, no manual work needed.

Exterior Gateway Protocol (EGP): Works between different networks (AS).

Path-Vector: Keeps a list of networks (AS path) to reach a destination.

Uses TCP Port 179: BGP talks over TCP, like an app on the internet.

eBGP vs. iBGP:

- eBGP (External): Between different AS, must be directly connected.

- iBGP (Internal): Inside same AS, no direct connection needed.

AS Numbers Prevent Loops: Stops data from circling back.

Peers = BGP Speakers: Routers that share routes, manually set up.

Admin Distance: 20 (eBGP, more trusted), 200 (iBGP, less trusted).

No Load Balancing: Picks one best path only.

Classless: Supports FLSM, VLSM, CIDR for flexible IP addressing.

Unicast Updates: Sends changes to specific peers, only when needed.

Scalability & Reliability: Handles huge networks, keeps routes safe.


➢ BGP AUTONOMOUS SYSTEM- (AS)

Question 1: What is an Autonomous System (AS)?

Answer (Simple Explanation):


An Autonomous System, or AS, is like a big group of networks that are all managed by one organization, like
a company or an internet provider. Think of it as a city where all the roads (networks) are controlled by one
mayor (the organization). Each AS has a unique number, called an AS number, to identify it on the internet.

Color-Coded Explanation:

• AS: A group of networks under one boss (like a city).

• AS Number: A unique ID for that group, like a city’s zip code.

Plaintext Memory Tip:


“AS = A Single group of networks under one admin.”
Imagine a city named “AS-ville” with a unique zip code (AS number) to help it stand out.

Question 2: Why do Autonomous Systems need unique numbers?

Answer:
Each AS needs a unique AS Number (ASN) so that the internet knows which AS is which, just like every house
needs a unique address. This helps BGP prevent loops (when data keeps circling back) and ensures data goes
to the right place.

• Plaintext to Memorize:
ASN = Unique ID for AS to avoid confusion and loops.

• Memory Tip:
Think of ASNs as phone numbers. If two people had the same number, calls would get mixed up. ASNs
keep internet traffic clear.

• Easy Explanation:
When ASes talk using BGP, they use their ASNs to say, “Hey, I’m AS 123!” This stops data from getting
stuck in a loop and helps routers know where to send information.

• Color Coding for Understanding:

o ASN: Green for the unique ID that stands out.

o Loop Prevention: Purple to show it’s a safety feature.

o BGP: Red to connect it to the protocol that uses ASNs.

Question 3: What’s the difference between routing inside and outside an AS?
Answer (Simple Explanation):
Inside an AS, networks talk to each other using Internal Gateway Protocols (IGPs), like OSPF or RIP. It’s like
people chatting within the same city. Between different ASes, we use BGP (Border Gateway Protocol) to share
information. It’s like cities sending messages to each other through a special courier.

Color-Coded Explanation:

• Inside AS (IGP): Local chatting using OSPF, RIP, etc.

• Between AS (BGP): Long-distance messaging between cities.

Plaintext Memory Tip:


“Inside AS = IGP for local talk, Outside AS = BGP for faraway talk.”
Picture a small town (AS) where locals (IGP) talk face-to-face, but to reach another town, they use a courier
(BGP).

Question 4: How does BGP use AS numbers?

Answer (Simple Explanation):


BGP uses AS numbers to prevent loops in routing. When data travels between ASes, BGP keeps track of which
ASes the data has visited using their AS numbers. If it sees the same AS number again, it stops the data to
avoid a loop, like avoiding driving in circles.

Color-Coded Explanation:

• BGP: Tracks AS numbers to guide data.

• Loop Prevention: Stops data from circling back to the same AS.

Plaintext Memory Tip:


“BGP tracks AS numbers to avoid data loops.”
Imagine a delivery truck checking a list of cities (AS numbers) it’s visited to avoid going back to the same one.

Question 5: What’s the difference between 2-byte and 4-byte AS numbers?

Answer:
A 2-byte AS number is a smaller number (like a short name) that can only give us 65,536 possible ASNs (from
0 to 65535). Because we ran out of these, we now use 4-byte AS numbers, which give us 4.3 billion ASNs (from
65536 to 4294967295). The 4-byte numbers are like longer names to support more networks.

• Plaintext to Memorize:
2-byte ASN = 65,536 numbers (0–65535).
4-byte ASN = 4.3 billion numbers (65536–4294967295).

• Memory Tip:
Think of 2-byte as a small phone book (limited names) and 4-byte as a huge phone book (tons of
names) because the internet grew too big.

• Easy Explanation:
The internet used to have enough 2-byte ASNs, but as more companies joined, we needed more
numbers. So, 4-byte ASNs were created to give us billions of options. Some numbers in both are saved
for private use (like private phone lines).

• Color Coding for Understanding:

o 2-byte ASN: Orange for “small and limited.”

o 4-byte ASN: Green for “big and modern.”

o Private ASNs: Gray for “hidden, not public.”

Question 6: What are public and private AS numbers, and what are their ranges?

Answer:
Public AS numbers are used by organizations on the global internet, like a public address everyone can see.
Private AS numbers are used inside private networks, like a company’s internal ID that’s not shared publicly.

• 2-byte AS ranges:

o Public: 1 to 64495 (64,495 numbers).

o Private: 64512 to 65534 (1,022 numbers).

o Reserved: 0 and 65535 (not used).

o Documentation: 64496 to 64511 (for examples in books).

• 4-byte AS ranges:

o Public: 65536 to 4199999999 (most numbers).

o Private: 4200000000 to 4294967294 (94,967,295 numbers).

• Plaintext to Memorize:
2-byte: Public 1–64495, Private 64512–65534, Reserved 0 & 65535.
4-byte: Public 65536–4199999999, Private 4200000000–4294967294.

• Memory Tip:
Picture public ASNs as “store signs” visible to everyone, and private ASNs as “office room numbers”
only used inside. The 2-byte range is like a small town’s addresses, and 4-byte is a big city’s
addresses.

• Easy Explanation:
Public ASNs are for companies that connect to the global internet, like ISPs. Private ASNs are for
companies that keep their networks private, like a business’s internal system. Some numbers are
reserved so they don’t get mixed up.

• Color Coding for Understanding:

o Public ASNs: Blue for “open to the world.”

o Private ASNs: Gray for “hidden and internal.”

o Reserved ASNs: Red for “special, don’t touch.”


Question 7: What happens if one router uses 4-byte ASNs and another uses 2-byte ASNs?

Answer:
If one router uses 4-byte ASNs and another only supports 2-byte ASNs, they can still work together using a
special number called ASN 23456. This number acts like a “translator” to make sure both routers understand
each other.

• Plaintext to Memorize:
ASN 23456 = Translator for 4-byte and 2-byte ASNs.

• Memory Tip:
Think of ASN 23456 as a “universal adapter” for plugging old and new devices together.

• Easy Explanation:
Some older routers only understand 2-byte ASNs, but newer ones use 4-byte ASNs. To avoid
problems, BGP uses ASN 23456 to help them talk without errors, like a middleman making sure both
sides get the message.

• Color Coding for Understanding:

o 4-byte ASN: Green for “new system.”

o 2-byte ASN: Orange for “old system.”

o ASN 23456: Purple for “translator.”

Question 8: What are the three ways to write 4-byte AS numbers, and how do they work?

Answer:
There are three ways to write 4-byte AS numbers: Asplain, Asdot+, and Asdot. They’re just different formats to
show the same number, like writing a phone number with or without dashes.

1. Asplain:

o Shows the number as a simple decimal, like 7747 or 123456.

o Easiest to read, just the full number.

2. Asdot+:

o Splits the number into two parts (like high and low) with a dot.

o Example: 65536 becomes 1.0, 65537 becomes 1.1, 4294967296 becomes 65535.65535.

3. Asdot:

o Mixes Asplain and Asdot+.

o Numbers below 65536 are written as Asplain (e.g., 65535 stays 65535).

o Numbers above 65536 use Asdot+ (e.g., 65536 becomes 1.0).


• Plaintext to Memorize:
Asplain = Simple number (7747).
Asdot+ = Two parts with dot (1.0 for 65536).
Asdot = Asplain for <65536, Asdot+ for >65536.

• Memory Tip:

o Asplain: Like a “plain” name, no extras.

o Asdot+: Like a “split name” with a dot in the middle.

o Asdot: A “mix” of plain and split, depending on the number size.

• Easy Explanation:
These are just different styles to write big AS numbers. Asplain is straightforward, like writing “1000.”
Asdot+ breaks it into chunks, like “1.0,” to make big numbers easier. Asdot uses Asplain for smaller
numbers and Asdot+ for bigger ones, like a smart mix.

• Color Coding for Understanding:

o Asplain: Green for “simple and clear.”

o Asdot+: Blue for “split into two.”

o Asdot: Purple for “mix of both.”

Question 10: How do you convert an AS number to Asdot format? (Example: 194534)

Answer (Simple Explanation):


To convert a number like 194534 to Asdot format, follow these steps:

1. Divide the number by 65,535. Take the whole number result (e.g., 194534 ÷ 65,535 = 2). This is the
part before the dot.

2. Multiply 65,535 by that number (2 × 65,535 = 131,070). Subtract it from the original number
(194534 – 131,070 = 63,464).

3. Subtract the whole number from step 1 (63,464 – 2 = 63,462).

4. Write it as 2.63462.

Color-Coded Explanation:

• Step 1: Divide by 65,535 to get the first number (2).

• Step 2: Subtract (65,535 × 2) from 194534 to get 63,464.

• Step 3: Subtract 2 to get 63,462.

• Result: Write as 2.63462.

Plaintext Memory Tip:


“Asdot = Divide, Multiply, Subtract, Write.”
NOTE: If one Router is on IOS 15 and other Router is less than 15 IOS the only way to form BEG PEER is we
need to use remote-as 23456
➢ BGP FLAVORS
Question 1: What is BGP, and what are its two main types?

Answer:
BGP stands for Border Gateway Protocol. It’s a protocol used to exchange routing information between
routers, like a GPS for the internet. It has two types:

• iBGP (Internal BGP): Used when routers are in the same network group (same Autonomous
System or AS).

• eBGP (External BGP): Used when routers are in different network groups (different AS).

Memory Tip: Think of iBGP as "inside the same family" (same AS), and eBGP as "external, between different
families" (different AS). Picture iBGP as friends chatting within a house, and eBGP as neighbors talking across
a fence.

Explanation:

• BGP helps routers decide the best path to send data across networks, like choosing the fastest road to
a destination.

• iBGP is for routers inside the same organization (same AS), like employees in the same company
sharing info.

• eBGP is for routers in different organizations, like two companies exchanging data or an organization
talking to an Internet Service Provider (ISP).

Plaintext for Memorization:


BGP = Border Gateway Protocol, routes data between networks.
iBGP = same AS (inside group).
eBGP = different AS (outside group).

Visual Picture:
Imagine a blue house (iBGP) where everyone inside shares info freely (same AS). Outside, there’s an orange
fence (eBGP) where the house talks to a neighbor’s house (different AS).

Question 2: What is iBGP, and where is it used?

Answer:
iBGP (Internal Border Gateway Protocol) is when two routers in the same AS (Autonomous System, like a
network group) share routing info. It’s used inside an organization to keep all routers on the same page about
routes.

Memory Tip: Think of i in iBGP as "inside." Picture a team meeting in one office where everyone shares the
same company rules (same AS).

Explanation:

• iBGP runs between routers in the same network group (AS). For example, in a big company, all
routers in its network use iBGP to share routing info.
• It helps routers inside the organization know how to send data to each other or to outside networks.

• Example: If a company has routers in New York and Chicago in the same AS, they use iBGP to talk.

Plaintext for Memorization:


iBGP = Internal BGP, same AS, inside organization, routers share routes.

Visual Picture:
Picture a blue circle (one AS) with routers inside it, like friends in a group chat sharing directions (routes)
within the same company.

Question 3: What is eBGP, and where is it used?

Answer:
eBGP (External Border Gateway Protocol) is when two routers in different AS (different network groups)
share routing info. It’s used between organizations or between an organization and an ISP.

Memory Tip: Think of e in eBGP as "external." Imagine two different companies shaking hands across a
border to share info.

Explanation:

• eBGP connects routers in different AS, like two separate companies or a company and its ISP.

• It’s how the internet connects different networks, like linking your company’s network to Google’s or
your ISP’s network.

• Example: A company’s router talking to an ISP’s router uses eBGP.

Plaintext for Memorization:


eBGP = External BGP, different AS, between organizations or with ISP.

Visual Picture:
Imagine two houses (two AS) with an orange line connecting them. Routers at the edge of each house talk to
share directions across the boundary.

Question 4: What’s the difference between iBGP and eBGP in terms of where they run?

Answer:

• iBGP: Runs between routers in the same AS (same network group).

• eBGP: Runs between routers in different AS (different network groups).

Memory Tip: iBGP = "inside same AS," eBGP = "external, different AS." Think of iBGP as a family dinner
(same group) and eBGP as a meeting with outsiders (different groups).

Explanation:

• iBGP is for routers inside one organization’s network, like all routers in a university’s network
sharing info.
• eBGP is for routers connecting different networks, like a university’s router talking to an ISP’s router.

Plaintext for Memorization:


iBGP = same AS, inside.
eBGP = different AS, outside.

Visual Picture:
Picture a blue bubble (iBGP) for routers in one AS, and an orange bridge (eBGP) connecting two different
bubbles (different AS).

Question 5: Do iBGP and eBGP routers need to be directly connected?

Answer:

• iBGP: Routers don’t need to be directly connected. They can be far apart in the same AS.

• eBGP: Routers must be directly connected (like neighbors) by default.

Memory Tip: For iBGP, think "inside, no need to be close." For eBGP, think "external, must be next-door
neighbors." Picture iBGP routers texting across a city, but eBGP routers need to be side by side.

Explanation:

• iBGP routers can be anywhere in the same AS, like two routers in different cities of the same
company. They use other protocols to reach each other.

• eBGP routers are usually directly linked, like a cable between two routers in different organizations,
because they’re set with a TTL (Time To Live) of 1, meaning the signal can’t hop far.

Plaintext for Memorization:


iBGP = no direct connection needed.
eBGP = direct connection required.

Visual Picture:
For iBGP, imagine routers in a blue cloud talking over long distances. For eBGP, picture two routers
connected by a short orange cable between two networks.

Question 6: What is the TTL value for iBGP and eBGP?

Answer:

• iBGP: TTL = 255 (can travel far).

• eBGP: TTL = 1 (only goes one hop, so neighbors must be directly connected).

Memory Tip: iBGP = "big TTL (255)," can go far. eBGP = "tiny TTL (1)," stays close. Picture iBGP as a long-
distance call (255) and eBGP as a short whisper (1).

Explanation:

• TTL (Time To Live) is like a timer for how far a packet can travel.
• iBGP has a high TTL (255), so routers can be far apart in the same AS.

• eBGP has a low TTL (1), so routers must be directly connected, like next-door neighbors.

Plaintext for Memorization:


iBGP TTL = 255 (far).
eBGP TTL = 1 (close).

Visual Picture:
For iBGP, imagine a blue airplane flying far (TTL 255). For eBGP, picture a short orange handshake
between two routers (TTL 1).

Question 7: What is the Administrative Distance for iBGP and eBGP routes?

Answer:

• iBGP: Administrative Distance = 200.

• eBGP: Administrative Distance = 20.

Memory Tip: iBGP = "high number (200)," less trusted. eBGP = "low number (20)," more trusted. Think of
eBGP as a VIP (low number, high priority) and iBGP as a regular guest (high number, lower priority).

Explanation:

• Administrative Distance (AD) is a number that shows how much a router trusts a route. Lower
numbers are more trusted.

• eBGP routes (AD = 20) are trusted more because they come from outside the network (different AS).

• iBGP routes (AD = 200) are less trusted because they’re internal and might compete with other
internal protocols.

Plaintext for Memorization:


iBGP AD = 200 (less trusted).
eBGP AD = 20 (more trusted).

Visual Picture:
Imagine eBGP as a bright orange star (AD 20, high trust) and iBGP as a dim blue star (AD 200, lower trust)
in a router’s sky.

Question 8: What happens to the next hop when routes are advertised in iBGP and eBGP?

Answer:

• iBGP: The next hop stays the same when a route is shared with another iBGP router.

• eBGP: The next hop changes to the local router when a route is shared with an eBGP router.

Memory Tip: iBGP = "keep next hop." eBGP = "change next hop." Picture iBGP as passing a note without
changing the address, and eBGP as rewriting the address to your own.
Explanation:

• In iBGP, the next hop (the next router to send data to) doesn’t change because all routers are in the
same AS and know the original next hop.

• In eBGP, the next hop changes to the local router’s address because the receiving router is in a
different AS and needs a new address to follow.

Plaintext for Memorization:


iBGP = next hop stays same.
eBGP = next hop changes.

Visual Picture:
For iBGP, imagine a blue envelope passed with the same address. For eBGP, picture an orange envelope
with the address rewritten to the sender’s address.

Question 9: Can iBGP routes be shared with other iBGP routers?

Answer:
No, iBGP routes learned from an iBGP peer cannot be shared with another iBGP peer. But they can be
shared with an eBGP peer.

Memory Tip: Think of iBGP as a "no gossip rule" within the same AS—routers don’t pass iBGP routes to other
iBGP routers. But they can tell eBGP routers outside the AS.

Explanation:

• iBGP has a rule to prevent loops: routes learned from one iBGP router can’t be sent to another iBGP
router in the same AS.

• However, those routes can be sent to eBGP routers in a different AS to share with other networks.

• This is why iBGP often uses a full mesh or route reflectors to share routes within the AS.

Plaintext for Memorization:


iBGP routes = no sharing with iBGP, yes sharing with eBGP.

Visual Picture:
Imagine a blue room (iBGP) where people don’t gossip with each other but can shout to an orange room
(eBGP) outside.

Question 10: Can eBGP routes be shared with other routers?

Answer:
Yes, eBGP routes learned from an eBGP peer can be shared with both eBGP and iBGP peers.

Memory Tip: eBGP = "everyone can know." Picture eBGP as a news broadcast that can be shared with
everyone, inside or outside the AS.

Explanation:
• eBGP routes from a different AS can be advertised to both eBGP peers (in other AS) and iBGP peers
(in the same AS).

• This allows networks to share external routes freely, helping the internet stay connected.

Plaintext for Memorization:


eBGP routes = share with both eBGP and iBGP.

Visual Picture:
Picture an orange megaphone (eBGP) broadcasting news to both a blue room (iBGP) and other orange
rooms (eBGP).

Question 11: What attributes are sent in iBGP and eBGP messages?

Answer:

• iBGP: Sends attributes like local preference in messages.

• eBGP: Does not send attributes like local preference in messages.

Memory Tip: iBGP = "internal, shares preferences." eBGP = "external, no preferences." Think of iBGP as
friends sharing favorite routes, while eBGP is formal and skips preferences.

Explanation:

• iBGP shares attributes like local preference (a way to rank routes) because routers in the same AS
need to agree on the best paths.

• eBGP doesn’t share local preference because different AS have their own rules and don’t need to
share internal preferences.

Plaintext for Memorization:


iBGP = sends local preference.
eBGP = no local preference.

Visual Picture:
Imagine iBGP as a blue notebook with a list of favorite routes shared inside a team. eBGP is an orange letter
with basic info, no favorites included.

Question 12: How do you configure iBGP between two routers?

Answer:
To configure iBGP, both routers must have the same AS number in their BGP configuration, and you specify
the neighbor’s IP and AS. Example:
We’ll use two routers (R1 and R2) in the same AS (AS 1000), connected via a single link. Each router will have
a loopback interface to simulate a network to advertise via iBGP.

Image Placeholder 1: Insert a diagram showing two routers (R1 and R2) connected via a single Ethernet link
(e.g., FastEthernet0/0 on both routers). Label R1 with IP 10.10.12.1/30 and R2 with 10.10.12.2/30 on the
link. Show loopback interfaces: R1 (150.1.1.1/32) and R2 (150.2.2.2/32). Include a text label indicating both
routers are in AS 1000.

Step 2: Configure IP Addresses

Configure the physical and loopback interfaces on both routers to establish connectivity.

R1 Configuration

R2 Configuration
Explanation:

• The FastEthernet0/0 interfaces form the physical connection between R1 and R2 using a /30 subnet.

• Loopback0 interfaces simulate networks that will be advertised via iBGP.

• The no shutdown command activates the interfaces.

Verification:

• On R1, ping R2’s FastEthernet0/0 IP:

Expected output: Successful ping replies (e.g., “!!!!!”, indicating connectivity).

Image Placeholder 3: Insert a screenshot of the emulator’s console showing the successful ping from R1 to
R2 (10.10.12.2).

Step 3: Configure iBGP on R1

Set up the BGP process on R1 and establish an iBGP neighbor relationship with R2.

Explanation:
• router bgp 1000: Starts the BGP process with AS number 1000.

• neighbor 10.10.12.2 remote-as 1000: Defines R2 as an iBGP neighbor (same AS number).

• network 150.1.1.1 mask 255.255.255.255: Advertises R1’s loopback interface into BGP.

Step 4: Configure iBGP on R2

Configure R2 to form an iBGP session with R1 and advertise its loopback interface.

Explanation:

• Similar to R1, R2 is configured to run iBGP in AS 1000 and peers with R1.

• R2 advertises its loopback interface (150.2.2.2/32).

Image Placeholder 4: Insert a screenshot of the emulator’s console showing the BGP configuration
commands entered on R1 and R2.

Step 5: Verify iBGP Neighbor Relationship

Check if the iBGP session is established between R1 and R2.

On R1:

Expected Output:
• Look for “State/PfxRcd” showing “1” (indicating one prefix received from R2) and “Up/Down”
showing a time (e.g., “00:05:00”), confirming the session is up.

On R2:

• Similar output should show R1 (10.10.12.1) as a neighbor with one prefix received.

Image Placeholder 5: Insert a screenshot of the show ip bgp summary output on R1, highlighting the
neighbor state and prefixes received.

Step 6: Verify BGP Routes

Check the BGP routing table to ensure each router has learned the other’s loopback network.

On R1:

Expected Output:
• The route to 150.2.2.2/32 is learned via iBGP (note the “i” for internal).

On R2:

• Should show 150.1.1.1/32 learned from R1.

Image Placeholder 6: Insert a screenshot of the show ip bgp output on R1, highlighting the learned route
(150.2.2.2/32).

Step 7: Test Connectivity

Verify that R1 can ping R2’s loopback address and vice versa, using the BGP-learned routes.

On R1:

Expected Output:
On R2:

• Should also succeed.

Explanation:

• The source keyword ensures the ping uses the loopback interface, testing the BGP-advertised routes.

• If the ping fails, check if the BGP session is up (show ip bgp summary) and ensure routes are in the
routing table (show ip route).

Image Placeholder 7: Insert a screenshot of the successful ping from R1 to R2’s loopback (150.2.2.2).

Step 8: Troubleshoot (If Needed)

If the iBGP session doesn’t form or routes aren’t exchanged:

1. Check Connectivity: Ensure R1 and R2 can ping each other’s FastEthernet IPs.

2. Verify BGP Configuration:

• Confirm AS numbers match (1000 for both routers).

• Check neighbor IP addresses are correct.

3. Check BGP State:

• Look for “State: Established.” If stuck in “Active” or “Idle,” check for typos or connectivity
issues.

4. Enable Debugging (use cautiously):

• Watch for error messages about neighbor establishment.


Image Placeholder 8: Insert a screenshot of the show ip bgp neighbors output on R1, showing the
“Established” state.

Step 9: Save Configurations

Save the configurations on both routers to ensure they persist after a reboot.

On R1 and R2:

Image Placeholder 9: Insert a screenshot of the “write memory” command output, confirming the
configuration is saved.

Question 13: How do you configure eBGP between two routers?

Answer:

• Objective: Configure eBGP between two routers in different AS to exchange routing information.
• Topology: Two routers (R1 and R2) connected via a single link. R1 is in AS 100, and R2 is in AS 200.
Each router has a loopback interface to simulate networks.

• R1: In AS 100, with loopback0 (1.1.1.1/32) and Gig0/0 (192.168.12.1/30).

• R2: In AS 200, with loopback0 (2.2.2.2/32) and Gig0/0 (192.168.12.2/30).

• Link: The 192.168.12.0/30 subnet connects R1 and R2.

Step 1: Set Up the Physical/Virtual Connections

1. Launch Your Simulator: Open GNS3, Packet Tracer, or your preferred tool.
2. Add Two Routers: Place two Cisco routers (e.g., Cisco 7200 in GNS3 or equivalent in Packet Tracer).
3. Connect the Routers:
o Connect R1’s GigabitEthernet0/0 to R2’s GigabitEthernet0/0 using a serial or Ethernet link.
o If using a simulator, ensure the link is active (e.g., green link status in GNS3).
4. Power On Routers: Start both routers in the simulator.

Step 2: Configure Hostnames and Interfaces


Configure each router’s hostname and interfaces via the Cisco CLI.

On R1:

On R2:

Explanation:
• Hostnames help identify routers.
• The GigabitEthernet0/0 interfaces use a /30 subnet for the point-to-point link.
• Loopback0 interfaces simulate networks to advertise via BGP.
• no shutdown activates the interfaces.

Step 3: Verify Connectivity


Ensure R1 and R2 can ping each other’s GigabitEthernet0/0 IP addresses.

On R1:
On R2:

Troubleshooting:

• If pings fail, check interface status (show ip interface brief) and ensure interfaces are “up/up.”
• Verify IP addresses and subnet masks.

Step 4: Configure eBGP

Set up eBGP between R1 (AS 100) and R2 (AS 200).

On R1:

On R2:
Explanation:

• router bgp <AS> starts the BGP process with the specified AS number.
• neighbor <IP> remote-as <AS> defines the neighbor and its AS number.
• network <IP> mask <mask> advertises the loopback network into BGP. The exact mask is required
for loopback interfaces (/32).

Step 5: Verify eBGP Neighbor Adjacency

Check if the eBGP session is established.

On R1:

On R2:
Explanation:

• The State/PfxRcd column shows “1,” indicating one prefix received from the neighbor.
• If the state is “Active” or blank, the session isn’t established. Check AS numbers, neighbor IPs, or
connectivity.
Step 6: Verify BGP Routes

Confirm that each router has learned the other’s loopback network via BGP.

On R1:

On R2:

Explanation:

• R1 learns 2.2.2.2/32 from R2 (AS 200).


• R2 learns 1.1.1.1/32 from R1 (AS 100).
• The > symbol indicates the best path.

Step 7: Test End-to-End Connectivity

Ping R2’s loopback (2.2.2.2) from R1 and vice versa to confirm BGP routes work.

On R1:
On R2:

Explanation:

• The source option ensures the ping uses the loopback IP, verifying BGP-advertised routes.
• If pings fail, check the routing table (show ip route) and BGP table (show ip bgp).

Step 8: Save Configurations

Save the configurations on both routers to persist after a reboot.

On R1 and R2:

Troubleshooting Tips
• BGP Not Forming:
o Verify neighbor IP and AS numbers match on both sides.
o Ensure interfaces are up (show ip interface brief).
o Check for firewalls or ACLs blocking TCP port 179 (BGP).
• Routes Not Advertised:
o Confirm the network command matches the exact subnet/mask in the routing table.
o Use show ip route to verify the network exists locally.
• Ping Fails:
o Check the routing table (show ip route) to ensure BGP routes are installed.
o Verify next-hop reachability.

Optional Enhancements
• Advertise More Networks: Add more loopback interfaces and advertise them via BGP.
• Use Loopback for BGP: Configure BGP to use loopback IPs as neighbors (requires neighbor <IP>
update-source Loopback0 and a static route or IGP).
• Add Authentication: Use neighbor <IP> password <password> for security.

Key Notes

• iBGP vs. eBGP: iBGP runs within the same AS (AS 1000 in this lab), while eBGP runs between
different ASes. This lab focuses on iBGP.

• Loopback Interfaces: Using loopbacks for iBGP peering is common in real networks for stability. For
simplicity, this lab uses physical interface IPs.

• Full Mesh Requirement: In iBGP, all routers in the same AS must be fully meshed (each router peers
with every other router) unless using route reflectors. This lab uses a simple two-router setup, so a
full mesh is achieved.

• Scalability: For larger networks, consider using route reflectors to reduce the number of iBGP
sessions (as mentioned in).
Plaintext Summary for Memorization

• BGP = Border Gateway Protocol, routes data.


• iBGP = same AS, inside, TTL 255, AD 200, no direct connection, next hop same, no iBGP-to-iBGP
sharing, sends local preference.

• eBGP = different AS, outside, TTL 1, AD 20, direct connection, next hop changes, shares with all, no
local preference.

• iBGP config = same AS, neighbor IP, network.

• eBGP config = different AS, neighbor IP, network.

➢ IBGP

➢ EBGP
➢ BGP TABLES.
Question 1: What are the three tables used by BGP, and what do they do?

Answer:
BGP (Border Gateway Protocol) uses three tables to manage routing information:

BGP (Border Gateway Protocol) uses three main tables to manage routing information:

1. Neighbor Table ( Green): This table lists all the routers that BGP is connected to (called
neighbors). It shows details like their IP addresses and connection status.

o Command: Use show ip bgp summary to see this table.

2. Forwarding Table ( Purple): This table lists all the networks BGP knows about, along with their
paths and attributes (like which path is best).

o Command: Use show ip bgp to view this table.

3. Routing Table ( Blue): This table shows the best path to each network and the next hop (where to
send traffic).

o Command: Use show ip route bgp to check this table.

Plaintext to Memorize:
"Neighbor lists friends, Forwarding knows paths, Routing picks the best."

Memory Tip:
Think of BGP as a travel planner:

• Neighbor Table is your list of friends (routers) you talk to.

• Forwarding Table is a map showing all possible roads to destinations.

• Routing Table is the final itinerary with the best roads to take.

Easy Explanation:
Imagine you’re planning a trip. The Neighbor Table is like your phone’s contact list of friends (routers) you
can ask for directions. The Forwarding Table is like a big map showing all possible routes to a city. The
Routing Table is your GPS picking the fastest route to your destination.

Question 2: What does the show ip bgp summary command show, and what is an example from the
document?

Answer:
The show ip bgp summary command displays the Neighbor Table ( Green). It shows:

• A list of all BGP neighbors (other routers BGP talks to).

• The BGP router ID (like a name for your router, e.g., 1.11.11.11).

• The local AS number (your router’s group number, e.g., AS 1).


• Memory usage for network and path entries (e.g., 240 bytes for networks, 104 bytes for paths).

• The status of each neighbor (whether they’re connected or not).

Plaintext to Memorize:
"Show ip bgp summary = Neighbor Table, shows router ID and AS number."

Memory Tip:
Think of “summary” as a quick summary of your router’s buddies (neighbors). Picture a green phone ( )
showing your contacts list to remember it’s the Neighbor Table.

Easy Explanation:
This command is like checking your phone’s contact list to see who’s online and ready to talk. It tells you
about your router’s friends (neighbors) and how much space their info takes up in memory.

❖ FIELDS IN SH IP BGP SUMMARY

Simple Description of Key Fields:

• BGP router identifier: The IP address identifying this BGP router (e.g., 192.168.1.1).

• Local AS number: The Autonomous System number of this router (e.g., 65001).

• BGP table version: Tracks changes to the BGP routing table (higher number = more updates).

• Network entries: Number of prefixes in the BGP table.

• Path entries: Number of paths to those prefixes.

• Memory usage: Bytes used by BGP for prefixes, paths, and attributes.
• Neighbor: IP address of the BGP neighbor.

• V: BGP version (usually 4 for IPv4).

• AS: Neighbor’s Autonomous System number.

• MsgRcvd/MsgSent: Number of BGP messages received/sent from/to the neighbor.

• TblVer: Neighbor’s BGP table version.

• InQ/OutQ: Number of messages queued to be processed or sent.

• Up/Down: Duration the BGP session has been up or down.

• State/PfxRcd: Session state (e.g., Established) or number of prefixes received from the neighbor.

Question 3: What information does the Forwarding Table provide, and what command shows it?

Answer:
The show ip bgp command shows the Forwarding Table ( Purple). It includes:

• Networks (e.g., 22.22.22.0/24) that BGP knows about.

• Next Hop (e.g., 192.168.12.2, the next router to send traffic to).

• Metric, LocPrf, Weight: These are numbers BGP uses to pick the best path.

• Path: The list of AS (Autonomous Systems) the route passes through (e.g., 32.68).

• Status Codes:

o * (valid route).

o > (best path chosen).

o i (internal route), etc.

• Origin Codes:

o i (network learned via a command).

o ? (redistributed network).

o e (learned from an older protocol called EGP).

Plaintext to Memorize:
"Forwarding Table = show ip bgp, shows networks, next hop, and best path."

Memory Tip:
Picture a purple map ( ) with all the roads and a big star ( ) marking the best one. The star reminds you
of the > symbol for the best path.

Easy Explanation:
This command is like opening a map app that shows all possible roads to a destination. It tells you the roads
(networks), where to turn next (next hop), and which road is the fastest (best path).
❖ FIELD IN SH IP BGP

Explanation of Key Columns

• Network: The destination IP prefix (e.g., 10.0.0.0/8) in the BGP table.

• Next Hop: The IP address of the next router to reach the destination.

• Metric: A value used to determine route preference (lower is better).

• LocPrf: Local preference, used to prefer certain paths within the same AS (higher is better).

• Weight: A Cisco-specific value to prefer routes (higher is better, local to the router).

• Path: The AS (Autonomous System) path, showing the sequence of AS numbers the route traverses.

• Status Codes:

o * means the route is valid.

o > indicates the best route for that prefix.

o i (internal) or ? (incomplete) shows the origin of the route.

• Origin Codes:

o i (IGP, learned via an interior gateway protocol),

o e (EGP),

o ? (incomplete, usually redistributed routes).

Key Points

• The > symbol marks the best path used for routing.

• This command helps diagnose issues like missing routes or incorrect AS paths.

• It’s critical for managing BGP in large networks or ISPs.


Question 4: What do the status codes like * and > mean in the Forwarding Table / show ip bgp output

Answer:
The status codes ( Brown) in the show ip bgp command tell you about the routes:

• * (asterisk): The route is valid and can be used.

• > (greater than): This is the best path chosen by BGP to reach the network.

• Other codes:

o i (internal): Route learned from inside the same AS.

o s (suppressed): Route is not used due to a policy.

o d (damped): Route is temporarily ignored due to instability.

o r (RIB-failure): Route wasn’t added to the routing table.

o S (stale): Route is old and might not be valid anymore.

Plaintext to Memorize:
"> = Best path in Forwarding Table."

Memory Tip:
Picture a brown checklist ( ) with a checkmark (*) for valid routes and a gold star (>) for the best one.
Imagine smaller notes for other codes like i or s.

Easy Explanation:
Think of * as a checkmark ( ) saying, “This route works!” The > is like a gold star ( ) saying, “This is the
best route!” Other codes are like notes explaining why a route isn’t used.

Question 5: What is the Routing Table, and what command displays it?

Answer:
The Routing Table lists the best paths to reach destination networks, including the next hop IP address
where traffic should be sent. It only includes the routes BGP has chosen as the best. The command to view it is
show ip route bgp.
The show ip route bgp command shows the Routing Table ( Blue). It lists:

• The best path to each network (e.g., 22.22.22.0/24).

• The next hop IP address (e.g., 192.168.12.2, where to send traffic).

• The Administrative Distance (e.g., 20 for eBGP, a priority number).

• The time since the route was learned (e.g., 01:36:07, meaning 1 hour, 36 minutes, 7 seconds).

• A code B to show the route was learned via BGP.


Plaintext to Memorize:
"Routing Table = show ip route bgp, shows best paths and next hop."

Memory Tip:
Think of a blue GPS screen ( ) showing only the best route. Imagine a clock ( ) on the screen to remind
you of the time since the route was learned.

Easy Explanation:
This command is like your GPS giving you the final driving directions. It picks the best road (path) and tells
you exactly where to turn next (next hop) to reach your destination.

❖ FIELD IN SH IP ROUTE BGP

Simple Description

• Command Purpose: Displays only the BGP-learned routes in the router’s routing table.

• Output Breakdown:

o B: Indicates the route was learned via BGP.

o Network (e.g., 192.168.2.0/24): The destination network.

o [20/0]: The first number (20) is the BGP administrative distance (external BGP default is
20). The second number (0) is the metric, though BGP often uses attributes like AS path
instead.

o via 10.1.1.2: The next-hop IP address to reach the destination.

o 00:15:32: How long the route has been in the table (uptime).
• Use Case: Helps network administrators verify which routes are being learned from BGP neighbors,
check next-hop addresses, and troubleshoot routing issues.

• Key Notes:

o Only BGP routes are shown, not routes from other protocols like OSPF or static routes.

o The output may vary slightly depending on the router vendor or software version.

Question 6: What does the Next Hop field mean in BGP tables?

Answer:
The Next Hop ( Yellow) in BGP tables tells the router where to send traffic for a specific network.

• In the Forwarding Table: A next hop of 0.0.0.0 means the network is local (originated on this
router). Otherwise, An IP like 192.168.12.2 means the router learned the network from that IP.

In the Routing Table (show ip route bgp):

• It shows the IP address (e.g., 192.168.12.2) of the next router to forward traffic to.

Plaintext to Memorize:
"Next Hop = Where to send traffic next; 0.0.0.0 means it’s local."

Memory Tip:
Picture a yellow road sign ( ) pointing to the next town (router). If it says “0.0.0.0,” it’s like saying, “You’re
already at the starting point!”

Easy Explanation:
Next Hop is like the address of the next person you pass a package to, so they can deliver it to the final
destination. If it’s 0.0.0.0, you’re the one holding the package.

Question 7: What is the Administrative Distance in the Routing Table, and what’s an example from the
document?

Answer:
The Administrative Distance (AD) ( Red) is a number that shows how trustworthy a route is in the
Routing Table (show ip route bgp). It helps the router decide which route to use when multiple protocols
(like BGP, OSPF, or RIP) provide paths to the same network.

• For eBGP (external BGP, between different Autonomous Systems), the AD is 20, meaning it’s very
trustworthy.

• For iBGP (internal BGP, within the same Autonomous System), the AD is 200, making it less preferred
than eBGP.

• A lower AD means the route is preferred over routes from other protocols. For example:

o OSPF has an AD of 110, so eBGP (AD 20) is preferred over OSPF.


o RIP has an AD of 120, so eBGP is also preferred over RIP.

• The AD is shown in the show ip route bgp output, for example:

o 22.22.22.0 [20/0] via 192.168.12.2 means the route has an AD of 20 (eBGP).

Plaintext to Memorize:
"AD = Trust level; eBGP AD is 20."

Memory Tip:
Picture a red trust badge ( ) with the number 20 for eBGP, shining brightly to show it’s the most trusted.
Imagine higher numbers (like 110 for OSPF) as less shiny badges, so eBGP always wins.

Easy Explanation:
Think of Administrative Distance as a trust score for routes. A lower score (like 20 for eBGP) means the router
trusts that route more and will choose it over routes with higher scores (like OSPF’s 110 or RIP’s 120). It’s like
picking the most reliable friend to guide you on a trip.

Color-Coded Text Picture for Easy Reference

Below is a color-coded summary of the key points to make it visually easy to remember. Colors are chosen to
be clear in both light and dark themes.

text

Copy

**BGP Tables Summary**

**Neighbor Table**: Lists BGP friends (routers). Command: *show ip bgp summary*

- Example: Router ID = 1.11.11.11, AS = 1

**Forwarding Table**: Shows all networks and paths. Command: *show ip bgp*

- Example: Network 22.22.22.0/24, Next Hop 192.168.12.2, > = Best path

**Routing Table**: Lists best paths and next hop. Command: *show ip route bgp*

- Example: 22.22.22.0/24, Next Hop 192.168.12.2, AD = 20

**Next Hop**: Where to send traffic. 0.0.0.0 = Local network.

Color Key:

• Blue: Neighbor Table (think “blue for buddies”).

• Green: Forwarding Table (think “green for guidance”).

• Yellow: Routing Table (think “yellow for your best route”).

• Red: Next Hop (think “red for redirecting traffic”). show ip bgp Command
➢ BGP ACTIVE AND PASSIVE.

Interview Question 1: What does "Active" and "Passive" mean in BGP?

Answer:
In BGP, Active means the router is the client and tries to start the connection using a random port (above
1023). Passive means the router is the server and waits for the connection on TCP port 179.

Easy Explanation:
Think of BGP like a phone call. The Active router is like someone who picks up the phone and dials (using a
random port). The Passive router is like someone waiting for the phone to ring (on port 179). Only one router
needs to start the call for BGP to work.

Memory Tip:
Imagine Active = Always Calling (like a client making a call) and Passive = Patiently Waiting (like a server
answering). Blue is for calm, like the Passive server waiting.

Interview Question 2: Which router starts the BGP connection by default?

Answer:
By default, the router with the lowest BGP Router ID (RID) starts the connection and becomes Active. The
other router becomes Passive and waits.

Easy Explanation:
BGP routers have an ID, like a name tag. The router with the "smaller name" (lowest RID) takes charge and
starts the connection, while the other waits. It’s like two friends deciding who calls first—the one with the
shorter name does!

Memory Tip:
Think of Green = Go, like the router with the lowest ID "goes first" to start the connection. Picture a green
light for the Active router.

Interview Question 3: What ports do Active and Passive routers use in BGP?

Answer:
The Active router uses a random port (higher than 1023, like 25117 or 65479). The Passive router always
uses TCP port 179.

Easy Explanation:
Ports are like doors for communication. The Passive router always uses the same door (port 179), like a
house with one entrance. The Active router picks any random door (above 1023) to knock on the Passive
router’s door.

Memory Tip:
Red = Remember 179 for the Passive router’s port. Imagine a red door labeled "179" for the Passive router,
and a random red number for the Active router’s port.
Interview Question 4: How can you check if a router is Active or Passive in BGP?

Answer:
Use the command show ip bgp neighbors | in host on the router. It shows:

• Local host/port: The router’s own IP and port.

• Foreign host/port: The neighbor’s IP and port.


If the Local port is 179, the router is Passive. If it’s a random number (e.g., 25117), the router is
Active.

Easy Explanation:
This command is like checking a router’s call log. If the router’s port is 179, it’s waiting (Passive). If it’s a
random number, it’s calling (Active). For example, if R1’s local port is 179 and R2’s is 25117, R1 is Passive, and
R2 is Active.

Memory Tip:
Purple = Probe with Commands. Picture a purple magnifying glass inspecting the router’s status.
Remember "179 = Passive" and "random = Active."

Interview Question 5: What happens when you use the clear ip bgp * command?

Answer:
The clear ip bgp * command resets all BGP connections. After this, the router with the lowest BGP Router ID
becomes Active again, and the other becomes Passive.

Easy Explanation:
This command is like restarting a phone call. It hangs up all BGP connections, and the routers decide again
who calls (Active) based on the lowest Router ID. For example, after clearing, R1 might become Active
(random port) and R2 Passive (port 179).

Memory Tip:
Orange = Off and On. Imagine an orange reset button that restarts BGP, making the lowest ID router Active
again.

Interview Question 6: How can you manually set a router to be Active or Passive in BGP?

Answer:
To make a router Passive, use:
neighbor <IP> transport connection-mode passive
To make a router Active, use:
neighbor <IP> transport connection-mode active
For example, on R1:
R1(config-router)#neighbor 192.168.12.2 transport connection-mode passive makes R1 Passive. On R2:
R2(config-router)#neighbor 192.168.12.1 transport connection-mode active makes R2 Active.

Easy Explanation:
By default, BGP decides who’s Active or Passive based on Router ID. But you can force it with these commands,
like telling one router, “You wait for the call” (Passive) and the other, “You make the call” (Active).
Memory Tip:
Yellow = You Control. Picture a yellow switch you flip to decide if a router is Active or Passive. Yellow
reminds you of manually setting the mode.

Interview Question 7: Why might you want to manually set Active or Passive modes?

Answer:
Manually setting Active or Passive modes helps control which router starts the BGP connection. This is
useful for:

• Security: Making a trusted router Passive to control incoming connections.

• Network design: Ensuring specific routers initiate connections for better management.

• Troubleshooting: Forcing a router to be Active or Passive to test connectivity.

Easy Explanation:
It’s like deciding who calls in a group project. By setting one router as Passive, you ensure it waits for a trusted
router to connect, which can make your network safer or easier to manage.

Memory Tip:
Pink = Plan. Think of a pink planner where you decide which router calls or waits to keep things organized.

Color-Coded Text Picture for Easy Reference

text

Copy

**Active = Client, calls with random port > 1023** | **Passive = Server, waits on port 179**

**Lowest BGP Router ID** starts as Active by default

**Ports**: Passive = 179 | Active = Random (e.g., 25117, 65479)

**Command**: `show ip bgp neighbors | in host` checks Active/Passive

**Reset**: `clear ip bgp *` restarts, lowest ID becomes Active

**Manual Config**: `transport connection-mode active` or `passive`

**Why?**: Control, security, or troubleshooting


➢ BGP NEIGHBOR STATES

Question 1: What are BGP neighbor states, and why are they important?

Answer (in Blue for Basics):


BGP neighbor states are the different stages two routers go through to become friends (peers) and share
routing information. They’re important because they show how two routers connect, talk, and agree to share
network paths using the Border Gateway Protocol (BGP).

Simple Explanation:
Think of BGP neighbor states like the steps you take to make a new friend. First, you say hi (connect), then you
introduce yourself (send messages), and finally, you start sharing stories (routes). If something goes wrong,
you might stop talking (go back to the start). These states help you know if the routers are ready to share
network information.

Memory Tip:
Imagine BGP as a friendship process. Each state is a step in making a strong connection, like meeting,
chatting, and trusting each other. Picture a ladder where each step is a state you climb to reach a full
friendship.

Color Used:
Blue – Represents the foundation of BGP, easy to remember as the starting point.

Question 2: What is the first BGP neighbor state, and what happens in it?

Answer (in Red for Idle):


The first state is Idle. In this state, the router is not talking to its neighbor. It’s either turned off, just set up,
waiting to try again, or reset after a problem.

Simple Explanation:
Idle is like when you’re not ready to talk to someone yet. The router is quiet, maybe because it’s not
configured properly, or it’s waiting for the right moment to start a conversation. It’s the starting line before
any connection happens.

Memory Tip:
Think of Idle as a red stoplight . The router is stopped and not moving forward until it’s ready to connect.

Color Used:
Red – Like a stop sign, signaling the router is paused or not active.

Question 3: What happens in the Connect state?

Answer (in Orange for Connecting):


In the Connect state, the router tries to start a conversation using a TCP connection (like a phone call) on
port 179. It’s waiting for the TCP three-way handshake (SYN, SYN-ACK, ACK) to finish. If it works, it moves to
OpenSent. If it fails, it goes to Active or back to Idle if reset.
Simple Explanation:
Connect is like dialing a friend’s phone number. The router is trying to reach the other router using TCP. If
the call connects, they move forward. If it doesn’t, they either try again (Active) or give up for now (Idle).

Memory Tip:
Picture Connect as an orange phone ringing. Orange is bright and signals action, like trying to make a
connection.

Color Used:
Orange – Represents the action of trying to connect, like a bright, hopeful signal.

Question 4: What is the Active state in BGP?

Answer (in Purple for Persistence):


In the Active state, the TCP connection failed, and the router is trying again. It’s waiting for the Connect-
Retry timer to finish or listening for the other router to start the TCP connection. If it connects, it moves to
OpenSent. If reset, it goes back to Idle.

Simple Explanation:
Active is like redialing a friend after a dropped call. The router is persistent, trying to reconnect or waiting
for the other router to call. It’s not giving up yet but hasn’t succeeded.

Memory Tip:
Think of Active as a purple retry button . Purple stands for persistence, as the router keeps trying to make
the connection work.

Color Used:
Purple – Symbolizes effort and retrying, a unique color to stand out.

Question 5: What happens in the OpenSent state?

Answer (in Green for Progress):


In OpenSent, the TCP connection is successful, and the router sends a BGP Open Message (like introducing
itself). It’s waiting for the other router to send its Open Message back. If it doesn’t get one, it stays here or
resets to Idle.

Simple Explanation:
OpenSent is like shaking hands after connecting. The router says, “Hi, I’m ready to be friends!” and waits for
the other router to say the same. It’s a step closer to sharing routes.

Memory Tip:
Picture OpenSent as a green handshake . Green means progress, like moving forward in the friendship.

Color Used:
Green – Represents progress and moving closer to a connection, like a green light.

Question 6: What is the OpenConfirm state?


Answer (in Yellow for Confirmation):
In OpenConfirm, both routers have sent and received Open Messages. Now, they’re waiting for a Keepalive
message (like a “Are you still there?” ping). If the Keepalive is received, they move to Established. They keep
sending Keepalives to stay connected.

Simple Explanation:
OpenConfirm is like checking if your friend is still on the call. Both routers have introduced themselves,
and now they send a quick “I’m here!” message to confirm they’re ready to share routes.

Memory Tip:
Think of OpenConfirm as a yellow checkmark . Yellow is bright and signals confirmation that things are
going well.

Color Used:
Yellow – Stands for confirmation, like a bright signal that both sides agree.

Question 7: What is the Established state, and what happens there?

Answer (in Cyan for Completion):


In Established, the routers are fully connected as BGP peers. They can now exchange routing information
(Update messages) and keep the connection alive with Keepalive messages. If something goes wrong (like a
Notification message), they go back to Idle.

Simple Explanation:
Established is like being best friends. The routers trust each other and share network paths (routes). They
keep checking in with Keepalives to make sure the friendship stays strong.

Memory Tip:
Picture Established as a cyan trophy . Cyan is a cool, calm color that shows the connection is complete and
successful.

Color Used:
Cyan – Represents completion and a stable, working connection.

Question 8: How do you configure BGP neighbors, and why is it manual?

Answer (in Pink for Configuration):


To configure BGP neighbors, you manually enter commands on each router. For example:

• On Router 1: router bgp 1 and neighbor 192.168.12.2 remote-as 2.

• On Router 2: router bgp 2 and neighbor 192.168.12.1 remote-as 1.


BGP neighbors are manual because BGP doesn’t automatically find neighbors like OSPF or EIGRP. You
tell the routers exactly who to talk to.

Simple Explanation:
Configuring BGP is like giving a router a phone number to call a specific friend. You have to set it up
manually because BGP doesn’t shout out to find neighbors—it’s picky and only talks to routers you specify.
Memory Tip:
Think of manual configuration as a pink address book . Pink is memorable, and it reminds you that you
need to write down the neighbor’s details yourself.

Color Used:
Pink – Stands for manual setup, a unique color for configuration tasks.

Question 9: What is the role of TCP port 179 in BGP?

Answer (in Magenta for Connection):


BGP uses TCP port 179 to create a reliable connection between two routers. It’s like the phone line they use
to talk and send messages (Open, Keepalive, Update).

Simple Explanation:
Port 179 is like the specific phone number BGP uses to call its neighbor. It ensures the routers can talk
securely and reliably using TCP.

Memory Tip:
Picture port 179 as a magenta phone cord connecting two routers. Magenta is vibrant and helps you recall
this specific port.

Color Used:
Magenta – Represents the connection channel, bright and distinct.

Question 10: What happens if a BGP connection fails or is reset?

Answer (in Brown for Reset):


If a BGP connection fails or is reset, the routers go back to the Idle state. For example, if the TCP connection
fails in Connect or Active, or if a Notification message is received in Established, the process restarts from
Idle.

Simple Explanation:
A reset is like hanging up the phone and starting over. If something goes wrong (like a bad connection or an
error message), the routers stop talking and go back to the beginning (Idle).

Memory Tip:
Think of a reset as a brown eraser wiping the slate clean. Brown is earthy and reminds you of starting
fresh.

Color Used:
Brown – Symbolizes resetting or starting over, like clearing the board.

Easy Color Text Picture for Reference


Additional Notes for the Picture:

1. Idle

Explanation: The router is not talking to its neighbor. It’s either off, just configured, waiting to retry, or reset
after a problem. This is the starting point where no connection exists.

2. Connect

Explanation: The router tries to start a connection using TCP on port 179. It’s waiting for the TCP three-
way handshake (SYN, SYN-ACK, ACK). If it works, it moves to OpenSent. If it fails, it goes to Active or back to
Idle.

3. Active

Explanation: The TCP connection failed, and the router is retrying. It’s waiting for the Connect-Retry timer
or listening for the other router to start the connection. If successful, it moves to OpenSent. If reset, it goes
back to Idle.

4. OpenSent
Explanation: The TCP connection is successful, and the router sends a BGP Open Message (like saying
“Hi!”). It waits for the other router’s Open Message. If it doesn’t get one, it stays here or resets to Idle.

5. OpenConfirm

Explanation: Both routers have sent and received Open Messages. They now wait for a Keepalive
message (like a “You still there?” ping). If the Keepalive is received, they move to Established.

6. Established

Explanation: The routers are fully connected as BGP peers. They can share routes (Update messages) and
send Keepalive messages to stay connected. If something fails (like a Notification message), they go back to
Idle.
➢ BGP MESSAGE TYPES
Question 1: What are the four main BGP message types used in its operations?

Answer: BGP uses four main message types to communicate between routers:

1. Open ( Green): Starts a connection between two BGP routers.

2. Update ( Blue): Shares routing information, like new or removed routes.

3. Keepalive ( Yellow): Keeps the connection alive by sending periodic "hellos."

4. Notification ( Red): Sent when there's a problem, and it closes the connection

Plaintext Memory Tip:


O-U-K-N (Open, Update, Keepalive, Notification). Think of it as "Oh, You Keep Noticing" to recall the four types
in order.

Simple Explanation:
Remember the colors: Green for Open (start), Blue for Update (info), Yellow for Keepalive (stay
connected), Red for Notification (problem). Think of a traffic light: Green starts, Yellow keeps going, Red
stops, and Blue is the info in between.

Color-Coded Text Picture:

Question 2: What is the purpose of the BGP Open message, and what information does it include?

Answer:
The Open message ( Green) is the first message sent after two BGP routers are set up to talk. It helps them
become friends (establish a peering session). It includes:

• Version ( ): The BGP version (usually 4).

• AS Number ( ): The unique number of the router’s network.

• Router ID ( ): A unique ID for the router (like its name).

• Hold-Time ( ): How long the router waits before thinking the connection is lost.
Plaintext Memory Tip:
V-A-R-H (Version, AS Number, Router ID, Hold-Time). Think "Very Amazing Router Handshake" to remember
what’s in an Open message.

Simple Explanation:
The Open message is like a handshake when two routers meet. It’s the first message sent to say, “Hey, let’s be
friends and share routes!” It tells the other router important details like who it is (Router ID), which group it
belongs to (AS Number), what version of BGP it’s using, and how long it will wait for a reply (Hold-Time).

Color-Coded Text Picture:

Question 3: What does the BGP Update message do, and what does it contain?

Answer:
The Update message ( Blue) is used to share routing information between BGP routers. It contains:

• New Routes ( ): New paths to reach networks.

• Withdrawn Routes ( ): Paths that are no longer valid.

• Path Attributes ( ): Extra details about the routes, like the next hop or origin.

Plaintext Memory Tip:


N-W-P (New routes, Withdrawn routes, Path attributes). Think "New Way Please" to recall what’s in an
Update message.

Simple Explanation:
Think of the Update message as a newsletter. It tells your BGP friend, “Here’s a new way to get to this network,
and this old way doesn’t work anymore.” It’s like updating a map with new roads or crossing out closed ones.

Color-Coded Text Picture:


Question 4: What is the role of the BGP Keepalive message, and how often is it sent?

Answer:
The Keepalive message ( Yellow) is a simple message sent to keep the BGP connection active. It’s like
saying, “I’m still here!” to the other router.

• It’s sent every 60 seconds ( ).

• The Hold Timer is 180 seconds ( ) by default, meaning if no Keepalive or Update is received in
180 seconds, the connection is considered down.(if no message is received in 180 seconds, the
connection is considered dead).

Plaintext Memory Tip:


60-180 (60 seconds for Keepalive, 180 seconds for Hold Timer). Think "60 keeps it alive, 180 says goodbye"
to remember the timers.

Simple Explanation:
The Keepalive message is like a heartbeat. Every 60 seconds, a router sends it to its BGP neighbor to say, “I’m
still here, don’t end our connection!” If the neighbor doesn’t hear anything for 180 seconds (the Hold Timer),
it assumes the router is gone and ends the connection.

Color-Coded Text Picture:

Question 5: When is the BGP Notification message used, and what does it do?

Answer:
The Notification message ( Red) is sent when there’s a problem with the BGP connection, like a wrong AS
number or bad settings.

• It closes the connection ( ).

• It includes an error code ( ) to explain what went wrong (e.g., “Bad Peer AS”).

• After sending, the BGP session resets ( ).

Plaintext Memory Tip:


N-E-R (Notification, Ends, Resets). Think "Notice Ends Relationship" to remember its purpose.

Simple Explanation:
Red ( ) means “stop” or “error.” Picture a red warning sign flashing when something goes wrong, like a
wrong AS number, and the connection shuts down.
Color-Coded Text Picture:

You might also like