set_localas($localas)get_localas()set_routerid($routerid)get_routerid()group($name)vrf($vrfname)
IPDevice::RouterBase::BGP
use IPDevice::RouterBase::BGP; my $bgp = new IPDevice::RouterBase::BGP; $bgp->set_localas(1234); my $vrf = $bgp->vrf('9999'); my $neigh = $bgp->add_neighbor('192.168.0.2');
This module provides routines for storing informations regarding a BGP instance.
This module provides, in addition to all methods from IPDevice::RouterBase::BGPVRF, the following methods.
set_localas($localas)Set the BGP local AS number. (INTEGER)
get_localas()Returns the BGP local AS number. (INTEGER)
set_routerid($routerid)Set the BGP router id.
get_routerid()Returns the BGP router id.
group($name)Returns the IPDevice::RouterBase::BGPGroup with the given name. If the group does not exist yet, a newly created IPDevice::RouterBase::BGPGroup will be returned.
vrf($vrfname)Returns the IPDevice::RouterBase::BGPVRF with the given name, or, if none found, a new IPDevice::RouterBase::BGPVRF.
Walks through all VRFs calling the function $func. Args passed to $func are:
$vrf: The IPDevice::RouterBase::BGPVRF. %data: The given data, just piped through.
If $func returns FALSE, the VRF list evaluation will be stopped.
Walks through all VRFs/BGP neighbors calling the function $func. Args passed to $func are:
$neighbor: The IPDevice::RouterBase::BGPNeighbor. %data: The given data, just piped through.
If $func returns FALSE, the neighbor list evaluation will be stopped.
Copyright (c) 2004 Samuel Abels. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Samuel Abels <spam debain org>