CCNP-Studies
Routing
4-BGP
Cisco Show Ip Bgp Output

Understanding BGP Table with show ip bgp Command

In Cisco IOS, the show ip bgp command is a powerful tool for gaining insights into the BGP (Border Gateway Protocol) table on a router. It provides crucial information about the networks in the BGP table, their paths, and various attributes. Let's break down the output of this command to understand it better.

BGP Table Overview

The show ip bgp command displays information about networks in the BGP table, including those advertised into BGP by the local router (e.g., R1) and networks learned from other routers (e.g., R2, R3, and R4). Each entry in the output represents a BGP route and consists of seven columns, with the first row providing an example.

  1. Status: The first column shows the status of the BGP route. It can have various symbols, with "" commonly indicating a valid BGP route. "s" may replace it if the route is suppressed, and "r" could denote a RIB (Routing Information Base) failure. The ">" sign may follow "" to indicate the best path. The "i" status signifies an internal path, learned from an iBGP peer. The first entry, for example, has the status "*>," indicating a valid and best path.

  2. Network: This column displays the network prefix the path leads to. The prefix length is omitted for classful networks (e.g., 1.0.0.0/8).

  3. Next Hop: The "Next Hop" column reveals the IP address of the next router on the path to the destination network. In some cases, "0.0.0.0" suggests that the packet originated from the local router, indicating a directly-connected route.

  4. Metric: This column represents the BGP attribute known as Multi-Exit Discriminator (MED), showing the advertising router's internal metric to reach the prefix. It helps in path selection when multiple paths exist to the same prefix in neighboring ASes. In this case, it's set to 0 because R1 is directly connected to the prefix.

  5. LocPrf: "Local Preference" reflects the preference the local AS has for a path in the BGP table. Paths with higher local preference are favored. The default value is 100, but it can be modified using the bgp default local-preference command.

  6. Weight: This column represents the Cisco-proprietary WEIGHT attribute. It's locally significant and is not advertised to other BGP peers. Paths received from peers have a WEIGHT of 0, while locally-originated paths have a WEIGHT of 32,768. Higher WEIGHT values are preferred, making this attribute the highest priority in path selection.

  7. Path: The "Path" column includes the AS_PATH_SEQ attribute. BGP uses this to prevent loops. Each router, when advertising to eBGP peers, prepends its Autonomous System Number (ASN) to the path. The left-most value is the directly-connected AS, and the right-most is the originating AS. If an AS discovers its own ASN in the path, it drops the advertisement. This column also shows the BGP ORIGIN code, indicating how the path entered BGP.

Understanding the show ip bgp output is essential for managing BGP routes effectively. It provides insights into path selection and helps in troubleshooting network issues. With this knowledge, network administrators can make informed decisions to optimize routing in complex networks.

This breakdown of the show ip bgp command output should help you interpret the information presented by Cisco IOS when working with BGP routing.

debug ip tcp transactions address 10.3.5.3