Goal

Is to establish l2 connectivity for a customer’s "H" Linux-3 and Linux-5 - two sites connected to router r3 and r4.

evpn topology

Assumptions

  • Customers data is carried in and as a vlan700

  • PE routers running is-is on transit links

  • PE and P routers running ldp on transit links

  • MPLS is enablen on transit links of PE and P routers

  • BGP is running with family evpn

BGP

BGP is used to signal EVPN

set protocols bgp group iBGP type internal
set protocols bgp group iBGP local-address 4.4.4.4
set protocols bgp group iBGP family evpn signaling
set protocols bgp group iBGP local-as 65000

LDP/MPLS

LDP is used to allocate labels for routers loopbacks - transport labels

root@r4> show configuration | display set | match ldp
set protocols ldp explicit-null
set protocols ldp interface ge-0/0/5.0
set protocols ldp interface ge-0/0/6.0
set protocols ldp interface lo0.0

root@r4> show configuration | display set | match mpls
set interfaces ge-0/0/5 unit 0 family mpls
set interfaces ge-0/0/6 unit 0 family mpls
set protocols mpls explicit-null
set protocols mpls interface ge-0/0/5.0
set protocols mpls interface ge-0/0/6.0
set protocols mpls interface lo0.0

Routing instance

Customer’s tagged port should be part of the routing-instances of a type evpn. Additionally port should have vlan-tagging and encapsulation flexible-ethernet-services on it and then again encapsulation vlan-bridge on a unit level.

set interfaces ge-0/0/2 description alpine5
set interfaces ge-0/0/2 vlan-tagging
set interfaces ge-0/0/2 encapsulation flexible-ethernet-services
set interfaces ge-0/0/2 unit 0 encapsulation vlan-bridge
set interfaces ge-0/0/2 unit 0 vlan-id 700
set routing-instances evpn-cust-h instance-type evpn
set routing-instances evpn-cust-h protocols evpn interface ge-0/0/2.0
set routing-instances evpn-cust-h interface ge-0/0/2.0
set routing-instances evpn-cust-h route-distinguisher 65535:700
set routing-instances evpn-cust-h vrf-target target:64535:700

Verification

show evpn instance extensive output from r4

Instance: __default_evpn__
  Route Distinguisher: 4.4.4.4:0
  Number of bridge domains: 0
  Number of neighbors: 0

Instance: evpn-cust-h
  Route Distinguisher: 65535:700
  Service interface type: VLAN-bundle service interface
  Per-instance MAC route label: 299920
  Duplicate MAC detection threshold: 5
  Duplicate MAC detection window: 180
  MAC database status                     Local  Remote
    MAC advertisements:                       1       1
    MAC+IP advertisements:                    1       1
    Default gateway MAC advertisements:       0       0
  Number of local interfaces: 2 (2 up)
    Interface name  ESI                            Mode             Status     AC-Role
    .local..8       00:00:00:00:00:00:00:00:00:00  single-homed     Up         Root
    ge-0/0/2.0      00:00:00:00:00:00:00:00:00:00  single-homed     Up         Root
  Number of IRB interfaces: 0 (0 up)
  Number of protect interfaces: 0
  Number of bridge domains: 1
    VLAN  Domain-ID Intfs/up   IRB-intf  Mode            MAC-sync IM-label  MAC-label  v4-SG-sync IM-core-NH v6-SG-sync IM-core-NH Trans-ID
    None               1  1              Extended        Enabled  299936              Disabled              Disabled
  Number of neighbors: 1
    Address               MAC    MAC+IP        AD        IM        ES Leaf-label Remote-DCI-Peer
    3.3.3.3                 1         1         0         1         0
  Number of ethernet segments: 0
  SMET Forwarding: Disabled

show route table evpn-cust-h.evpn.0 output from r4

evpn-cust-h.evpn.0: 6 destinations, 9 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

2:65535:700::0::ca:f8:5f:a8:8b:bf/304 MAC/IP
                   *[EVPN/170] 01:11:11
                       Indirect
