Poster of Linux kernelThe best gift for a Linux geek


Section: Maintenance Commands (8) Updated: October 2002
Local index Up


route_btoa - converts binary descriptions of MRT messages to ASCII  


Usage: route_btoa [-m] [(-i|-r)] [input_binary_file(s)]

ROUTE_BTOA converts binary MRT messages to ASCII. By default, the program writes human-readable ASCII descriptions of MRT message streams or files to standard out. Binary MRT messages may be generated by programs such as SBGP and MRTd for monitoring, research, and statistics collection purposes. In this release of MRT, route_btoa supports the parsing of BGP, BGP+ and RIPng packets.

Route_btoa includes a Perl version of the program. In general, the compiled version is probably more robust and up-to-date than the Perl code.


    route_btoa [-m] [-i input_binary_file]


-i binary_data_in_file

   Read routes from this file binary MRT file. Using a file name of
       'stdin' will read input from standard in.

   Create machine-parseable output.


   The following command writes a formatted, ASCII description of BGP4
   update packets from a peering session with the NSFNET backbone to
   standard output:

   sbgp -bo stdout | route_btoa -i stdin

   Below is an example of the output produced by route_btoa. Most of the
   fields should be self-explanatory.

   > /statistics/bin/route_btoa2 -i /cache/mae-east/bgp.980114.21:30

   TIME: 01/14/98 21:30:00


   TO: AS2885

   FROM: AS1

   ASPATH: 1



   MULTIEXIT: 1546


   TIME: 01/14/98 21:30:01


   TO: AS2885

   FROM: AS1239

   ASPATH: 1239 6453 5769





   Route_BtoA also supports the generation of machine-readable output.
   This mode generates output that is easily parsed by awk or Perl
   scripts for statistics calculations. Note that "-m" mode does not
   preserve information about packet boundaries. The format for each line
   of the machine-readable output for BGP4 and BGP4+ packets is:

       | Time | Type | PeerIP | PeerAS | Prefix | <update dependant

   Where protocol is BGP, or BGP4. The time is number of seconds since
   epoch when the packet was recorded. The type is A for announcement, or
   W for withdrawal. PeerIP and PeerAS are the IP address and AS number
   of the BGP peer from which we received the update. Prefix is the route
   prefix described in the update.

   For BGP announcements, update-dependant information contains:

   | Origin | NextHop | Local_Pref | MED | Community

   Where ASPATH is the autonomous system path of the update. Origin is
   IGP, EGP, or Unknown. And local_pref, MED and Community are as the
   names imply. Below is an example of route_btoa machine output of
   MRTd-collected BGP packets:

       BGP|884831401|A||1239||1239 6453





You can find more documentation in /usr/share/doc/mrt/html/




This document was created by man2html, using the manual pages.
Time: 22:02:16 GMT, April 16, 2011