Cisco BGP Interview Questions and Answers
Cisco BGP Interview Questions and Answers
These questions cover fundamental BGP concepts, ideal for beginners or those refreshing
their knowledge.
1. What is BGP?
6. What is eBGP?
7. What is iBGP?
Answer: Internal BGP, used between routers in the same AS.
Scenario: Routers within an ISP use iBGP to share external routes.
Memory Tip: iBGP = “Internal Buddies Gateway Protocol.”
Answer: A router with which a BGP router establishes a session to exchange routes.
Scenario: Two routers in different ASes become eBGP neighbors.
Memory Tip: Neighbor = “Nearby Router for Route Sharing.”
Answer: A TCP connection between two BGP routers to exchange routing information.
Scenario: A session is established before routes are shared.
Memory Tip: Session = “Secure Exchange Setup.”
Answer: The router is trying to establish a TCP connection but hasn’t succeeded.
Scenario: A firewall blocks TCP 179, keeping the router in Active.
Memory Tip: Active = “Attempting Connection.”
15. What is the BGP OpenSent state?
Answer: The router has sent an OPEN message and is waiting for a reply.
Scenario: A router sends its AS number and waits for confirmation.
Memory Tip: OpenSent = “Opened, Sent, Waiting.”
Answer: The router has received an OPEN message and is waiting for a KEEPALIVE.
Scenario: Both routers agree on parameters and confirm with KEEPALIVE.
Memory Tip: OpenConfirm = “Open, Checking Final.”
Answer: The BGP session is fully up, and routers exchange routes.
Scenario: Routers are now sharing full routing tables.
Memory Tip: Established = “Everything’s Set, Let’s Share.”
Answer: A message to initiate a BGP session, containing AS number, BGP version, etc.
Scenario: Routers exchange OPEN messages to start a session.
Memory Tip: OPEN = “Offer Protocol Essentials.”
Answer: 60 seconds.
Scenario: Routers send KEEPALIVE every minute to stay connected.
Memory Tip: “60 Seconds = Standard KEEPALIVE.”
23. What is the default BGP hold time?
Answer: A unique identifier for an autonomous system, 1 to 65535 (or 4-byte ASNs).
Scenario: An ISP uses AS 65000 to identify its network.
Memory Tip: AS Number = “Address for System.”
Answer: Multi-Exit Discriminator, influences path selection between ASes; lower is better.
Scenario: An ISP prefers a route with MED 50 over 100.
Memory Tip: MED = “Minimize Exit Decision.”
Answer: A Cisco-specific attribute to prefer routes; higher is better, local to the router.
Scenario: Set WEIGHT 1000 to prefer a route on one router.
Memory Tip: WEIGHT = “Winning Edge for Internal.”
Answer: Steps include highest WEIGHT, LOCAL_PREF, shortest AS_PATH, lowest MED, etc.
Scenario: A router chooses a route based on these criteria in order.
Memory Tip: “We Love Only Short Paths, Mind Exit” (WEIGHT, LOCAL_PREF, ORIGIN,
AS_PATH, MED, etc.).
Answer: Requires iBGP routes to be in the IGP (e.g., OSPF) before advertising to eBGP.
Scenario: Rarely used today; disabled by default.
Memory Tip: Sync = “Sync IGP with BGP.”
Answer: A unique identifier for a BGP router, typically the highest loopback IP.
Scenario: A router with loopback 1.1.1.1 uses it as its BGP ID.
Memory Tip: Router ID = “Router’s Identity.”
Answer: A router that reflects iBGP routes to other iBGP routers, reducing full-mesh needs.
Scenario: A central router reflects routes to avoid iBGP full mesh.
Memory Tip: Reflector = “Route Mirror.”
Answer: Divides a large AS into smaller sub-ASes to reduce iBGP full-mesh complexity.
Scenario: An ISP splits AS 65000 into sub-ASes 65001 and 65002.
Memory Tip: Confederation = “Coalition of ASes.”
Answer: Use bgp confederation identifier <main-as> and bgp confederation peers <sub-
as>.
Scenario: Set confederation: bgp confederation identifier 65000, bgp confederation peers
65001.
Memory Tip: “Confederation = Combine Fake ASes.”
Answer: A group of neighbors sharing the same BGP policies to simplify configuration.
Scenario: Apply the same policy to all ISP neighbors.
Memory Tip: Peer Group = “Pals with Equal Rules.”
Answer: Prevents a route from being advertised to eBGP neighbors in the same
confederation.
Scenario: Used in confederations to limit route scope.
Memory Tip: LOCAL_AS = “Local AS Only.”
Answer: Use ip as-path access-list <number> <permit|deny> <regex> and apply with
neighbor <ip> filter-list <number> in|out.
Scenario: Deny AS 200: ip as-path access-list 1 deny _200_, neighbor 192.168.1.2 filter-list
1 in.
Memory Tip: “AS_PATH = Analyze AS Sequence.”
Answer: Use route-map <name> permit|deny <sequence> and apply with neighbor <ip>
route-map <name> in|out.
Scenario: Set LOCAL_PREF 200: route-map SET_PREF permit 10, set local-preference 200,
neighbor 192.168.1.2 route-map SET_PREF in.
Memory Tip: “Route-Map = Rule for Routes.”
Answer: Use neighbor <ip-address> soft-reconfiguration inbound and clear ip bgp <ip-
address> soft in|out.
Scenario: Reapply filters: clear ip bgp 192.168.1.2 soft in.
Memory Tip: “Soft Clear = Subtle Refresh.”
68. What is BGP clear command?
Answer: BGP prevents loops by rejecting routes with its own AS in the AS_PATH.
Scenario: A router drops a route if its AS number appears in AS_PATH.
Memory Tip: Loop Prevention = “Look for Own AS.”
Answer: Requests a neighbor to resend its routing table without resetting the session.
Scenario: Update routes after a policy change.
Memory Tip: Route Refresh = “Request Route Resend.”
Answer: iBGP routes learned from one iBGP neighbor are not advertised to another iBGP
neighbor.
Scenario: Prevents loops within an AS.
Memory Tip: Split Horizon = “Stop Internal Sharing.”
Answer: Injects routes from another protocol (e.g., OSPF) into BGP.
Scenario: Share OSPF routes with an eBGP neighbor.
Memory Tip: Redistribute = “Relay Different Routes.”
Answer: Use ip prefix-list <name> permit|deny <prefix/len> and apply with neighbor <ip>
prefix-list <name> in|out.
Scenario: Allow 192.168.1.0/24: ip prefix-list ALLOW permit 192.168.1.0/24, neighbor
192.168.1.2 prefix-list ALLOW in.
Memory Tip: “Prefix-List = Permit Prefixes.”
Answer: Removes private AS numbers from the AS_PATH when advertising to eBGP.
Scenario: Strip AS 64512 from routes sent to an ISP.
Memory Tip: Remove-Private = “Rid Private ASes.”
91. How do you configure BGP remove-private-as?
These questions build on basic concepts, introducing more complex scenarios and
configurations.
Answer: Check link stability, dampening, and use debug ip bgp updates.
Scenario: Use debug ip bgp updates to spot flaps.
Memory Tip: “Debug Updates = Detect Flaps.”
106. What is BGP conditional advertisement?
Answer: Use ip prefix-list <name> permit|deny <prefix/len> and neighbor <ip> prefix-list
<name> in|out.
Scenario: Deny 172.16.0.0/12: ip prefix-list DENY_PRIVATE deny 172.16.0.0/12, neighbor
192.168.1.2 prefix-list DENY_PRIVATE in.
Memory Tip: “Prefix-List = Permit or Prohibit.”
Answer: An extended attribute for advanced policies, like VPN route targets.
Scenario: Used in MPLS VPNs to control route distribution.
Memory Tip: Extended Community = “Extra Club Rules.”
Answer: Adds the local AS multiple times to the AS_PATH to make a route less preferred.
Scenario: Prepend AS to influence inbound traffic.
Memory Tip: Prepend = “Pad AS_PATH.”
Answer: Use template peer-session <name> and inherit with neighbor <ip> inherit peer-
session <name>.
Scenario: Create template: template peer-session ISP, neighbor 192.168.1.2 inherit peer-
session ISP.
Memory Tip: “Template = Tidy Neighbor Config.”
Answer: Use template peer-policy <name> and inherit with neighbor <ip> inherit peer-
policy <name>.
Scenario: Create policy: template peer-policy CUSTOMER, neighbor 192.168.1.2 inherit
peer-policy CUSTOMER.
Memory Tip: “Policy Template = Predefined Policy Pack.”
Answer: Enabled by default; adjust with bgp nexthop trigger delay <seconds>.
Scenario: Set delay to 5 seconds: bgp nexthop trigger delay 5.
Memory Tip: “Nexthop Trigger = Track Next-Hop.”
Answer: Assigns sequence numbers to prefix-list entries for order and editing.
Scenario: Insert a new rule without rewriting the list.
Memory Tip: Sequence = “Sorted Prefix Rules.”
Answer: Compares MED across all routes, even from different ASes.
Scenario: Choose a route with lower MED regardless of AS.
Memory Tip: Always-Compare = “All MEDs Matter.”
Answer: Treats routes without MED as having the highest (worst) MED.
Scenario: Ensures routes with no MED are less preferred.
Memory Tip: Missing-MED = “Missing is Worst.”
Answer: Filters prefixes based on prefix length (greater than or equal, less than or equal).
Scenario: Allow prefixes between /24 and /26.
Memory Tip: GE/LE = “Greater/Lesser Length.”
Answer: Negotiates features like route refresh or 4-byte ASN with a neighbor.
Scenario: Ensure both routers support route refresh.
Memory Tip: Capability = “Can-Do Features.”
Answer: Enabled by default; explicitly set with neighbor <ip> capability <feature>.
Scenario: Enable route refresh: neighbor 192.168.1.2 capability dynamic.
Memory Tip: “Capability = Confirm Features.”
Answer: Prefix-list is more precise for prefixes; distribute-list uses ACLs for broader
matching.
Scenario: Use prefix-list for exact /24 prefixes, ACL for ranges.
Memory Tip: Prefix-List = “Precise,” Distribute-List = “Broad.”
Answer: Verify neighbor IP, AS, and ping; use show ip bgp neighbors.
Scenario: Check config: show ip bgp neighbors.
Memory Tip: “Show Neighbors = Spot Idle Issue.”
Answer: Check link stability, dampening, and use debug ip bgp updates.
Scenario: Use debug ip bgp updates to spot oscillations.
Memory Tip: “Debug Updates = Detect Route Dance.”
These questions dive into complex BGP scenarios, troubleshooting, and optimizations for
expert-level understanding.
Answer: Use bgp additional-paths select backup and neighbor <ip> advertise diverse-path.
Scenario: Advertise diverse path: neighbor 192.168.1.2 advertise diverse-path.
Memory Tip: “Diverse Path = Distinct Path Choice.”
Answer: A server that simplifies peering by reflecting routes without forwarding traffic.
Scenario: Used in internet exchange points (IXPs).
Memory Tip: Route Server = “Route Sharing Station.”
Answer: Extends BGP to support multiple address families (e.g., IPv6, VPNv4).
Scenario: Carry VPN routes in an MPLS network.
Memory Tip: MP-BGP = “Multi-Protocol BGP.”
Answer: The BGP table grows too large, exhausting router resources.
Scenario: A neighbor sends the full internet table.
Memory Tip: Overflow = “Overloaded BGP Table.”
Answer: Peer group applies to neighbors in the same AF; templates are reusable across
AFs.
Scenario: Use templates for complex multi-AF configs.
Memory Tip: Template = “Tweakable Multi-AF Rules.”
Answer: Allows peer groups to inherit settings from other groups or templates.
Scenario: Apply common settings to subgroups of neighbors.
Memory Tip: Inheritance = “Inherit Neighbor Rules.”
Answer: Ensures BGP works between Cisco and other vendors’ routers.
Scenario: A Cisco router peers with a Juniper router.
Memory Tip: Interoperability = “Integrate BGP Platforms.”
Answer: Session fails due to one router not supporting route refresh.
Scenario: A legacy router rejects refresh requests.
Memory Tip: Capability Mismatch = “Can’t Agree on Features.”
Answer: Check capabilities with show ip bgp neighbors and enable soft-reconfiguration.
Scenario: Enable soft-reconfig: neighbor 192.168.1.2 soft-reconfiguration inbound.
Memory Tip: “Show Neighbors = Spot Capability Clash.”
Answer: Peer groups reduce configuration and processing overhead for many neighbors.
Scenario: Manage 100 neighbors with one peer group.
Memory Tip: Peer Group = “Pack Neighbors Together.”
Answer: Filters VPN routes based on route targets to reduce table size.
Scenario: Limit VPN routes to specific VRFs.
Memory Tip: RT Filter = “Restrict Route Targets.”
Answer: Soft reconfiguration stores unfiltered routes from neighbors, increasing memory
usage significantly for large tables. Scenario: Enabling soft-reconfig for a neighbor sending
1M prefixes doubles memory needs. Memory Tip: Soft-Reconfig = “Saves Raw Routes, Eats
RAM.”
Answer: Use route refresh capability instead of soft-reconfiguration or limit with prefix
filters. Scenario: Disable soft-reconfig and enable refresh: no neighbor 192.168.1.2 soft-
reconfiguration inbound. Memory Tip: “Route-Refresh = Replace Soft-Reconfig.”
Answer: Incorrect peer group settings (e.g., wrong AS or policy) cause session failures or
route issues. Scenario: A peer group with mismatched AS numbers prevents sessions from
forming. Memory Tip: Peer Group Misconfig = “Pals with Wrong Plan.”
Answer: Verify peer group settings with show running-config and check neighbor states
with show ip bgp neighbors. Scenario: Use show ip bgp neighbors to confirm AS mismatch.
Memory Tip: “Show Neighbors = Spot Peer Group Slip.”
Answer: A multi-level route reflector setup where reflectors reflect routes to other
reflectors or clients. Scenario: A large ISP uses a hierarchy to scale iBGP across regions.
Memory Tip: Hierarchy = “High-Level Route Relay.”
Answer: Use unique cluster IDs for each reflector level and configure clients: bgp cluster-id
<id>, neighbor <ip> route-reflector-client. Scenario: Set cluster ID 2.2.2.2: bgp cluster-id
2.2.2.2. Memory Tip: “Cluster-ID = Chain Reflectors Clearly.”
Answer: Frequent route changes caused by fluctuating MED values between ASes.
Scenario: Two ISPs with dynamic MEDs cause routes to flap. Memory Tip: MED Oscillation
= “MED-Driven Route Dance.”
Answer: Enable bgp deterministic-med or use bgp always-compare-med; check with debug
ip bgp updates. Scenario: Enable: bgp deterministic-med. Memory Tip: “Deterministic-
MED = Defuse MED Drama.”
Answer: Replaces a customer’s AS number with the provider’s AS to avoid loop prevention
rejection. Scenario: Used in MPLS VPNs when a customer uses the same AS at multiple
sites. Memory Tip: AS Override = “Alter AS to Avoid Rejection.”
Answer: Use neighbor <ip> as-override in the address-family. Scenario: Enable: address-
family vpnv4, neighbor 192.168.1.2 as-override. Memory Tip: “AS-Override = Adjust AS for
VPN.”
Answer: A loop caused by recursive route lookups pointing back to BGP routes. Scenario:
A NEXT_HOP resolves to a BGP route, creating an infinite loop. Memory Tip: Recursion
Loop = “Route Resolving Rut.”
Answer: Check show ip route for recursive routes and ensure NEXT_HOP is reachable via
IGP. Scenario: Verify routes: show ip route <prefix>. Memory Tip: “Show Route = Stop
Recursion Rut.”
Answer: Use unique route-maps, test policies, and verify with show ip bgp <prefix>.
Scenario: Check attributes: show ip bgp 192.168.1.0. Memory Tip: “Show BGP = Spot
Attribute Snafu.”
Answer: Use lower timers (neighbor <ip> timers <keepalive> <holdtime>), PIC, and fast
fallover. Scenario: Set timers: neighbor 192.168.1.2 timers 10 30. Memory Tip: “Timers =
Tune for Speed.”
Answer: A loop where a client receives its own routes via a reflector. Scenario: Missing
ORIGINATOR_ID causes a client to re-advertise its route. Memory Tip: Client Loop =
“Client’s Route Comes Back.”
Answer: Ensure ORIGINATOR_ID and CLUSTER_LIST are set; use bgp cluster-id <id>.
Scenario: Set ID: bgp cluster-id 3.3.3.3. Memory Tip: “Cluster-ID = Cut Client Loops.”
Answer: Use sequence numbers, summarize prefixes, and avoid excessive regex. Scenario:
Summarize: ip prefix-list ALLOW permit 192.168.0.0/16 le 24. Memory Tip: “Summarize =
Streamline Prefix-Lists.”
Answer: Designing route-maps to handle complex policies without overloading the router.
Scenario: Apply policies to 100 neighbors without performance issues. Memory Tip:
Route-Map Scale = “Robust Rules for Routes.”
Answer: Use modular route-maps, avoid deep sequences, and leverage peer groups.
Scenario: Modular map: route-map BASE permit 10, route-map SPECIFIC permit 20.
Memory Tip: “Modular = Manageable Route-Maps.”
Answer: Monitor memory with show memory, limit prefixes with maximum-prefix, and
upgrade IOS if buggy. Scenario: Check memory: show memory summary. Memory Tip:
“Show Memory = Spot Memory Sink.”