Search in sources :

Example 1 with BgpPeerConfig

use of org.batfish.datamodel.BgpPeerConfig in project batfish by batfish.

the class BgpTopologyUtils method addActivePeerEdges.

private static void addActivePeerEdges(BgpPeerConfigId neighborId, MutableValueGraph<BgpPeerConfigId, BgpSessionProperties> graph, NetworkConfigurations nc, Map<Ip, Map<String, Set<String>>> ipOwners, Map<String, Multimap<String, BgpPeerConfigId>> receivers, Set<Ip> potentialLocalIps, boolean checkReachability, TracerouteEngine tracerouteEngine) {
    BgpActivePeerConfig neighbor = nc.getBgpPointToPointPeerConfig(neighborId);
    if (neighbor == null || potentialLocalIps.isEmpty() || neighbor.getLocalAs() == null || neighbor.getPeerAddress() == null || neighbor.getRemoteAsns().isEmpty()) {
        return;
    }
    // Find nodes that own the neighbor's peer address
    Map<String, Set<String>> possibleVrfs = ipOwners.get(neighbor.getPeerAddress());
    if (possibleVrfs == null) {
        return;
    }
    Set<BgpPeerConfigId> alreadyEstablished = graph.adjacentNodes(neighborId);
    for (Entry<String, Set<String>> entry : possibleVrfs.entrySet()) {
        String node = entry.getKey();
        Set<String> vrfs = entry.getValue();
        Multimap<String, BgpPeerConfigId> receiversByVrf = receivers.get(node);
        if (receiversByVrf == null) {
            continue;
        }
        for (String vrf : vrfs) {
            receiversByVrf.get(vrf).stream().filter(candidateId -> !alreadyEstablished.contains(candidateId)).forEach(candidateId -> {
                // Ensure candidate has compatible local/remote AS, isn't in same vrf as initiator
                BgpPeerConfig candidate = nc.getBgpPeerConfig(candidateId);
                if (!bgpCandidatePassesSanityChecks(neighborId, neighbor, candidateId, candidate)) {
                    return;
                }
                // Check if neighbor has any feasible local IPs compatible with this candidate
                Set<Ip> feasibleLocalIpsForPeeringWithCandidate = getFeasibleLocalIps(potentialLocalIps, candidate);
                if (feasibleLocalIpsForPeeringWithCandidate.isEmpty()) {
                    return;
                }
                if (!checkReachability) {
                    feasibleLocalIpsForPeeringWithCandidate.forEach(ip -> addEdges(neighbor, neighborId, ip, candidateId, graph, nc));
                } else {
                    initiateBgpSessions(neighborId, candidateId, neighbor, feasibleLocalIpsForPeeringWithCandidate, tracerouteEngine).stream().filter(BgpSessionInitiationResult::isSuccessful).map(initiationResult -> initiationResult.getFlow().getSrcIp()).forEach(srcIp -> addEdges(neighbor, neighborId, srcIp, candidateId, graph, nc));
                }
            });
        }
    }
}
Also used : BgpPeerConfigType(org.batfish.datamodel.BgpPeerConfigId.BgpPeerConfigType) IpProtocol(org.batfish.datamodel.IpProtocol) Hop(org.batfish.datamodel.flow.Hop) FibForward(org.batfish.datamodel.FibForward) FibNextVrf(org.batfish.datamodel.FibNextVrf) Trace(org.batfish.datamodel.flow.Trace) Interface(org.batfish.datamodel.Interface) ValueGraphBuilder(com.google.common.graph.ValueGraphBuilder) Flow(org.batfish.datamodel.Flow) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) NetworkConfigurations(org.batfish.datamodel.NetworkConfigurations) Map(java.util.Map) Network(com.google.common.graph.Network) NamedPort(org.batfish.datamodel.NamedPort) Vrf(org.batfish.datamodel.Vrf) IpOwners(org.batfish.common.topology.IpOwners) ImmutableSetMultimap(com.google.common.collect.ImmutableSetMultimap) LinkedListMultimap(com.google.common.collect.LinkedListMultimap) ImmutableSet(com.google.common.collect.ImmutableSet) BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig) ImmutableMap(com.google.common.collect.ImmutableMap) FlowDisposition(org.batfish.datamodel.FlowDisposition) FibActionVisitor(org.batfish.datamodel.visitors.FibActionVisitor) Set(java.util.Set) TraceAndReverseFlow(org.batfish.datamodel.flow.TraceAndReverseFlow) Objects(java.util.Objects) List(java.util.List) BgpPassivePeerConfig(org.batfish.datamodel.BgpPassivePeerConfig) L3Adjacencies(org.batfish.common.topology.L3Adjacencies) Entry(java.util.Map.Entry) Ip(org.batfish.datamodel.Ip) LongSpace(org.batfish.datamodel.LongSpace) NodeInterfacePair(org.batfish.datamodel.collections.NodeInterfacePair) TracerouteEngine(org.batfish.common.plugin.TracerouteEngine) BgpActivePeerConfig(org.batfish.datamodel.BgpActivePeerConfig) HashMap(java.util.HashMap) BgpProcess(org.batfish.datamodel.BgpProcess) Multimap(com.google.common.collect.Multimap) BgpPeerConfigId(org.batfish.datamodel.BgpPeerConfigId) ImmutableList(com.google.common.collect.ImmutableList) Configuration(org.batfish.datamodel.Configuration) FibNullRoute(org.batfish.datamodel.FibNullRoute) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) ConcreteInterfaceAddress(org.batfish.datamodel.ConcreteInterfaceAddress) Fib(org.batfish.datamodel.Fib) MoreObjects(com.google.common.base.MoreObjects) SetMultimap(com.google.common.collect.SetMultimap) SessionType(org.batfish.datamodel.BgpSessionProperties.SessionType) MutableValueGraph(com.google.common.graph.MutableValueGraph) BgpSessionProperties(org.batfish.datamodel.BgpSessionProperties) VisibleForTesting(com.google.common.annotations.VisibleForTesting) FibEntry(org.batfish.datamodel.FibEntry) BgpUnnumberedPeerConfig(org.batfish.datamodel.BgpUnnumberedPeerConfig) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) Ip(org.batfish.datamodel.Ip) BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig) BgpActivePeerConfig(org.batfish.datamodel.BgpActivePeerConfig) BgpPeerConfigId(org.batfish.datamodel.BgpPeerConfigId)

