Thursday, September 30, 2021

EVPN and Anycast Gateway on Juniper

I want to use the Anycast Gateway feature on Juniper MX. The reason I want to use it is to provide resilience to some customers that only have a /30 IP address configured (unable to run VRRP with a /30) between the two routers. I only have 2 x MX devices and that's the only place I need this Anycast Gateway feature to work (not extending it anywhere else in the network)

I can't use MC-LAG because they are MX5 but also the downstream switches are two separates switches (not a stack)

I have labbed it up and it seems to partially work but I'm getting about 20% packet loss but I can't seem to work out why. If I just create a normal IP address on ae1.107 on one of the routers it works fine and no packet loss which makes me pretty sure it's related to the EVPN/Anycast Gateway config.

Below are the configs from my two routers.

AE0 is used for connectivity between the two routers for OSPF, BGP, MPLS.

AE1 is where I want to put customer interfaces. I have configured one IP address on irb.107 (100.100.100.2/30)

I have another device in VLAN 107 and if I leave a ping running to 100.100.100.1 (Anycast IP address on the MXs) it responds fine but there is the packet loss.

Can anybody see any obvious issues with this config?

MX1

set interfaces ae0 flexible-vlan-tagging set interfaces ae0 aggregated-ether-options lacp active set interfaces ae0 aggregated-ether-options lacp periodic fast set interfaces ae0 unit 106 description "new iBGP connection to MX2" set interfaces ae0 unit 106 vlan-id 106 set interfaces ae0 unit 106 family inet address 2.1.1.1/30 set interfaces ae1 description "Aggregate to Customers" set interfaces ae1 enable set interfaces ae1 flexible-vlan-tagging set interfaces ae1 encapsulation flexible-ethernet-services set interfaces ae1 aggregated-ether-options lacp active set interfaces ae1 aggregated-ether-options lacp periodic fast set interfaces ae1 unit 0 family bridge interface-mode trunk set interfaces ae1 unit 0 family bridge vlan-id-list 107-109 set interfaces irb unit 107 family inet address 100.100.100.1/30 set interfaces irb unit 107 mac 00:00:00:01:01:01 set interfaces lo0 unit 0 family inet address 50.50.50.40/32 set routing-instances EVPN instance-type virtual-switch set routing-instances EVPN protocols evpn default-gateway do-not-advertise set routing-instances EVPN protocols evpn extended-vlan-list 107-109 set routing-instances EVPN bridge-domains NETWORK1 domain-type bridge set routing-instances EVPN bridge-domains NETWORK1 vlan-id 107 set routing-instances EVPN bridge-domains NETWORK1 routing-interface irb.107 set routing-instances EVPN bridge-domains NETWORK2 domain-type bridge set routing-instances EVPN bridge-domains NETWORK2 vlan-id 108 set routing-instances EVPN bridge-domains NETWORK3 domain-type bridge set routing-instances EVPN bridge-domains NETWORK3 vlan-id 109 set routing-instances EVPN interface ae1.0 set routing-instances EVPN route-distinguisher 1000:1000 set routing-instances EVPN vrf-target target:1000:1000 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 50.50.50.40 set protocols bgp group ibgp family inet-vpn unicast set protocols bgp group ibgp family evpn signaling set protocols bgp group ibgp neighbor 50.50.50.48 set protocols ldp interface ae0.106 set protocols mpls interface ae0.106 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ae0.106 set routing-options autonomous-system 6500 set routing-options forwarding-table chained-composite-next-hop ingress evpn 

MX2

set interfaces ae0 flexible-vlan-tagging set interfaces ae0 aggregated-ether-options lacp active set interfaces ae0 aggregated-ether-options lacp periodic fast set interfaces ae0 unit 106 description "new iBGP connection to MX1" set interfaces ae0 unit 106 vlan-id 106 set interfaces ae0 unit 106 family inet address 2.1.1.2/30 set interfaces ae1 description "Aggregate to Customers" set interfaces ae1 enable set interfaces ae1 flexible-vlan-tagging set interfaces ae1 encapsulation flexible-ethernet-services set interfaces ae1 aggregated-ether-options lacp active set interfaces ae1 aggregated-ether-options lacp periodic fast set interfaces ae1 unit 0 family bridge interface-mode trunk set interfaces ae1 unit 0 family bridge vlan-id-list 107-109 set interfaces irb unit 107 family inet address 100.100.100.1/30 set interfaces irb unit 107 mac 00:00:00:01:01:01 set interfaces lo0 unit 0 family inet address 50.50.50.48/32 set routing-instances EVPN instance-type virtual-switch set routing-instances EVPN protocols evpn default-gateway do-not-advertise set routing-instances EVPN protocols evpn extended-vlan-list 107-109 set routing-instances EVPN bridge-domains NETWORK1 domain-type bridge set routing-instances EVPN bridge-domains NETWORK1 vlan-id 107 set routing-instances EVPN bridge-domains NETWORK1 routing-interface irb.107 set routing-instances EVPN bridge-domains NETWORK2 domain-type bridge set routing-instances EVPN bridge-domains NETWORK2 vlan-id 108 set routing-instances EVPN bridge-domains NETWORK3 domain-type bridge set routing-instances EVPN bridge-domains NETWORK3 vlan-id 109 set routing-instances EVPN interface ae1.0 set routing-instances EVPN route-distinguisher 1000:1000 set routing-instances EVPN vrf-target target:1000:1000 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 50.50.50.48 set protocols bgp group ibgp family inet-vpn unicast set protocols bgp group ibgp family evpn signaling set protocols bgp group bitco-ibgp neighbor 50.50.50.40 set protocols ldp interface ae0.106 set protocols mpls interface ae0.106 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ae0.106 set routing-options autonomous-system 6500 set routing-options forwarding-table chained-composite-next-hop ingress evpn 


No comments:

Post a Comment