Skip to content

Nat-Lab/node-bird-routedump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

node-bird-routedump

Deprecated, use nat-lab/node-bird-routeparse instead.

Dump RIB from BIRD (BIRD Internet Routing Daemon).

Todo

  • Support recursive route

Usage

var NBRD = require('node-bird-routedump');

async function dump_route () {
  var routes = await NBRD({ctrl_soc: '/var/run/bird/bird6.ctl'});
  // or: routes = await NBRD({cmd: '/usr/sbin/birdc6'});
  console.log(routes);
}

dump_route();

Output

[ { route: '2620:1d:a000::/48',
    via: '2001:470:17:24::1',
    dev: 'he-ipv6',
    peer: 'he',
    uptime: '15:49:54',
    types: [ 'BGP', 'unicast', 'univ' ],
    origin: 'IGP',
    as_path: [ 6939, ..., ... ],
    next_hop: [ '2001:470:17:24::1', 'fe80::d8da:dd02' ] },
    bgp_community: [ '65500:7000', '65500:1666' ],
    aggregator: { ip: '141.193.21.1', asn: 396303 }
   },
   ...
]

Licenses

MIT

About

Dump BIRD routes as Javascript objects array.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published