ipmininet.router.config.bgp module

Base classes to configure a BGP daemon

ipmininet.router.config.bgp.AF_INET(*args, **kwargs)

The ipv4 (unicast) address family

ipmininet.router.config.bgp.AF_INET6(*args, **kwargs)

The ipv6 (unicast) address family

class ipmininet.router.config.bgp.AS(asn, routers=(), **props)

Bases: ipmininet.overlay.Overlay

An overlay class that groups routers by AS number

Parameters:
  • asn – The number for this AS
  • routers – an initial set of routers to add to this AS
  • props – key-vals to set on all routers of this AS
asn
class ipmininet.router.config.bgp.AddressFamily(af_name, redistribute=(), networks=(), *args, **kwargs)

Bases: object

An address family that is exchanged through BGP

class ipmininet.router.config.bgp.BGP(node, port=179, *args, **kwargs)

Bases: ipmininet.router.config.zebra.QuaggaDaemon

This class provides the configuration skeletons for BGP routers.

DEPENDS = (<class 'ipmininet.router.config.zebra.Zebra'>,)
KILL_PATTERNS = ('bgpd',)
NAME = 'bgpd'
STARTUP_LINE_EXTRA

We add the port to the standard startup line

build()

Build the configuration tree for this daemon

Returns:ConfigDict-like object describing this configuration
set_defaults(defaults)
Parameters:
  • debug – the set of debug events that should be logged
  • address_families – The set of AddressFamily to use
class ipmininet.router.config.bgp.Peer(base, node, v6=False)

Bases: object

A BGP peer

Parameters:
  • base – The base router that has this peer
  • node – The actual peer
ipmininet.router.config.bgp.bgp_fullmesh(topo, routers)

Establish a full-mesh set of BGP peerings between routers

Parameters:routers – The set of routers peering within each other
ipmininet.router.config.bgp.bgp_peering(topo, a, b)

Register a BGP peering between two nodes

ipmininet.router.config.bgp.ebgp_session(topo, a, b)

Register an eBGP peering between two nodes, and disable IGP adjacencies between them.

class ipmininet.router.config.bgp.iBGPFullMesh(asn, routers=(), **props)

Bases: ipmininet.router.config.bgp.AS

An overlay class to establish iBGP sessions in full mesh between BGP routers.

Parameters:
  • asn – The number for this AS
  • routers – an initial set of routers to add to this AS
  • props – key-vals to set on all routers of this AS
apply(topo)

Apply the Overlay properties to the given topology