2:65535:700::0::e6:7b:55:08:f2:9d/304 MAC/IP
                   *[BGP/170] 01:11:25, localpref 100, from 3.3.3.3
                      AS path: I, validation-state: unverified
                    >  to 192.168.14.1 via ge-0/0/6.0, Push 299792
                       to 192.168.45.5 via ge-0/0/5.0, Push 299824
                    [BGP/170] 01:11:25, localpref 100, from 5.5.5.5
                      AS path: I, validation-state: unverified
                    >  to 192.168.14.1 via ge-0/0/6.0, Push 299792
                       to 192.168.45.5 via ge-0/0/5.0, Push 299824
2:65535:700::0::ca:f8:5f:a8:8b:bf::10.150.150.10/304 MAC/IP
                   *[EVPN/170] 01:07:58
                       Indirect
2:65535:700::0::e6:7b:55:08:f2:9d::10.150.150.88/304 MAC/IP
                   *[BGP/170] 01:08:07, localpref 100, from 3.3.3.3
                      AS path: I, validation-state: unverified
                       to 192.168.14.1 via ge-0/0/6.0, Push 299792
                    >  to 192.168.45.5 via ge-0/0/5.0, Push 299824
                    [BGP/170] 01:08:07, localpref 100, from 5.5.5.5
                      AS path: I, validation-state: unverified
                       to 192.168.14.1 via ge-0/0/6.0, Push 299792
                    >  to 192.168.45.5 via ge-0/0/5.0, Push 299824
3:65535:700::0::3.3.3.3/248 IM
                   *[BGP/170] 01:16:30, localpref 100, from 3.3.3.3
                      AS path: I, validation-state: unverified
                       to 192.168.14.1 via ge-0/0/6.0, Push 299792
                    >  to 192.168.45.5 via ge-0/0/5.0, Push 299824
                    [BGP/170] 01:16:30, localpref 100, from 5.5.5.5
                      AS path: I, validation-state: unverified
                       to 192.168.14.1 via ge-0/0/6.0, Push 299792
                    >  to 192.168.45.5 via ge-0/0/5.0, Push 299824
3:65535:700::0::4.4.4.4/248 IM
                   *[EVPN/170] 01:16:28
                       Indirect

show route table mpls.0 from r4 shows label stack for EVPN

