Пример #1
0
    def vifUnplugged(self, macAddress, ipAddressPrefix, advertiseSubnet):
        label = self.macAddress2LocalPortData[macAddress]['label']
        for prefix in self.readvertised:
            self.log.debug("Stop re-advertising %s with this port as next hop",
                           prefix)
            routeEntry = self._routeForReAdvertisement(prefix, label)
            self._pushEvent(RouteEvent(RouteEvent.WITHDRAW, routeEntry))

        VPNInstance.vifUnplugged(self, macAddress, ipAddressPrefix,
                                 advertiseSubnet)
Пример #2
0
    def vifUnplugged(self, macAddress, ipAddressPrefix, advertiseSubnet):
        label = self.macAddress2LocalPortData[macAddress]['label']
        for prefix in self.readvertised:
            self.log.debug("Stop re-advertising %s with this port as next hop",
                           prefix)
            routeEntry = self._routeForReAdvertisement(prefix, label)
            self._pushEvent(RouteEvent(RouteEvent.WITHDRAW, routeEntry))

        VPNInstance.vifUnplugged(self, macAddress, ipAddressPrefix,
                                 advertiseSubnet)
Пример #3
0
    def __init__(self, *args, **kwargs):

        VPNInstance.__init__(self, *args, **kwargs)

        self.gwPort = None

        # Advertise route to receive multi-destination traffic
        self.log.info("Generating BGP route for broadcast/multicast traffic")

        etag = None
        label = LabelStackEntry(self.instanceLabel)

        route = Route(
            EVPNMulticast(
                RouteDistinguisher(RouteDistinguisher.TYPE_IP_LOC,
                                   None,
                                   self.bgpManager.getLocalAddress(),
                                   self.instanceId),
                etag,
                self.bgpManager.getLocalAddress()
            )
        )

        route.attributes.add(self._genExtendedCommunities())

        # add PMSI Tunnel Attribute route
        pmsi_tunnel_attribute = PMSITunnelIngressReplication(
            self.dataplaneDriver.getLocalAddress(), label)
        route.attributes.add(pmsi_tunnel_attribute)

        nh = Inet(1, socket.inet_pton(
            socket.AF_INET, self.dataplaneDriver.getLocalAddress()))
        route.attributes.add(NextHop(nh))

        self.multicastRouteEntry = self._newRouteEntry(self.afi,
                                                       self.safi,
                                                       self.exportRTs,
                                                       route.nlri,
                                                       route.attributes)

        self._pushEvent(
            RouteEvent(RouteEvent.ADVERTISE, self.multicastRouteEntry))
Пример #4
0
    def __init__(self, *args, **kwargs):

        VPNInstance.__init__(self, *args, **kwargs)

        self.gwPort = None

        # Advertise route to receive multi-destination traffic
        self.log.info("Generating BGP route for broadcast/multicast traffic")

        etag = None
        label = LabelStackEntry(self.instanceLabel)

        route = Route(
            EVPNMulticast(
                RouteDistinguisher(RouteDistinguisher.TYPE_IP_LOC, None,
                                   self.bgpManager.getLocalAddress(),
                                   self.instanceId), etag,
                self.bgpManager.getLocalAddress()))

        route.attributes.add(self._genExtendedCommunities())

        # add PMSI Tunnel Attribute route
        pmsi_tunnel_attribute = PMSITunnelIngressReplication(
            self.dataplaneDriver.getLocalAddress(), label)
        route.attributes.add(pmsi_tunnel_attribute)

        nh = Inet(
            1,
            socket.inet_pton(socket.AF_INET,
                             self.dataplaneDriver.getLocalAddress()))
        route.attributes.add(NextHop(nh))

        self.multicastRouteEntry = self._newRouteEntry(self.afi, self.safi,
                                                       self.exportRTs,
                                                       route.nlri,
                                                       route.attributes)

        self._pushEvent(
            RouteEvent(RouteEvent.ADVERTISE, self.multicastRouteEntry))
Пример #5
0
 def __init__(self, *args, **kwargs):
     VPNInstance.__init__(self, *args, **kwargs)
     self.readvertised = set()
Пример #6
0
 def __init__(self, *args, **kwargs):
     VPNInstance.__init__(self, *args, **kwargs)
     self.readvertised = set()