Example 2 with BgpPeerConfig

use of org.batfish.datamodel.BgpPeerConfig in project batfish by batfish.

the class BgpTopologyUtils method addEdges.

/**
 * Adds edges in {@code graph} between the given {@link BgpPeerConfigId}s in both directions.
 */
private static void addEdges(BgpPeerConfig p1, BgpPeerConfigId id1, Ip p1LocalIp, BgpPeerConfigId id2, MutableValueGraph<BgpPeerConfigId, BgpSessionProperties> graph, NetworkConfigurations networkConfigurations) {
    BgpPeerConfig remotePeer = Objects.requireNonNull(networkConfigurations.getBgpPeerConfig(id2));
    AsPair asPair = computeAsPair(p1.getLocalAs(), p1.getConfederationAsn(), p1.getRemoteAsns(), remotePeer.getLocalAs(), remotePeer.getConfederationAsn(), remotePeer.getRemoteAsns());
    assert asPair != null;
    graph.putEdgeValue(id1, id2, BgpSessionProperties.from(p1, p1LocalIp, remotePeer, false, asPair.getLocalAs(), asPair.getRemoteAs(), asPair.getConfedSessionType()));
    graph.putEdgeValue(id2, id1, BgpSessionProperties.from(p1, p1LocalIp, remotePeer, true, asPair.getLocalAs(), asPair.getRemoteAs(), asPair.getConfedSessionType()));
}
Also used : BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig)

Example 3 with BgpPeerConfig

use of org.batfish.datamodel.BgpPeerConfig in project batfish by batfish.

the class Graph method findExportRoutingPolicy.

/*
   * Find the export routing policy for a given edge
   */
