Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring EVPN Routing Instances

You can configure an EVPN instance using a supported Layer 2 (L2) instance type (see instance-type) in which you enable the EVPN protocol with other parameters such as an encapsulation type, a route distinguisher, and a route-target. We support several instance-type options for EVPN instances, including:

  • evpn instance type

  • virtual-switch instance type

  • mac-vrf instance type

  • The default switch instance (in this case, you don't configure a named EVPN instance, and you configure EVPN protocol options at a global level)

Support for different EVPN instance types is platform-specific, so not all platforms support all of these instance-type values. This procedure uses instance-type evpn.

CAUTION:

When you want to change a traffic impacting option under a routing instance, use the following procedure.

  1. Deactivate the routing instance configuration.

  2. Change the traffic impacting option.

  3. Reactivate the updated routing instance configuration.

For example, follow this procedure if you need to change settings such as:

  • EVPN protocol settings in a virtual-switch instance-- You must configure EVPN protocol settings in a virtual switch instance at the same time you configure the virtual-switch instance type itself, or deactivate the instance before changing these settings in an existing instance. Otherwise, the device has problems adding EVPN Type 2 (MAC-IP) route entries in the EVPN routing tables.

  • The service-type in a MAC-VRF routing instance-- When you change the service type of a running instance, the device might incorrectly change the VLAN ID if it is not deactivated prior to making the change.

  • The vlan-id in an EVPN routing instance-- Changing the vlan-id on the fly, without first deactivating the associated EVPN routing instance would be catastrophic.

To configure an EVPN routing instance, complete the following configuration on the PE router (or on the MPLS edge switch [MES] or QFX Series switch) within the EVPN service provider’s network:

  1. Configure the EVPN routing instance name using the routing-instances statement at the [edit] hierarchy level:
  2. Configure the evpn option for the instance-type statement at the [edit routing-instances routing-instance-name] hierarchy level:

    Alternatively, configure one of the other supported instance-type options for EVPN instances, such as virtual-switch or mac-vrf.

    Note:

    For MX Series devices, EX Series, and QFX Series switches, you can include multiple logical interfaces of an Ethernet segment identifier (ESI) across different bridge-domains or VLANs of an EVPN routing instance in all-active mode. However, you cannot include multiple logical interfaces of the same ESI within the same bridge-domain or VLAN.

  3. Configure the interfaces for handling EVPN traffic between the MES or PEs and the CE device using the interface statement at the [edit routing-instances routing-instance-name] hierarchy level:
  4. Configure a VLAN identifier for the EVPN routing instance using the vlan-id statement at the [edit routing-instances routing-instance-name] hierarchy level:
    Note:

    For QFX Series, set the VLAN ID to none.

  5. Configure a route distinguisher on a PE router by including the route-distinguisher statement:

    Each routing instance that you configure on a PE router must have a unique route distinguisher associated with it. VPN routing instances need a route distinguisher to help BGP to distinguish between potentially identical network layer reachability information (NLRI) messages received from different VPNs. If you configure different VPN routing instances with the same route distinguisher, the commit fails.

    For a list of the hierarchy levels at which you can include this statement, see the statement summary for this statement.

    The route distinguisher is a 6-byte value that you can specify in one of the following formats:

    • as-number:number, where as-number is an autonomous system (AS) number (a 2-byte value) and number is any 4-byte value. The AS number can be in the range 1 through 65,535. We recommend that you use an Internet Assigned Numbers Authority (IANA)-assigned, nonprivate AS number, preferably the Internet service provider’s (ISP’s) own or the customer’s own AS number.

      Note:

      The automatic derivation of the BGP route target (auto-RT) for advertised prefixes is supported on a 2-byte AS number only.

    • ip-address:number, where ip-address is an IP address (a 4-byte value) and number is any 2-byte value. The IP address can be any globally unique unicast address. We recommend that you use the address that you configure in the router-id statement, which is a nonprivate address in your assigned prefix range.

  6. Configure either import and export policies for the EVPN routing table, or configure the default policies using the vrf-target statement configured at the [edit routing-instances routing-instance-name] hierarchy level.
  7. Configure each EVPN interface for the EVPN routing instance:
    • Configure each interface using the interface statement at the [edit routing-instances routing-instance-name protocols evpn] hierarchy level.

    • Configure interface encapsulation for the CE facing interfaces at the [edit interfaces interface-name encapsulation] hierarchy level. Supported encapsulations, except for EX9200 switches and QFX Series switches, are: (ethernet-bridge | vlan-bridge | extended-vlan-bridge). Supported encapsulations for EX9200 switches are: (extended-vlan-bridge | flexible-ethernet-services). Supported encapsulation for QFX Series switches is vxlan.

    • (Optional) Allow the EVPN to establish a connection to the CE device even if the CE device interface encapsulation and the EVPN interface encapsulations do not match by including the ignore-encapsulation-mismatch statement at the [edit routing-instances routing-instance-name protocols evpn interface interface-name] hierarchy level.

    • (Optional) (Not available on EX9200 switches) Specify a static MAC address for a logical interface in a bridge domain using the static-mac statement at the [edit routing-instances routing-instance-name protocols evpn interface interface-name] hierarchy level.

  8. Specify the maximum number of media access control (MAC) addresses that can be learned by the EVPN routing instance by including the interface-mac-limit statement.

    You can configure the same limit for all interfaces configured for a routing instance by including this statement at the [edit routing-instances routing-instance-name protocols evpn] hierarchy level. You can also configure a limit for a specific interface by including this statement at the [edit routing-instances routing-instance-name protocols evpn interface interface-name] hierarchy level.

    By default, packets with new source MAC addresses are forwarded after the MAC address limit is reached. You can alter this behavior by including the packet-action drop statement at either the [edit routing-instances routing-instance-name protocols evpn interface-mac-limit] or the [edit routing-instances routing-instance-name protocols evpn interface interface-name] hierarchy level. If you configure this statement, packets from new source MAC addresses are dropped once the configured MAC address limit is reached.

  9. Specify the MPLS label allocation setting for the EVPN by including the label-allocation statement with the per-instance option at the [edit routing-instances routing-instance-name protocols evpn] hierarchy level.

    If you configure this statement, one MPLS label is allocated for the specified EVPN routing instance.

  10. Enable MAC accounting for the EVPN by including the mac-statistics statement at the [edit routing-instances routing-instance-name protocols evpn] hierarchy level.
  11. Specify the number of addresses that can be stored in the MAC routing table using the mac-table-size statement at the [edit routing-instances routing-instance-name protocols evpn] hierarchy level.

    You can optionally configure the packet-action drop option to specify that packets for new source MAC addresses be dropped once the MAC address limit is reached. If you do not configure this option, packets for new source MAC addresses are forwarded.

  12. Disable MAC learning by including the no-mac-learning statement at either the [edit routing-instances routing-instance-name protocols evpn] hierarchy level to apply this behavior to all of the devices configured for an EVPN routing instance or at the [edit routing-instances routing-instance-name protocols evpn interface interface-name] hierarchy level to apply this behavior to just one of the CE devices.
  13. On MX Series and ACX5448 devices, while configuring EVPN-MPLS, you need to include the network-services enhanced-ip CLI statement at the [edit chassis] hierarchy level. On ACX Series devices running on Junos Evolved OS, the network-services enhanced-ip CLI statement is enabled by default.