mpls.0: 18 destinations, 18 routes (18 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0                  *[MPLS/0] 02:14:10, metric 1
                       to table inet.0
0(S=0)             *[MPLS/0] 02:14:10, metric 1
                       to table mpls.0
1                  *[MPLS/0] 02:14:10, metric 1
                       Receive
2                  *[MPLS/0] 02:14:10, metric 1
                       to table inet6.0
2(S=0)             *[MPLS/0] 02:14:10, metric 1
                       to table mpls.0
13                 *[MPLS/0] 02:14:10, metric 1
                       Receive
299776             *[LDP/9] 02:12:36, metric 1
                    >  to 192.168.14.1 via ge-0/0/6.0, Swap 0
299776(S=0)        *[LDP/9] 02:12:36, metric 1
                    >  to 192.168.14.1 via ge-0/0/6.0, Pop
299808             *[LDP/9] 02:12:28, metric 1
                    >  to 192.168.14.1 via ge-0/0/6.0, Swap 299776
299824             *[LDP/9] 01:35:12, metric 1
                       to 192.168.14.1 via ge-0/0/6.0, Swap 299792
                    >  to 192.168.45.5 via ge-0/0/5.0, Swap 299824
299872             *[LDP/9] 01:35:12, metric 1
                    >  to 192.168.45.5 via ge-0/0/5.0, Swap 0
299872(S=0)        *[LDP/9] 01:35:12, metric 1
                    >  to 192.168.45.5 via ge-0/0/5.0, Pop
299888             *[LDP/9] 01:35:12, metric 1
                    >  to 192.168.45.5 via ge-0/0/5.0, Swap 299776
299920             *[EVPN/7] 01:26:16, routing-instance evpn-cust-h, route-type Ingress-MAC
                       to table evpn-cust-h.evpn-mac.0
299936             *[EVPN/7] 01:31:33, routing-instance evpn-cust-h, route-type Ingress-IM
                       to table evpn-cust-h.evpn-mac.0
299984             *[EVPN/7] 01:31:35, remote-pe 3.3.3.3, routing-instance evpn-cust-h, route-type Egress-IM
                    >  to 192.168.14.1 via ge-0/0/6.0, Push 299888, Push 299792(top)
                       to 192.168.45.5 via ge-0/0/5.0, Push 299888, Push 299824(top)
300000             *[EVPN/7] 01:26:30, remote-pe 3.3.3.3, routing-instance evpn-cust-h, route-type Egress-MAC
                    >  to 192.168.14.1 via ge-0/0/6.0, Push 299872, Push 299792(top)
                       to 192.168.45.5 via ge-0/0/5.0, Push 299872, Push 299824(top)
300016             *[LDP/9] 00:57:09, metric 1
                    >  to 192.168.45.5 via ge-0/0/5.0, Swap 299904

Packet capture showing succseful traffic flow and two labels

evpn pcap
  Frame 180: 124 bytes on wire (992 bits), 124 bytes captured (992 bits) on interface -, id 0
  Ethernet II, Src: 0c:51:a0:01:00:08 (0c:51:a0:01:00:08), Dst: 0c:bc:d8:23:00:08 (0c:bc:d8:23:00:08)
      Destination: 0c:bc:d8:23:00:08 (0c:bc:d8:23:00:08)
      Source: 0c:51:a0:01:00:08 (0c:51:a0:01:00:08)
      Type: MPLS label switched packet (0x8847)
  MultiProtocol Label Switching Header, Label: 299792, Exp: 0, S: 0, TTL: 255
      0100 1001 0011 0001 0000 .... .... .... = MPLS Label: 299792 (0x49310)
      .... .... .... .... .... 000. .... .... = MPLS Experimental Bits: 0
      .... .... .... .... .... ...0 .... .... = MPLS Bottom Of Label Stack: 0
      .... .... .... .... .... .... 1111 1111 = MPLS TTL: 255
  MultiProtocol Label Switching Header, Label: 299872, Exp: 0, S: 1, TTL: 255
      0100 1001 0011 0110 0000 .... .... .... = MPLS Label: 299872 (0x49360)
      .... .... .... .... .... 000. .... .... = MPLS Experimental Bits: 0
      .... .... .... .... .... ...1 .... .... = MPLS Bottom Of Label Stack: 1
      .... .... .... .... .... .... 1111 1111 = MPLS TTL: 255
  Data (102 bytes)
      Data: e67b5508f29dcaf85fa88bbf810002bc08004500005432850000400106960a96960a0a96…
      [Length: 102]

Some bytes of the 'Data':

      caf85fa88bbf - mac addres of 10.150.150.10
      8100 - Customer VLAN Tag Type (C-Tag, formerly called the Q-Tag) (initially Wellfleet)
      02bc - vlan 700
      0800 - Internet Protocol version 4 EtherType

Full configuration files

r3

set system host-name r3
set interfaces ge-0/0/0 description to_alpine3
set interfaces ge-0/0/0 vlan-tagging
set interfaces ge-0/0/0 encapsulation flexible-ethernet-services
set interfaces ge-0/0/0 unit 0 encapsulation vlan-bridge
set interfaces ge-0/0/0 unit 0 vlan-id 700
set interfaces ge-0/0/2 unit 0 family inet address 192.168.23.3/24
set interfaces ge-0/0/2 unit 0 family iso
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces ge-0/0/3 unit 0 family inet address 192.168.36.3/24
set interfaces ge-0/0/3 unit 0 family iso
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 3.3.3.3/32
set interfaces lo0 unit 0 family iso address 49.0004.1000.0000.0003.00
set routing-instances evpn-cust-h instance-type evpn
set routing-instances evpn-cust-h protocols evpn interface ge-0/0/0.0
set routing-instances evpn-cust-h interface ge-0/0/0.0
set routing-instances evpn-cust-h route-distinguisher 65535:700
set routing-instances evpn-cust-h vrf-target target:64535:700
set protocols router-advertisement interface fxp0.0
set protocols bgp group iBGP type internal
set protocols bgp group iBGP local-address 3.3.3.3
set protocols bgp group iBGP family inet unicast
set protocols bgp group iBGP family inet-vpn unicast
set protocols bgp group iBGP family inet6 unicast
set protocols bgp group iBGP family inet6-vpn unicast
set protocols bgp group iBGP family l2vpn signaling
set protocols bgp group iBGP family evpn signaling
set protocols bgp group iBGP local-as 65000
set protocols bgp group iBGP neighbor 1.1.1.1
set protocols bgp group iBGP neighbor 2.2.2.2
set protocols bgp group iBGP neighbor 4.4.4.4
set protocols bgp group iBGP neighbor 5.5.5.5
set protocols bgp group iBGP neighbor 6.6.6.6
set protocols isis interface ge-0/0/2.0
set protocols isis interface ge-0/0/3.0
set protocols isis interface lo0.0 passive
set protocols isis level 1 disable
set protocols ldp explicit-null
set protocols ldp interface ge-0/0/2.0
set protocols ldp interface ge-0/0/3.0
set protocols ldp interface lo0.0
set protocols mpls explicit-null
set protocols mpls interface ge-0/0/2.0
set protocols mpls interface ge-0/0/3.0
set protocols mpls interface lo0.0

r4

set system host-name r4
set interfaces ge-0/0/2 description alpine5
set interfaces ge-0/0/2 vlan-tagging
set interfaces ge-0/0/2 encapsulation flexible-ethernet-services
set interfaces ge-0/0/2 unit 0 encapsulation vlan-bridge
set interfaces ge-0/0/2 unit 0 vlan-id 700
set interfaces ge-0/0/5 unit 0 family inet address 192.168.45.4/24
set interfaces ge-0/0/5 unit 0 family iso
set interfaces ge-0/0/5 unit 0 family mpls
set interfaces ge-0/0/6 unit 0 family inet address 192.168.14.4/24
set interfaces ge-0/0/6 unit 0 family iso
set interfaces ge-0/0/6 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 4.4.4.4/32
set interfaces lo0 unit 0 family iso address 49.0004.1000.0000.0004.00
set routing-instances evpn-cust-h instance-type evpn
set routing-instances evpn-cust-h protocols evpn interface ge-0/0/2.0
set routing-instances evpn-cust-h interface ge-0/0/2.0
set routing-instances evpn-cust-h route-distinguisher 65535:700
set routing-instances evpn-cust-h vrf-target target:64535:700
set protocols router-advertisement interface fxp0.0
set protocols bgp group iBGP type internal
set protocols bgp group iBGP local-address 4.4.4.4
set protocols bgp group iBGP family inet unicast
set protocols bgp group iBGP family inet-vpn unicast
set protocols bgp group iBGP family inet6 unicast
set protocols bgp group iBGP family inet6-vpn unicast
set protocols bgp group iBGP family l2vpn signaling
set protocols bgp group iBGP family evpn signaling
set protocols bgp group iBGP local-as 65000
set protocols bgp group iBGP neighbor 1.1.1.1
set protocols bgp group iBGP neighbor 2.2.2.2
set protocols bgp group iBGP neighbor 3.3.3.3
set protocols bgp group iBGP neighbor 5.5.5.5
set protocols bgp group iBGP neighbor 6.6.6.6
set protocols isis interface ge-0/0/5.0
set protocols isis interface ge-0/0/6.0
set protocols isis interface lo0.0 passive
set protocols isis level 1 disable
set protocols ldp explicit-null
set protocols ldp interface ge-0/0/5.0
set protocols ldp interface ge-0/0/6.0
set protocols ldp interface lo0.0
set protocols mpls explicit-null
set protocols mpls interface ge-0/0/5.0
set protocols mpls interface ge-0/0/6.0
set protocols mpls interface lo0.0