@Nullable
public RoutingPolicy findExportRoutingPolicy(String router, Protocol proto, GraphEdge ge) {
    Configuration conf = _configurations.get(router);
    if (proto.isConnected()) {
        return null;
    }
    if (proto.isStatic()) {
        return null;
    }
    if (proto.isOspf()) {
        OspfProcess p = getFirstOspfProcess(conf.getDefaultVrf());
        if (p == null) {
            return null;
        }
        String exp = p.getExportPolicy();
        return conf.getRoutingPolicies().get(exp);
    }
    if (proto.isBgp()) {
        BgpPeerConfig n = findBgpNeighbor(ge);
        // if no neighbor (e.g., loopback) or no export policy, return null
        return Optional.ofNullable(n).map(BgpPeerConfig::getIpv4UnicastAddressFamily).map(AddressFamily::getExportPolicy).map(policy -> conf.getRoutingPolicies().get(policy)).orElse(null);
    }
    throw new BatfishException("TODO: findExportRoutingPolicy for " + proto.name());
}
Also used : SortedSet(java.util.SortedSet) Not(org.batfish.datamodel.routing_policy.expr.Not) Interface(org.batfish.datamodel.Interface) Collectors.toMap(java.util.stream.Collectors.toMap) Topology(org.batfish.datamodel.Topology) Map(java.util.Map) Vrf(org.batfish.datamodel.Vrf) RoutePolicyStatementAsPathCollector(org.batfish.minesweeper.aspath.RoutePolicyStatementAsPathCollector) Statement(org.batfish.datamodel.routing_policy.statement.Statement) Table2(org.batfish.minesweeper.collections.Table2) Conjunction(org.batfish.datamodel.routing_policy.expr.Conjunction) ImmutableSet(com.google.common.collect.ImmutableSet) BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig) OspfProcess(org.batfish.datamodel.ospf.OspfProcess) Set(java.util.Set) IBatfish(org.batfish.common.plugin.IBatfish) List(java.util.List) RoutingPolicy(org.batfish.datamodel.routing_policy.RoutingPolicy) Entry(java.util.Map.Entry) Optional(java.util.Optional) Queue(java.util.Queue) AddressFamily(org.batfish.datamodel.bgp.AddressFamily) MatchProtocol(org.batfish.datamodel.routing_policy.expr.MatchProtocol) NetworkSnapshot(org.batfish.common.NetworkSnapshot) Ip(org.batfish.datamodel.Ip) LongSpace(org.batfish.datamodel.LongSpace) NodeInterfacePair(org.batfish.datamodel.collections.NodeInterfacePair) BooleanExpr(org.batfish.datamodel.routing_policy.expr.BooleanExpr) RoutingProtocol(org.batfish.datamodel.RoutingProtocol) BgpActivePeerConfig(org.batfish.datamodel.BgpActivePeerConfig) HashMap(java.util.HashMap) SerializationUtils(org.apache.commons.lang3.SerializationUtils) BatfishException(org.batfish.common.BatfishException) BgpProcess(org.batfish.datamodel.BgpProcess) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Configuration(org.batfish.datamodel.Configuration) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) ConcreteInterfaceAddress(org.batfish.datamodel.ConcreteInterfaceAddress) ExplicitPrefixSet(org.batfish.datamodel.routing_policy.expr.ExplicitPrefixSet) PrefixRange(org.batfish.datamodel.PrefixRange) StaticRoute(org.batfish.datamodel.StaticRoute) PrefixSetExpr(org.batfish.datamodel.routing_policy.expr.PrefixSetExpr) MatchPrefixSet(org.batfish.datamodel.routing_policy.expr.MatchPrefixSet) OspfArea(org.batfish.datamodel.ospf.OspfArea) RoutePolicyStatementVarCollector(org.batfish.minesweeper.communities.RoutePolicyStatementVarCollector) VisibleForTesting(com.google.common.annotations.VisibleForTesting) ArrayDeque(java.util.ArrayDeque) Prefix(org.batfish.datamodel.Prefix) BatfishException(org.batfish.common.BatfishException) Configuration(org.batfish.datamodel.Configuration) OspfProcess(org.batfish.datamodel.ospf.OspfProcess) BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig) AddressFamily(org.batfish.datamodel.bgp.AddressFamily) Nullable(javax.annotation.Nullable)

Example 4 with BgpPeerConfig

use of org.batfish.datamodel.BgpPeerConfig in project batfish by batfish.

the class BgpSessionCompatibilityAnswererTest method createConfigurations.

/**
 * Given equally sized lists of {@link BgpPeerConfigId}s and {@link BgpPeerConfig}s, creates one
 * {@link Configuration} per ID/peer pair and returns the resulting configurations.
 */
