ipmininet.router.config.ospf module

Base classes to configure an OSPF daemon

class ipmininet.router.config.ospf.OSPF(node, *args, **kwargs)

Bases: ipmininet.router.config.zebra.QuaggaDaemon

This class provides a simple configuration for an OSPF daemon. It advertizes one network per interface (the primary one), and set interfaces not facing another L3Router to passive

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

Build the configuration tree for this daemon

Returns:ConfigDict-like object describing this configuration
static is_active_interface(itf) → bool

Return whether an interface is active or not for the OSPF daemon

set_defaults(defaults)
Parameters:
  • debug – the set of debug events that should be logged
  • dead_int – Dead interval timer
  • hello_int – Hello interval timer
  • priority – priority for the interface, used for DR election
  • redistribute – set of OSPFRedistributedRoute sources
class ipmininet.router.config.ospf.OSPFArea(area: str, routers: Sequence[str] = (), links: Sequence[str] = (), **props)

Bases: ipmininet.overlay.Overlay

An overlay to group OSPF links and routers by area

Parameters:
  • area – the area for this overlay
  • routers – the set of routers for which all their interfaces belong to that area
  • links – individual links belonging to this area
apply(topo)

Apply the Overlay properties to the given topology

area
class ipmininet.router.config.ospf.OSPFNetwork(domain: ipaddress.IPv4Network, area: str)

Bases: object

A class holding an OSPF network properties

class ipmininet.router.config.ospf.OSPFRedistributedRoute(subtype: str, metric_type=1, metric=1000)

Bases: object

A class representing a redistributed route type in OSPF