Documentation

msg-monitoroptionsindex

Name

bgp options show-mode -  change the format used to dump BGP routes

Synopsis

show-mode <cisco|mrt|custom> 

Arguments

cisco|mrt|custom
the mode used to dump BGP routes

Description

This command selects which output format is used to dump BGP routes. There are currently three possible modes: mrt,cisco and custom.

With the mrt mode, routes are dumped as with the route_btoa tool from the Multi-threaded Routing Toolkit (MRTd), using the -m option. In this format, the route's fields are written on a single line, using a '|' separator. Example: _|129.250.0.85|2914|3.0.0.0/8|2914 1239 80|IGP|129.250.0.85|100|10|2914:420 2914:2000 2914:3000 65504:1239||||

With the cisco mode, routes are shown using CISCO IOS's format for the show ip bgp command. Example: *> 3.0.0.0/8 129.250.0.85 100 10 2914 1239 80 i

Finally, if the specified mode is not cisco or mrt, the command argument is interpreted as an output format specifier. The output format specifier takes the form of a string which specifies the output format and the fields that will appear in the output. The modus operandi is similar to that of the printf function in C.

The acceptable format specifiers are as follows:

Specifier Field
i IP address of the BGP peer
a ASN of the BGP peer
p destination prefix
l LOCAL-PREF attribute
P AS-Path attribute
m MED attribute
o ORIGIN attribute
n next-hop
c COMMUNITIES attribute
e EXT-COMMUNITIES attribute
O ORIGINATOR-ID attribute
C CLUSTER-ID-LIST attribute

The following example shows how to use a custom output format specifier that would only show the AS-Path of routes in future route dumps. bgp options show-mode custom "AS-Path = %P"