static SortedMap<String, Configuration> createConfigurations(List<BgpPeerConfigId> ids, List<BgpPeerConfig> peers) {
    assert ids.size() == peers.size();
    SortedMap<String, Configuration> configs = new TreeMap<>();
    NetworkFactory nf = new NetworkFactory();
    for (int i = 0; i < ids.size(); i++) {
        BgpPeerConfigId id = ids.get(i);
        BgpPeerConfig peer = peers.get(i);
        // Create a configuration with a BgpProcess
        Configuration c = nf.configurationBuilder().setConfigurationFormat(ConfigurationFormat.CISCO_IOS).setHostname(id.getHostname()).build();
        Vrf vrf = nf.vrfBuilder().setOwner(c).setName(id.getVrfName()).build();
        BgpProcess bgpProc = BgpProcess.testBgpProcess(Ip.ZERO);
        vrf.setBgpProcess(bgpProc);
        configs.put(c.getHostname(), c);
        // Add interface to make IpOwners accurate
        if (peer.getLocalIp() != null && peer.getLocalIp() != Ip.AUTO) {
            nf.interfaceBuilder().setOwner(c).setVrf(vrf).setAddress(ConcreteInterfaceAddress.create(peer.getLocalIp(), 30)).build();
        }
        // Add peer in the appropriate map in the BgpProcess
        if (id.getType() == BgpPeerConfigType.ACTIVE) {
            assert id.getRemotePeerPrefix().getPrefixLength() == Prefix.MAX_PREFIX_LENGTH;
            Ip remotePeerAddress = id.getRemotePeerPrefix().getStartIp();
            bgpProc.setNeighbors(ImmutableSortedMap.of(remotePeerAddress, (BgpActivePeerConfig) peer));
        } else if (id.getType() == BgpPeerConfigType.DYNAMIC) {
            bgpProc.setPassiveNeighbors(ImmutableSortedMap.of(id.getRemotePeerPrefix(), (BgpPassivePeerConfig) peer));
        } else if (id.getType() == BgpPeerConfigType.UNNUMBERED) {
            bgpProc.setInterfaceNeighbors(ImmutableSortedMap.of(id.getPeerInterface(), (BgpUnnumberedPeerConfig) peer));
        } else {
            throw new BatfishException(String.format("Unhandled peer type %s", id.getType()));
        }
    }
    return configs;
}
Also used : BatfishException(org.batfish.common.BatfishException) Configuration(org.batfish.datamodel.Configuration) BgpProcess(org.batfish.datamodel.BgpProcess) Ip(org.batfish.datamodel.Ip) BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig) Vrf(org.batfish.datamodel.Vrf) BgpUnnumberedPeerConfig(org.batfish.datamodel.BgpUnnumberedPeerConfig) TreeMap(java.util.TreeMap) GlobalBroadcastNoPointToPoint(org.batfish.common.topology.GlobalBroadcastNoPointToPoint) BgpActivePeerConfig(org.batfish.datamodel.BgpActivePeerConfig) NetworkFactory(org.batfish.datamodel.NetworkFactory) BgpPeerConfigId(org.batfish.datamodel.BgpPeerConfigId)

Example 5 with BgpPeerConfig

use of org.batfish.datamodel.BgpPeerConfig in project batfish by batfish.

the class CiscoNxosGrammarTest method testEvpnL2L3Vni.

