Bird
Raised Fist0
Computer Networksknowledge~5 mins

BGP and inter-domain routing in Computer Networks - Cheat Sheet & Quick Revision

Choose your learning style10 modes available
Recall & Review
beginner
What does BGP stand for and what is its primary purpose?
BGP stands for Border Gateway Protocol. Its primary purpose is to exchange routing information between different autonomous systems (AS) on the internet, enabling inter-domain routing.
Click to reveal answer
beginner
What is an Autonomous System (AS) in the context of BGP?
An Autonomous System is a collection of IP networks and routers under the control of a single organization that presents a common routing policy to the internet.
Click to reveal answer
intermediate
How does BGP differ from interior routing protocols like OSPF?
BGP is used for routing between different autonomous systems (inter-domain), while OSPF is used within a single autonomous system (intra-domain). BGP focuses on policy and path selection, not just shortest path.
Click to reveal answer
intermediate
What is the role of BGP attributes in route selection?
BGP attributes like AS_PATH, NEXT_HOP, and LOCAL_PREF help routers decide the best path to a destination by applying policies and preferences.
Click to reveal answer
intermediate
Why is BGP considered a path vector protocol?
BGP is called a path vector protocol because it maintains the path information (sequence of AS numbers) that data must traverse to reach a destination, helping prevent routing loops.
Click to reveal answer
What does BGP primarily manage?
ARouting within a single network
BSwitching data packets inside a LAN
CRouting between different autonomous systems
DEncrypting internet traffic
Which of the following is NOT a BGP attribute?
ALOCAL_PREF
BTTL
CAS_PATH
DNEXT_HOP
An Autonomous System is best described as:
AA group of networks under one administrative control
BA single router on the internet
CA type of firewall
DA protocol for encrypting data
Which protocol is used for routing inside an autonomous system?
ABGP
BFTP
CHTTP
DOSPF
Why does BGP keep track of the AS_PATH?
ATo prevent routing loops
BTo speed up packet delivery
CTo encrypt data
DTo assign IP addresses
Explain how BGP enables communication between different networks on the internet.
Think about how different organizations connect their networks.
You got /4 concepts.
    Describe the difference between BGP and interior routing protocols like OSPF.
    Consider where each protocol is used and what problems they solve.
    You got /4 concepts.

      Practice

      (1/5)
      1. What is the primary purpose of BGP (Border Gateway Protocol) in computer networks?
      easy
      A. To encrypt data packets for secure communication
      B. To exchange routing information between different large networks on the internet
      C. To assign IP addresses to devices within a local network
      D. To manage wireless connections in home networks

      Solution

      1. Step 1: Understand BGP's role

        BGP is designed to connect different large networks, called autonomous systems, on the internet.
      2. Step 2: Identify BGP's function

        It shares routing information to find the best path for data between these networks.
      3. Final Answer:

        To exchange routing information between different large networks on the internet -> Option B
      4. Quick Check:

        BGP = Routing between large networks [OK]
      Hint: BGP connects big networks by sharing routes [OK]
      Common Mistakes:
      • Confusing BGP with encryption protocols
      • Thinking BGP assigns IP addresses
      • Mixing BGP with local network management
      2. Which of the following is the correct syntax to define a BGP neighbor in a router configuration?
      easy
      A. neighbor 192.168.1.1 remote-as 65001
      B. set neighbor 192.168.1.1 as 65001
      C. neighbor remote-as 65001 192.168.1.1
      D. remote-as neighbor 192.168.1.1 65001

      Solution

      1. Step 1: Recall BGP neighbor syntax

        The standard BGP command to define a neighbor includes the keyword 'neighbor', the IP address, and 'remote-as' followed by the AS number.
      2. Step 2: Match syntax to options

        neighbor 192.168.1.1 remote-as 65001 matches this format exactly: 'neighbor 192.168.1.1 remote-as 65001'. Others mix order or keywords incorrectly.
      3. Final Answer:

        neighbor 192.168.1.1 remote-as 65001 -> Option A
      4. Quick Check:

        neighbor IP remote-as AS_number = correct syntax [OK]
      Hint: Remember: neighbor IP then remote-as AS number [OK]
      Common Mistakes:
      • Swapping the order of IP and AS number
      • Using 'set' instead of 'neighbor'
      • Placing 'remote-as' before IP address
      3. Consider the following simplified BGP routing table entries:
      AS Path: 65001 65002 65003
      AS Path: 65001 65004
      AS Path: 65005 65003
      Which AS path will BGP prefer to route traffic?
      medium
      A. AS Path: 65001 65002 65003
      B. AS Path: 65001 65004
      C. AS Path: 65005 65003
      D. All paths are equally preferred

      Solution

      1. Step 1: Understand BGP path selection criteria

        BGP prefers the path with the shortest AS path length to reduce the number of hops.
      2. Step 2: Compare AS path lengths

        Paths lengths are: 3 for '65001 65002 65003', 2 for '65001 65004', and 2 for '65005 65003'. Among these, the shortest paths are the ones with length 2.
      3. Step 3: Consider origin and other attributes

        Since no other attributes are given, BGP will prefer the path with the shortest AS path regardless of starting AS. Both '65001 65004' and '65005 65003' have length 2, but BGP prefers the path with the lowest next-hop IP or other tie-breakers. Without additional info, the shortest path is preferred. So either could be correct, but typically the path starting with the local AS is preferred. However, since local AS is not specified, the shortest path is the main factor.
      4. Final Answer:

        AS Path: 65005 65003 -> Option C
      5. Quick Check:

        Shortest AS path length = preferred [OK]
      Hint: Shortest AS path usually wins in BGP routing [OK]
      Common Mistakes:
      • Choosing longest AS path
      • Ignoring AS path length
      • Assuming all paths are equal
      4. A network engineer configures BGP neighbors but notices no routes are exchanged. Which of the following is the most likely cause?
      medium
      A. The subnet mask on the interface is too large
      B. The router's hostname is not set
      C. The router is missing a default gateway
      D. The neighbor IP address is incorrect or unreachable

      Solution

      1. Step 1: Identify common BGP neighbor issues

        If no routes are exchanged, a common cause is that the neighbor IP is wrong or unreachable, preventing session establishment.
      2. Step 2: Evaluate other options

        Hostname settings do not affect BGP neighbor sessions. Missing default gateway or subnet mask issues may affect general connectivity but are less direct causes than neighbor IP errors.
      3. Final Answer:

        The neighbor IP address is incorrect or unreachable -> Option D
      4. Quick Check:

        Neighbor IP correct and reachable = routes exchanged [OK]
      Hint: Check neighbor IP and reachability first [OK]
      Common Mistakes:
      • Ignoring neighbor IP correctness
      • Blaming unrelated settings like hostname
      • Overlooking basic connectivity issues
      5. An ISP uses BGP to connect with multiple other ISPs. They want to prefer routes learned from ISP A over ISP B, even if ISP B's path is shorter. Which BGP feature should they use to achieve this?
      hard
      A. AS path prepending to make ISP B's path appear longer
      B. Changing the router's hostname to ISP A
      C. Using a static route instead of BGP
      D. Disabling BGP on ISP B's connection

      Solution

      1. Step 1: Understand BGP path preference controls

        BGP chooses routes based on path attributes like AS path length. To prefer one ISP's route, you can make the other ISP's path look longer.
      2. Step 2: Apply AS path prepending

        AS path prepending adds extra AS numbers to the path advertised to ISP B, making it appear longer and less preferred.
      3. Step 3: Evaluate other options

        Changing hostname or using static routes won't affect BGP path selection properly. Disabling BGP on ISP B is extreme and not practical.
      4. Final Answer:

        AS path prepending to make ISP B's path appear longer -> Option A
      5. Quick Check:

        AS path prepending = prefer one ISP over another [OK]
      Hint: Use AS path prepending to prefer routes [OK]
      Common Mistakes:
      • Thinking hostname affects routing preference
      • Using static routes instead of BGP
      • Disabling connections instead of adjusting path attributes
      Recommended

      Ready to prove it?

      Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

      10 questions~5 mineasy hard