@Test
public void testEvpnL2L3Vni() throws IOException {
    Configuration c = parseConfig("nxos_l2_l3_vnis");
    String tenantVrfName = "tenant1";
    Ip routerId = Ip.parse("10.1.1.1");
    int tenantVrfPosition = 3;
    // All defined VXLAN Vnis
    ImmutableSortedSet<Layer2VniConfig> expectedL2Vnis = ImmutableSortedSet.of(Layer2VniConfig.builder().setVni(1111).setVrf(DEFAULT_VRF_NAME).setRouteDistinguisher(RouteDistinguisher.from(routerId, 32768)).setRouteTarget(ExtendedCommunity.target(1, 1111)).setImportRouteTarget(ExtendedCommunity.target(1, 1111).matchString()).build(), Layer2VniConfig.builder().setVni(2222).setVrf(DEFAULT_VRF_NAME).setRouteDistinguisher(RouteDistinguisher.from(routerId, 32769)).setRouteTarget(ExtendedCommunity.target(1, 2222)).setImportRouteTarget(ExtendedCommunity.target(1, 2222).matchString()).build());
    ImmutableSortedSet<Layer3VniConfig> expectedL3Vnis = ImmutableSortedSet.of(Layer3VniConfig.builder().setVni(3333).setVrf(tenantVrfName).setAdvertiseV4Unicast(true).setRouteDistinguisher(RouteDistinguisher.from(routerId, tenantVrfPosition)).setRouteTarget(ExtendedCommunity.target(1, 3333)).setImportRouteTarget(ExtendedCommunity.target(1, 3333).matchString()).build());
    BgpPeerConfig peer = c.getDefaultVrf().getBgpProcess().getActiveNeighbors().get(Ip.parse("1.1.1.1"));
    assertThat(peer.getEvpnAddressFamily(), notNullValue());
    assertThat(peer.getEvpnAddressFamily().getL2VNIs(), equalTo(expectedL2Vnis));
    assertThat(peer.getEvpnAddressFamily().getL3VNIs(), equalTo(expectedL3Vnis));
    assertThat(peer.getEvpnAddressFamily().getNveIp(), equalTo(Ip.parse("1.1.1.1")));
    assertThat(c.getVrfs().get(tenantVrfName).getBgpProcess(), notNullValue());
    // check leak configs
    {
        // bgpv4 -> evpn
        VrfLeakConfig leak = c.getDefaultVrf().getVrfLeakConfig();
        assertNotNull(leak);
        assertTrue(leak.getLeakAsBgp());
        assertThat(leak.getBgpv4ToEvpnVrfLeakConfigs(), contains(Bgpv4ToEvpnVrfLeakConfig.builder().setAttachRouteTargets(ExtendedCommunity.target(1, 3333)).setImportFromVrf(tenantVrfName).setSrcVrfRouteDistinguisher(RouteDistinguisher.from(routerId, tenantVrfPosition)).build()));
    }
    {
        // evpn -> bgpv4
        VrfLeakConfig leak = c.getVrfs().get(tenantVrfName).getVrfLeakConfig();
        assertNotNull(leak);
        assertTrue(leak.getLeakAsBgp());
        String importPolicyName = generatedEvpnToBgpv4VrfLeakPolicyName(tenantVrfName);
        assertThat(leak.getEvpnToBgpv4VrfLeakConfigs(), contains(EvpnToBgpv4VrfLeakConfig.builder().setImportFromVrf(DEFAULT_VRF_NAME).setImportPolicy(importPolicyName).build()));
        EvpnType5Route.Builder rb = EvpnType5Route.builder().setNetwork(Prefix.strict("10.0.0.0/24")).setNextHop(NextHopVtep.of(3333, Ip.parse("5.6.7.8"))).setVni(3333).setProtocol(RoutingProtocol.BGP).setOriginMechanism(OriginMechanism.LEARNED).setOriginType(OriginType.IGP).setOriginatorIp(Ip.parse("5.6.7.8")).setRouteDistinguisher(RouteDistinguisher.from(routerId, tenantVrfPosition));
        EvpnType5Route permittedRouteSingleRouteTarget = rb.setCommunities(CommunitySet.of(ExtendedCommunity.target(1, 3333))).build();
        EvpnType5Route permittedRouteMultipleRouteTargets = rb.setCommunities(CommunitySet.of(ExtendedCommunity.target(1, 3333), ExtendedCommunity.target(5, 3333))).build();
        EvpnType5Route deniedRouteWrongRouteTarget = rb.setCommunities(CommunitySet.of(ExtendedCommunity.target(5, 3333))).build();
        EvpnType5Route deniedRouteNoRouteTarget = rb.setCommunities(CommunitySet.of()).build();
        RoutingPolicy importPolicy = c.getRoutingPolicies().get(importPolicyName);
        assertRoutingPolicyPermitsRoute(importPolicy, permittedRouteSingleRouteTarget);
        assertRoutingPolicyPermitsRoute(importPolicy, permittedRouteMultipleRouteTargets);
        assertRoutingPolicyDeniesRoute(importPolicy, deniedRouteWrongRouteTarget);
        assertRoutingPolicyDeniesRoute(importPolicy, deniedRouteNoRouteTarget);
    }
}
Also used : Layer2VniConfig(org.batfish.datamodel.bgp.Layer2VniConfig) EvpnType5Route(org.batfish.datamodel.EvpnType5Route) BgpVrfConfiguration(org.batfish.representation.cisco_nxos.BgpVrfConfiguration) EigrpVrfIpv4AddressFamilyConfiguration(org.batfish.representation.cisco_nxos.EigrpVrfIpv4AddressFamilyConfiguration) BgpVrfIpv6AddressFamilyConfiguration(org.batfish.representation.cisco_nxos.BgpVrfIpv6AddressFamilyConfiguration) CiscoNxosConfiguration(org.batfish.representation.cisco_nxos.CiscoNxosConfiguration) EigrpProcessConfiguration(org.batfish.representation.cisco_nxos.EigrpProcessConfiguration) BgpVrfNeighborConfiguration(org.batfish.representation.cisco_nxos.BgpVrfNeighborConfiguration) BgpGlobalConfiguration(org.batfish.representation.cisco_nxos.BgpGlobalConfiguration) Configuration(org.batfish.datamodel.Configuration) BgpVrfAddressFamilyAggregateNetworkConfiguration(org.batfish.representation.cisco_nxos.BgpVrfAddressFamilyAggregateNetworkConfiguration) BgpVrfL2VpnEvpnAddressFamilyConfiguration(org.batfish.representation.cisco_nxos.BgpVrfL2VpnEvpnAddressFamilyConfiguration) BgpVrfNeighborAddressFamilyConfiguration(org.batfish.representation.cisco_nxos.BgpVrfNeighborAddressFamilyConfiguration) EigrpVrfConfiguration(org.batfish.representation.cisco_nxos.EigrpVrfConfiguration) BgpVrfIpv4AddressFamilyConfiguration(org.batfish.representation.cisco_nxos.BgpVrfIpv4AddressFamilyConfiguration) EigrpVrfIpv6AddressFamilyConfiguration(org.batfish.representation.cisco_nxos.EigrpVrfIpv6AddressFamilyConfiguration) FibLookupOverrideLookupIp(org.batfish.datamodel.packet_policy.FibLookupOverrideLookupIp) AbstractRouteDecoratorMatchers.hasNextHopIp(org.batfish.datamodel.matchers.AbstractRouteDecoratorMatchers.hasNextHopIp) Ip(org.batfish.datamodel.Ip) NextHopIp(org.batfish.datamodel.route.nh.NextHopIp) Builder(org.batfish.datamodel.Flow.Builder) Layer3VniConfig(org.batfish.datamodel.bgp.Layer3VniConfig) RoutingPolicy(org.batfish.datamodel.routing_policy.RoutingPolicy) Matchers.emptyString(org.hamcrest.Matchers.emptyString) Matchers.containsString(org.hamcrest.Matchers.containsString) BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig) Bgpv4ToEvpnVrfLeakConfig(org.batfish.datamodel.Bgpv4ToEvpnVrfLeakConfig) EvpnToBgpv4VrfLeakConfig(org.batfish.datamodel.EvpnToBgpv4VrfLeakConfig) VrfLeakConfig(org.batfish.datamodel.VrfLeakConfig) Test(org.junit.Test)

Aggregations

BgpPeerConfig (org.batfish.datamodel.BgpPeerConfig)20 Ip (org.batfish.datamodel.Ip)13 RoutingPolicy (org.batfish.datamodel.routing_policy.RoutingPolicy)12 Configuration (org.batfish.datamodel.Configuration)11 ImmutableSet (com.google.common.collect.ImmutableSet)10 Nonnull (javax.annotation.Nonnull)10 Nullable (javax.annotation.Nullable)10 BgpActivePeerConfig (org.batfish.datamodel.BgpActivePeerConfig)10 BgpProcess (org.batfish.datamodel.BgpProcess)10 VisibleForTesting (com.google.common.annotations.VisibleForTesting)9 Set (java.util.Set)9 BgpPeerConfigId (org.batfish.datamodel.BgpPeerConfigId)9 List (java.util.List)8 Map (java.util.Map)8 Entry (java.util.Map.Entry)8 BgpSessionProperties (org.batfish.datamodel.BgpSessionProperties)8 Optional (java.util.Optional)7 Prefix (org.batfish.datamodel.Prefix)7 RoutingProtocol (org.batfish.datamodel.RoutingProtocol)7 HashSet (java.util.HashSet)6