In the LDP PW configuration, one thing needs to be careful is the MTU. You have to ensure the MTU along the underlying LSP matched. Here is an example:
So we have OSPF and ISIS enabled on VLAN 301/302 on CEs. But only OSPF up, no ISIS neighbor at all
CE1#sh ip os neighbor vrf ce1-pw4-301
Neighbor ID VRF Pri State Dead Time Address Interface
101.255.2.2 ce1-pw4-301 1 FULL/DR 00:00:32 101.101.101.2 Vlan301
CE1#sh isis neighbors vrf ce1-pw4-302
CE1#
Well the ping works as expected, CE1 can ping CE2's vlan 302 address - 102.102.102.2
CE1#ping vrf ce1-pw4-302 102.102.102.2
PING 102.102.102.2 (102.102.102.2) 72(100) bytes of data.
80 bytes from 102.102.102.2: icmp_seq=1 ttl=64 time=0.276 ms
80 bytes from 102.102.102.2: icmp_seq=2 ttl=64 time=0.119 ms
80 bytes from 102.102.102.2: icmp_seq=3 ttl=64 time=0.112 ms
80 bytes from 102.102.102.2: icmp_seq=4 ttl=64 time=0.111 ms
80 bytes from 102.102.102.2: icmp_seq=5 ttl=64 time=0.110 ms
--- 102.102.102.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.110/0.145/0.276/0.066 ms, ipg/ewma 0.202/0.208 ms
Both sides configured with MTU 9000
CE1#sh run int vlan 302
interface Vlan302
mtu 9000
vrf forwarding ce1-pw4-302
ip address 102.102.102.1/24
isis enable isis-ce1-pw4-302
CE2#sh run int vlan 302
interface Vlan302
mtu 9000
vrf forwarding ce2-pw4-302
ip address 102.102.102.2/24
isis enable isis-ce2-pw4-302
Let's try ping the destination with size of data plus DF-bit
CE1#ping vrf ce1-pw4-302 102.102.102.2 size 9000 df-bit
PING 102.102.102.2 (102.102.102.2) 8972(9000) bytes of data.
--- 102.102.102.2 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 40ms
Ok, it fails but where is the culprit?
PE1 and PE2 are good:
PE1(config-if-Et47/2)#sh ip int brief | grep 88
Ethernet3/1 88.1.11.11/24 up up 9082
Ethernet45/3 88.3.11.11/24 down down 9082
PE2(config-if-Et51/1)#sh ip int brief | grep 88
Ethernet33/1 88.4.22.22/24 up up 9082
Ethernet51/1 88.2.22.22/24 up up 9082
Let's move on to P routers:
P1#sh ip int brief | grep 88
Ethernet35/1 88.1.4.1/24 up up 8000
Ethernet51/1 88.1.2.1/24 up up 8000
Ethernet52/1 88.1.3.1/24 up up 9082
Ethernet54/1 88.1.11.1/24 up up 9082
Ok, here is the issue. Let's correct them and ISIS neighbor is up!
CE1#sh isis neighbors vrf ce1-pw4-302
Instance VRF System Id Type Interface SNPA State Hold time Circuit Id
isis-ce1- ce1-pw4- CE2 L2 Vlan302 44:4c:a8:11:6b:e1 UP 8 CE2.02
So, the reason is, the ISIS pads hello packet upto MTU and the oversized packets will be dropped siliently on underlying P routers. Hence ISIS fails to form neighbor.
The OSPF just negotiates the MTU of connecting interfaces, which are 9000 in both sides, so ospf neighbor is up w/o any issues. But if you have a large LSA database, and ospf utilize the full MTU to transmit it, you will hit this MTU mismatch later, but not in the neigobor discoverage stage.
Disclaimer: The information contained in this blog is for informational purposes only and should not be considered as official documentation on any subject matter. The postings on this blog are my own and do not necessarily represent the opinions of my current and previous employers.
2/11/2019
2/09/2019
How to detect a problem with 1 ECMP link
The ICMP packets are not hashed over ECMP path, which is shown in a quick test below on Arista EOS 4.20.8M.
But we can use traceroute with multiple probes (Thanks for my buddy Janardhan Madabattular's idea), because the traceroute uses UDP with random port numbers.
And the traceroute has a limitation with 10 probes, so need to run multiple times for high-number-way ECMP existing.
[admin@R1 ~]$ traceroute 3.3.3.3 -s 1.1.1.1 -q 10
traceroute to 3.3.3.3 (3.3.3.3), 30 hops max, 60 byte packets
1 12.12.12.2 (12.12.12.2) 0.147 ms 0.078 ms 0.111 ms 0.069 ms 0.082 ms 0.068 ms 0.098 ms 0.072 ms 0.155 ms 0.089 ms
2 3.3.3.3 (3.3.3.3) 0.116 ms * 0.064 ms * 0.069 ms 0.085 ms 0.167 ms 0.060 ms 0.073 ms 0.062 ms
R1(1.1.1.1)-----R2==(4-way ip ecmp)===R3 (3.3.3.3)
1) I send 10K ping to R3
R1(config-if-Lo0)#ping 3.3.3.3 source 1.1.1.1 repeat 10000
2) R2 has a 4-way ecmp
R2(config)#sh ip route 3.3.3.3
S 3.3.3.3/32 [1/0] via 23.23.1.3, Ethernet6/1/1
via 23.23.2.3, Ethernet6/1/2
via 23.23.3.3, Ethernet6/1/3
via 23.23.4.3, Ethernet6/1/4
3) All 10K goes the 1st link
R2(config)#sh int et6/1/1 - 4 | egrep 'ets input|ets output|^Eth'
Ethernet6/1/1 is up, line protocol is up (connected)
3 packets input, 699 bytes
10003 packets output, 1180696 bytes <<<< R1-R3
Ethernet6/1/2 is up, line protocol is up (connected)
3 packets input, 699 bytes
3 packets output, 696 bytes
Ethernet6/1/3 is up, line protocol is up (connected)
3 packets input, 699 bytes
3 packets output, 696 bytes
Ethernet6/1/4 is up, line protocol is up (connected)
10003 packets input, 1180699 bytes <<<< R3-R1
3 packets output, 696 bytes
....
I believe hashing is based on 5-tuple (proto#, src/dst ip, src/dst port) for tcp/udp. How about ICMP? It misses src/dst port, in stead type/code/checksum in the place. The packet capture shows the checksum is calculated and varied.

But we can use traceroute with multiple probes (Thanks for my buddy Janardhan Madabattular's idea), because the traceroute uses UDP with random port numbers.
And the traceroute has a limitation with 10 probes, so need to run multiple times for high-number-way ECMP existing.
[admin@R1 ~]$ traceroute 3.3.3.3 -s 1.1.1.1 -q 10
traceroute to 3.3.3.3 (3.3.3.3), 30 hops max, 60 byte packets
1 12.12.12.2 (12.12.12.2) 0.147 ms 0.078 ms 0.111 ms 0.069 ms 0.082 ms 0.068 ms 0.098 ms 0.072 ms 0.155 ms 0.089 ms
2 3.3.3.3 (3.3.3.3) 0.116 ms * 0.064 ms * 0.069 ms 0.085 ms 0.167 ms 0.060 ms 0.073 ms 0.062 ms
R1(1.1.1.1)-----R2==(4-way ip ecmp)===R3 (3.3.3.3)
1) I send 10K ping to R3
R1(config-if-Lo0)#ping 3.3.3.3 source 1.1.1.1 repeat 10000
2) R2 has a 4-way ecmp
R2(config)#sh ip route 3.3.3.3
S 3.3.3.3/32 [1/0] via 23.23.1.3, Ethernet6/1/1
via 23.23.2.3, Ethernet6/1/2
via 23.23.3.3, Ethernet6/1/3
via 23.23.4.3, Ethernet6/1/4
3) All 10K goes the 1st link
R2(config)#sh int et6/1/1 - 4 | egrep 'ets input|ets output|^Eth'
Ethernet6/1/1 is up, line protocol is up (connected)
3 packets input, 699 bytes
10003 packets output, 1180696 bytes <<<< R1-R3
Ethernet6/1/2 is up, line protocol is up (connected)
3 packets input, 699 bytes
3 packets output, 696 bytes
Ethernet6/1/3 is up, line protocol is up (connected)
3 packets input, 699 bytes
3 packets output, 696 bytes
Ethernet6/1/4 is up, line protocol is up (connected)
10003 packets input, 1180699 bytes <<<< R3-R1
3 packets output, 696 bytes
....
I believe hashing is based on 5-tuple (proto#, src/dst ip, src/dst port) for tcp/udp. How about ICMP? It misses src/dst port, in stead type/code/checksum in the place. The packet capture shows the checksum is calculated and varied.

2/08/2019
Arista MPLS VPN Step by Step (2b) L2VPN - Type 5 PW
This blog covers type 5 pw configuration. Here is the topology:

Configuration-wise, type 5 is simpler than type 4. And between 2 CEs, it is just a like direct ethernet link. From above topology, there is 2 vlans between CEs over 1 pw.
PE1 Configuration:
mpls ldp
router-id 88.255.11.11
transport-address interface Loopback88
fec filter prefix-list fec-pfx-list
no shutdown
!
pseudowires
pseudowire to-ce2-type5-pw
neighbor 88.255.22.22
pseudowire-id 303
mtu 9082
!
patch panel
patch ce1-ce2-pw5-1
connector 1 interface Ethernet47/3
connector 2 pseudowire ldp to-ce2-type5-pw
!
interface Ethernet47/3
description mpls.ldp5pw.pe1=>ce1.et51/3
!! PE to CE interface MUST be routed port !!
no switchport
L2 Control Packets
One different between type4 and 5 is the forwarding behavior of L2 control packets. From above link, the LLDP is forwarded. So "show lldp neighbor" on CE1 shows CE2, not PE1
CE1(config)#ln
Et51/1 PE1 Ethernet47/1 120
Et51/2 PE1 Ethernet47/2 120
Et51/3 PE1 Ethernet47/3 120
Et51/3 CE2 Ethernet52/3 120
Arista MPLS VPN Step by Step (2a) L2VPN - Type 4 PW
Based on the MPLS LDP configuration completed in the previous session, I will talk about the MPLS LDP type 4 pseudowire configuration.
Regarding the LDP/BGP/IGP configuration, please refer to this blog.
Here is the topology:

Here we have 2 pseudowires: ce1-ce2-pw4-vlan-301 and ce1-ce2-pw4-vlan-302 to L2 connectivity between CE1 and CE2 across LDP cloud. From CEs' perspective, the pw works like a directly connected L2 link. So the VLANs are in same subnet and running IGPs (OSPF/ISIS) on the top of it.
PE 1 configuration:
interface Ethernet3/1
description mpls.pe1=>p1:et54/1
mtu 9082
no switchport
ip address 88.1.11.11/24
!
interface Ethernet45/3
description mpls.pe1=>p3:et45/3
mtu 9082
no switchport
ip address 88.3.11.11/24
!
interface Ethernet47/2
description mpl1.pe1=>ce1:et51/1
mtu 9082
! pw intf to CE1 must be routed port, otherwise pw down !
no switchport
!
interface Loopback88
ip address 88.255.11.11/32
!
mpls ip
!
mpls ldp
! mpls ldp config is same as mpls ldp l3vpn !
router-id 88.255.11.11
transport-address interface Loopback88
fec filter prefix-list fec-pfx-list
no shutdown
!
pseudowires
pseudowire to-ce2-vlan-301
! 88.255.22.22 is PE2's ldp/pw loopback ip addr !
neighbor 88.255.22.22
pseudowire-id 301
mtu 9082
!
pseudowire to-ce2-vlan-302
neighbor 88.255.22.22
pseudowire-id 302
mtu 9082
!
patch panel
patch ce1-ce2-pw4-vlan-301
! note, e47/2 is cfg'ed as routed port, NOT sw/trunk port !
connector 1 interface Ethernet47/2 dot1q vlan 301
connector 2 pseudowire ldp to-ce2-vlan-301
!
patch ce1-ce2-pw4-vlan-302
connector 1 interface Ethernet47/2 dot1q vlan 302
connector 2 pseudowire ldp to-ce2-vlan-302
PE 2 configuration:
Regarding the LDP/BGP/IGP configuration, please refer to this blog.
Here is the topology:

Here we have 2 pseudowires: ce1-ce2-pw4-vlan-301 and ce1-ce2-pw4-vlan-302 to L2 connectivity between CE1 and CE2 across LDP cloud. From CEs' perspective, the pw works like a directly connected L2 link. So the VLANs are in same subnet and running IGPs (OSPF/ISIS) on the top of it.
PE 1 configuration:
interface Ethernet3/1
description mpls.pe1=>p1:et54/1
mtu 9082
no switchport
ip address 88.1.11.11/24
!
interface Ethernet45/3
description mpls.pe1=>p3:et45/3
mtu 9082
no switchport
ip address 88.3.11.11/24
!
interface Ethernet47/2
description mpl1.pe1=>ce1:et51/1
mtu 9082
! pw intf to CE1 must be routed port, otherwise pw down !
no switchport
!
interface Loopback88
ip address 88.255.11.11/32
!
mpls ip
!
mpls ldp
! mpls ldp config is same as mpls ldp l3vpn !
router-id 88.255.11.11
transport-address interface Loopback88
fec filter prefix-list fec-pfx-list
no shutdown
!
pseudowires
pseudowire to-ce2-vlan-301
! 88.255.22.22 is PE2's ldp/pw loopback ip addr !
neighbor 88.255.22.22
pseudowire-id 301
mtu 9082
!
pseudowire to-ce2-vlan-302
neighbor 88.255.22.22
pseudowire-id 302
mtu 9082
!
patch panel
patch ce1-ce2-pw4-vlan-301
! note, e47/2 is cfg'ed as routed port, NOT sw/trunk port !
connector 1 interface Ethernet47/2 dot1q vlan 301
connector 2 pseudowire ldp to-ce2-vlan-301
!
patch ce1-ce2-pw4-vlan-302
connector 1 interface Ethernet47/2 dot1q vlan 302
connector 2 pseudowire ldp to-ce2-vlan-302
PE 2 configuration:
interface Ethernet33/1
description pe2-p4=>p4.et33/1
mtu 9082
no switchport
ip address 88.4.22.22/24
!
interface Ethernet37/2
description pe2-ce2=>ce2.et52/2
mtu 9082
no switchport
!
interface Ethernet51/1
description pe2-p2=>p2.et51/1
mtu 9082
no switchport
ip address 88.2.22.22/24
!
interface Loopback88
ip address 88.255.22.22/32
!
mpls ip
!
mpls ldp
router-id 88.255.22.22
transport-address interface Loopback88
fec filter prefix-list fec-pfx-list
no shutdown
!
pseudowires
pseudowire to-ce1-vlan-301
neighbor 88.255.11.11
pseudowire-id 301
mtu 9082
!
pseudowire to-ce1-vlan-302
neighbor 88.255.11.11
pseudowire-id 302
mtu 9082
!
patch panel
patch ce1-ce2-pw4-vlan-301
connector 1 interface Ethernet37/2 dot1q vlan 301
connector 2 pseudowire ldp to-ce1-vlan-301
!
patch ce1-ce2-pw4-vlan-302
connector 1 interface Ethernet37/2 dot1q vlan 302
connector 2 pseudowire ldp to-ce1-vlan-302
For the CE's configuration, please note that I use VRF on CE to simulate multiple hosts.
CE1 configuration:
vrf definition ce1-pw4-301
rd 301:1
!
vrf definition ce1-pw4-302
rd 302:1
!
interface Ethernet51/2
description mpls.ce1=>pe1:et47/2
! compare with PE1's et47/2, here is sw + trunk !
switchport trunk allowed vlan 301-302
switchport mode trunk
!
interface Vlan301
vrf forwarding ce1-pw4-301
ip address 101.101.101.1/24
!
interface Vlan302
mtu 9000
vrf forwarding ce1-pw4-302
ip address 102.102.102.1/24
isis enable isis-ce1-pw4-302
!
interface Loopback301
vrf forwarding ce1-pw4-301
ip address 101.255.1.1/24
!
interface Loopback302
vrf forwarding ce1-pw4-302
ip address 102.255.1.1/24
isis enable isis-ce1-pw4-302
!
ip routing vrf ce1-pw4-301
ip routing vrf ce1-pw4-302
!
router isis isis-ce1-pw4-302 vrf ce1-pw4-302
net 47.0002.0001.0001.0001.00
is-type level-2
!
address-family ipv4 unicast
!
router ospf 301 vrf ce1-pw4-301
network 101.0.0.0/8 area 0.0.0.0
max-lsa 12000
CE2 configuration:
interface Ethernet52/2
description mpls.ce2=>pe2:et37/2
switchport trunk allowed vlan 301-302
switchport mode trunk
!
vrf definition ce2-pw4-301
rd 301:2
!
vrf definition ce2-pw4-302
rd 302:2
!
interface Loopback301
vrf forwarding ce2-pw4-301
ip address 101.255.2.2/24
!
interface Loopback302
vrf forwarding ce2-pw4-302
ip address 102.255.2.2/24
isis enable isis-ce2-pw4-302
!
interface Vlan301
vrf forwarding ce2-pw4-301
ip address 101.101.101.2/24
!
interface Vlan302
mtu 9000
vrf forwarding ce2-pw4-302
ip address 102.102.102.2/24
isis enable isis-ce2-pw4-302
!
ip routing vrf ce2-pw4-301
ip routing vrf ce2-pw4-302
!
router isis isis-ce2-pw4-302 vrf ce2-pw4-302
net 47.0002.0002.0002.0002.00
is-type level-2
!
address-family ipv4 unicast
!
router ospf 301 vrf ce2-pw4-301
network 101.0.0.0/8 area 0.0.0.0
max-lsa 12000
2/05/2019
Arista MPLS VPN Step by Step (1e) MPLS L3VPN PE/CE ISIS
Now it is the PE/CE routing option - ISIS. Here is the simplified topology

PE1 Configuration:
router bgp 65001
CE Configuration:
Ping check:
CE1(vrf:ce1-isis)#sh ip route
.......
C 100.100.115.0/24 is directly connected, Vlan104
I L2 100.250.115.0/24 [115/20] via 100.100.115.11, Vlan104
C 100.255.115.0/24 is directly connected, Loopback104
I L2 200.200.115.0/24 [115/10] via 100.100.115.11, Vlan104
I L2 200.250.115.0/24 [115/10] via 100.100.115.11, Vlan104
I L2 200.255.115.0/24 [115/10] via 100.100.115.11, Vlan104
CE1(vrf:ce1-isis)#ping 200.250.115.22 << ping pe2's loopback
....
--- 200.250.115.22 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.117/0.181/0.335/0.083 ms, ipg/ewma 0.243/0.253 ms
CE1(vrf:ce1-isis)#ping 200.255.115.2 << ping ce2's loopback
.....
--- 200.255.115.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.120/0.156/0.291/0.069 ms, ipg/ewma 0.214/0.221 ms
CE1(vrf:ce1-isis)#ping 200.200.115.2 << ping pe2-ce2's ip @ ce2
....
--- 200.200.115.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.120/0.153/0.274/0.061 ms, ipg/ewma 0.210/0.211 ms
CE1(vrf:ce1-isis)#ping 200.200.115.22 << ping pe2-ce2's ip @ pe2
.....
--- 200.200.115.22 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.115/0.151/0.253/0.053 ms, ipg/ewma 0.208/0.199 ms

PE1 Configuration:
router bgp 65001
!
vrf pe1-isis
rd 100:115
route-target import vpn-ipv4 100:115
route-target import vpn-ipv4 200:115 << import PE2's routes
route-target export vpn-ipv4 100:115 << pe1=100:115, pe2=200:115
maximum-paths 2 ecmp 2
redistribute connected
redistribute isis level-2
!
router isis isis-pe1 vrf pe1-isis
net 47.0001.0011.0011.0011.00
is-type level-2
redistribute bgp
!
address-family ipv4 unicast
router isis isis-ce1 vrf ce1-isis
net 47.0001.0001.0001.0001.00
is-type level-2
!
address-family ipv4 unicast
.......
C 100.100.115.0/24 is directly connected, Vlan104
I L2 100.250.115.0/24 [115/20] via 100.100.115.11, Vlan104
C 100.255.115.0/24 is directly connected, Loopback104
I L2 200.200.115.0/24 [115/10] via 100.100.115.11, Vlan104
I L2 200.250.115.0/24 [115/10] via 100.100.115.11, Vlan104
I L2 200.255.115.0/24 [115/10] via 100.100.115.11, Vlan104
CE1(vrf:ce1-isis)#ping 200.250.115.22 << ping pe2's loopback
....
--- 200.250.115.22 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.117/0.181/0.335/0.083 ms, ipg/ewma 0.243/0.253 ms
CE1(vrf:ce1-isis)#ping 200.255.115.2 << ping ce2's loopback
.....
--- 200.255.115.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.120/0.156/0.291/0.069 ms, ipg/ewma 0.214/0.221 ms
CE1(vrf:ce1-isis)#ping 200.200.115.2 << ping pe2-ce2's ip @ ce2
....
--- 200.200.115.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.120/0.153/0.274/0.061 ms, ipg/ewma 0.210/0.211 ms
CE1(vrf:ce1-isis)#ping 200.200.115.22 << ping pe2-ce2's ip @ pe2
.....
--- 200.200.115.22 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.115/0.151/0.253/0.053 ms, ipg/ewma 0.208/0.199 ms
Arista MPLS VPN Step by Step (1d) MPLS L3VPN PE/CE OSPF
In this post I will discuss the PE/CE routing option - OSPF. Here is the simplified topology

PE Configuration:
router bgp 65001
....
vrf pe1-ospf
rd 100:110
route-target import vpn-ipv4 100:110
route-target import vpn-ipv4 200:110
route-target export vpn-ipv4 100:110
maximum-paths 2 ecmp 2
redistribute connected
redistribute ospf
!
router ospf 100 vrf pe1-ospf
router-id 88.255.11.11
passive-interface Loopback103
redistribute bgp
network 100.100.110.11/32 area 0.0.0.0
network 100.250.110.11/32 area 0.0.0.0
max-lsa 12000
CE Configuration:
router ospf 100 vrf ce1-ospf
router-id 100.250.100.100
passive-interface Loopback103
network 100.100.110.1/32 area 0.0.0.0
network 100.255.110.1/32 area 0.0.0.0
max-lsa 12000

PE Configuration:
router bgp 65001
....
vrf pe1-ospf
rd 100:110
route-target import vpn-ipv4 100:110
route-target import vpn-ipv4 200:110
route-target export vpn-ipv4 100:110
maximum-paths 2 ecmp 2
redistribute connected
redistribute ospf
!
router ospf 100 vrf pe1-ospf
router-id 88.255.11.11
passive-interface Loopback103
redistribute bgp
network 100.100.110.11/32 area 0.0.0.0
network 100.250.110.11/32 area 0.0.0.0
max-lsa 12000
router ospf 100 vrf ce1-ospf
router-id 100.250.100.100
passive-interface Loopback103
network 100.100.110.1/32 area 0.0.0.0
network 100.255.110.1/32 area 0.0.0.0
max-lsa 12000
Arista MPLS VPN Step by Step (1c) MPLS L3VPN PE/CE eBGP
Following the previous blog, in this post I will discuss the PE/CE routing option - eBGP. Here is the simplified topology
PE Configuration
router bgp 65001
router-id 88.255.22.22
neighbor vpnv4-rr peer-group
neighbor vpnv4-rr remote-as 65001
neighbor vpnv4-rr update-source Loopback88
neighbor vpnv4-rr send-community standard extended
neighbor vpnv4-rr maximum-routes 12000
neighbor 88.255.1.1 peer-group vpnv4-rr
neighbor 88.255.2.2 peer-group vpnv4-rr
address-family vpn-ipv4
neighbor vpnv4-rr activate
neighbor default encapsulation mpls next-hop-self source-interface Loopback88
!
vrf pe2-ebgp
rd 200:20
route-target import vpn-ipv4 100:20
route-target import vpn-ipv4 200:20
route-target export vpn-ipv4 200:20
maximum-paths 2 ecmp 2
neighbor 200.200.20.2 remote-as 65500
neighbor 200.200.20.2 maximum-routes 12000
redistribute connected
CE configuration is as below. In my lab, I use vrf on CE router to segregate and simulate different CEs.
router bgp 65500
router-id 100.255.100.100
!
vrf ce1-ebgp
rd 100:20
neighbor 100.100.20.11 remote-as 65001
! need alllowas-in to permit remote prefix with same AS#
neighbor 100.100.20.11 allowas-in 3
neighbor 100.100.20.11 maximum-routes 12000
redistribute connected
2/04/2019
Arista MPLS VPN Step by Step (1b) MPLS L3VPN PE/CE Static
In this blog, I will discuss the PE/CE routing option - static. Here is the simplified topology

The configuration is quite simple.
router bgp 65001
router-id 88.255.11.11
neighbor vpnv4-rr peer-group
neighbor vpnv4-rr remote-as 65001
neighbor vpnv4-rr update-source Loopback88
neighbor vpnv4-rr send-community standard extended
neighbor vpnv4-rr maximum-routes 12000
neighbor 88.255.1.1 peer-group vpnv4-rr
neighbor 88.255.2.2 peer-group vpnv4-rr
!
address-family vpn-ipv4
neighbor vpnv4-rr activate
neighbor default encapsulation mpls next-hop-self source-interface Loopback88
!
....
vrf pe1-static
!! pe/ce: static, intf:vlan101+lo101, addr:100.1.11.0/24+100.1.100.0/32
rd 100:1
!
! PE1 ex/import 100:1, and import PE2's 200:1
!
route-target import vpn-ipv4 100:1
route-target import vpn-ipv4 200:1
route-target export vpn-ipv4 100:1
maximum-paths 2 ecmp 2
redistribute connected
redistribute static
So on PE1, we can 6 vpn-ipv4 routes (doubled by 2 RRs)
PE1(config)#sh bgp vpn-ipv4 rd 200:1
BGP routing table information for VRF default
Router identifier 88.255.11.11, local AS number 65001
Route status codes: s - suppressed, * - valid, > - active, # - not installed, E - ECMP head, e - ECMP
S - Stale, c - Contributing to ECMP, b - backup
% - Pending BGP convergence
Origin codes: i - IGP, e - EGP, ? - incomplete
AS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop
Network Next Hop Metric LocPref Weight Path
* > RD: 200:1 IPv4 prefix 200.200.1.0/24
88.255.22.22 - 100 0 i Or-ID: 88.255.22.22 C-LST: 88.255.1.1
* RD: 200:1 IPv4 prefix 200.200.1.0/24
88.255.22.22 - 100 0 i Or-ID: 88.255.22.22 C-LST: 88.255.2.2
* > RD: 200:1 IPv4 prefix 200.250.1.0/24
88.255.22.22 - 100 0 i Or-ID: 88.255.22.22 C-LST: 88.255.1.1
* RD: 200:1 IPv4 prefix 200.250.1.0/24
88.255.22.22 - 100 0 i Or-ID: 88.255.22.22 C-LST: 88.255.2.2
* > RD: 200:1 IPv4 prefix 200.255.1.0/24
88.255.22.22 - 100 0 ? Or-ID: 88.255.22.22 C-LST: 88.255.1.1
* RD: 200:1 IPv4 prefix 200.255.1.0/24
88.255.22.22 - 100 0 ? Or-ID: 88.255.22.22 C-LST: 88.255.2.2
Arista MPLS VPN Step by Step (1a) MPLS LDP L3VPN Configuration

Above is the topology, in which we have:
- 2 PE + 4 P routers, all full mesh connections (we will leverage this setup for later configurations)
- IGP: OSPF process 71
- iBGP: AS 65001, peering with loopback 71 (71.#.#.#/32, # is the router-id)
- MPLS LDP is enabled on all interfaces
mpls ip
!
mpls ldp
router-id 88.255.1.1
transport-address interface Loopback88
fec filter prefix-list fec-pfx-list
no shutdown
!
router bgp 65001
router-id 88.255.1.1
maximum-paths 4 ecmp 4
neighbor pe peer-group
neighbor pe remote-as 65001
neighbor pe update-source Loopback88
neighbor pe route-reflector-client
neighbor pe send-community standard extended
neighbor pe maximum-routes 12000
!
! RR configuration, peering to PE1/PE2
!
neighbor 88.255.11.11 peer-group pe
neighbor 88.255.22.22 peer-group pe
!
address-family vpn-ipv4
! active vpn-ipv4 AF
neighbor pe activate
!
router ospf 88
router-id 88.255.1.1
passive-interface Loopback88
network 88.0.0.0/8 area 0.0.0.0
max-lsa 12000
PE router configuration:
mpls ip
!
mpls ldp
router bgp 65001
router-id 88.255.11.11
neighbor vpnv4-rr peer-group
neighbor vpnv4-rr remote-as 65001
neighbor vpnv4-rr update-source Loopback88
neighbor vpnv4-rr send-community standard extended
neighbor vpnv4-rr maximum-routes 12000
neighbor 88.255.1.1 peer-group vpnv4-rr
neighbor 88.255.2.2 peer-group vpnv4-rr
!
address-family vpn-ipv4
neighbor vpnv4-rr activate
neighbor default encapsulation mpls next-hop-self source-interface Loopback88
For the full router configuration, please go to the directory.
mpls ip
!
mpls ldp
router bgp 65001
router-id 88.255.11.11
neighbor vpnv4-rr peer-group
neighbor vpnv4-rr remote-as 65001
neighbor vpnv4-rr update-source Loopback88
neighbor vpnv4-rr send-community standard extended
neighbor vpnv4-rr maximum-routes 12000
neighbor 88.255.1.1 peer-group vpnv4-rr
neighbor 88.255.2.2 peer-group vpnv4-rr
!
address-family vpn-ipv4
neighbor vpnv4-rr activate
neighbor default encapsulation mpls next-hop-self source-interface Loopback88
For the full router configuration, please go to the directory.
2/02/2019
Arista MPLS VPN Step by Step (0)
In this step-by-step series, I will cover the Arista MPLS VPN solution. All of the configuration is based on the following topology. For the technical details, please refer to "Arista MPLS IPv4/v6 MPLS VPN Configuration Guide"
And some other references:
- Arista Software TOI - click TOI
- Arista MPLS Manual
- Arista EVPN Manual
OSPF Fast Convergence
This blog is the best article on this subject, maybe a little old but very informational.
Some takeaway notes:
Some takeaway notes:
- IGP has micro loop during convergence, because FIB update from near to far,EIGRP is an exception - explicit route due to diffusing computation.
- Convergence = Detection + Propogation + SpfComp + FibUpdTime
- 1. Detection:
- Don't use IGP KA, instead use hw failure detection, like p2p Ethernet.
- No debounce timers. SONET is 例外,有50 ms protection, can set 50ms+
- If P2P, OSPF does not need DR elections to save time. And no type2 LSA, reduces LSDB size
- If no hw failure detection, have to use fast protocol hello, like ospf fast timer - "ip ospf dead-interval minimal hello-multiplier 5" = 5 hello/sec
- Can do 1-sec failure detection, but cpu load is high
- Use BFD, workload is off to LC.
- 2. Propagation:
- Out: ISIS/OPSF, using LSA flood. IGP has throttling mechanism, like Cisco has exceptional backoff algorithm. so set initial as low as 5-10 ms. don't use 0, because multiple link down event better in ONE LSA.
- In: should be ok
- Processing:
- ISIS has fast-flood, flood before SPF processing.
- Timer pacing flood, the interval between LSA.
- OutIfQueue: Need Qos to reserve b/w for CP pkts
- Packet propagation: small not serious
- 3. SPF Computation
- Used to be a big impact before, but not now thanks for fast hw and some algorithm improvement like iSPF (incremental)
- 4. Fib update
- This stage contributes the MOST to convergence time
- 2 ways to speed up: 1) less prefixes; 2) sequence important first
- Edge routers don't need core transit prefixes. So,
- (1) use ip unumbered so to put loopback0;
- (2) ospf 2 LSA for p2p links, type-1 router; and type-3 network. "ip ospf prefix-suppression", only process type 1, no type-3
- (3) ISIS has priority driven installation
1/31/2019
Arista EOS Hashing Features
Here are some Arista EOS hashing features:
- 4.15.2F, hashing on ttl and hop-limit
- Trident2-based systems: 7300X, 7050X, 7250QX. All have 2 hash engines, 1 for port-channel, 1 for ECMP
- CLI:
- port-channel load-balance trident fields ip ttl
- port-channel load-balance trident fields ipv6 hop-limit
- show port-channel load-balance trident fields
- IP TTL hashing is ON
- Unlike other "port-ch load-balance trident fields" commands, this one applies both to both LAG and ECMP hash engines.
- Be care of unexpected behavior, for example,
- Internet traffic goes to proxy or load-balance servers.
- But somehow traffic going a different path results into different TTL values, like VRRP or MLAG.
- So if hashing based on ttl, the same traffic stream could end up at different destinations.
- Hashing egress interface:
- 4.17.0
- show load-balance destination ingress-interface Ethernet1/1 src-ipv4-address 10.0.0.93 dst-ipv4-address 17.0.0.11 ip-protocol 17 src-l4-port 11001 dst-l4-port 19872
- Output Interface: Port-Channel102
- Disable Ingress interface in hashing
- Arad/Jericho based systems: 7500E/R, 7280E/R
- CLI:
- no ip load-sharing sand fields ingress-interface
- To avoid polarization, use different preset in different layers:
- ip load-sharing sand has preset <0-2>
- 好像是,不同interface会有不同random#
- 这个for ECMP
- LAG hashing on ingress interface
- 和上面差不多,区别是config放在LB profile里面
- for LAG
- Global LAG hashing profile
- Arad/Jericho, Sand-based systems
- CLI:
- load-balance policies
- load-balance sand profile myProfile
- hash seed 50
- Dynamic and Symmetric LAG Hashing
- From 4-15-0
- Arad/Jericho, Sand-based systems
- Bidirectional flows go thru same member port of LAG
- 做法不难,就是异或源和目标地址,再求哈希,当然LB就是不好
- CLI:
- load-balance policies
- load-balance sand profile sym
- fields symmetric-hash
1/12/2019
Arista L3 Leaf/Spine Step by Step (3a) - Vxlan Routing, Modes
The following couple of posts will cover the VxLAN routing.
What's and why VxLAN Routing? With VxLAN bridging, the hosts in the same VLAN 10 can talk to each other. But we need VxLAN routing to have VLAN 10 address to reach the hosts in VLAN 11.
How to enable VxLAN Routing? Creating a SVI interface on a VLAN which is associated to a VNI

We can achieve this in the following 5 modes:
What's and why VxLAN Routing? With VxLAN bridging, the hosts in the same VLAN 10 can talk to each other. But we need VxLAN routing to have VLAN 10 address to reach the hosts in VLAN 11.
How to enable VxLAN Routing? Creating a SVI interface on a VLAN which is associated to a VNI

We can achieve this in the following 5 modes:
- Router on a stick - Gateway only on dedicated routers
- Direct Routing - Gateway on all VTEPs
- Indirect Routing - Gateway only on few dedicated VTEPs
- Naked Routing - Regular routing w/o VxLAN encap
- * Hybrid - Combination of direct/indirect and naked routing based on case
1/11/2019
Unbalanced Hashing vs DLB vs RECMP
Broadcom introduced Dynamic Load Balancing in Trident 3 product.
https://www.youtube.com/watch? v=1y25OTyFFrs
里面提到了Unblanced Hashing的3个Reasons:
1. Elephant Flow
2. Link Failures, Why?
3. Hash Polarization
可能based在MIT一个flowlet paper
一个相关的Arista EOS feature - Resilient ECMP
https://www.youtube.com/watch?
里面提到了Unblanced Hashing的3个Reasons:
1. Elephant Flow
2. Link Failures, Why?
3. Hash Polarization
可能based在MIT一个flowlet paper
- 这个原理不难,多根线路,计算Maximum和Minimum Delay,之差就是一个timeout value;
- 如果后续packet timeout之后到,就不必hash到固定的线路,而是严格Load Balancing.
一个相关的Arista EOS feature - Resilient ECMP
- 说起来很简单,就是一根线路断了,不要re-hashing区别的sessions,这样会teardown TCP. 而是just re-hash 故障线路上的session
- CLI: ip hardware fib ecmp resilience 10.14.2.0/24 capacity 6 redundancy 4
- 解释:
- network 10.14.2.0/24有6个NextHop
- 但是建立一个24 Entries的ECMP
- 如果其中一个NH断了,就把表中这个NH用其他NH替换,其他ECMP NH没有变化
- Redundancy = 4,应该就是一根断了,有4个来LB
TCP Notes (2)
1. 如何计算 a TCP segment length?
A: ip.len - ip.hdr_len - tcp.hdr_len
2. TCP Flags
* 最常见的是SYN, ACK, FIN
* URG - 比方说,sender希望receiver stop,无论queue里面还有多少data.
* PSH - 和URG很像,必须high priority的处理
* RST - 本意是,如果port没有open,host就返回一个RST,容易被hacker利用
* SYN - 只有3-way handshake时有
* FIN - FINISH,4-way close? ACK/FIN-ACK-ACK/FIN-ACK
3. TCP window size
* len = 2 Bytes, max = 64K, in Byte
* 还有一个window scale,就是window size左移多少位
* SYN packet里面没有scaled
* 两边可以有不同的scale#, 不需要negotiated
这个是SYN Packet

后面的Data Packet

4. TCP checksum
看下面的图,前面加上IP Header Info, srcAdr, dstArd, reserved, proto#, tcpLen(computed), + tcpHdr, tcpData. 可以cover ip header integrity

5. TCP Timestamps
10-Byte TCP option, type(1B=8); len(=10), TS(len=4), TSEcho(len=4),例如:
1st packet, TS = 2216538

2nd packet, TSEcho = 2216538. 这样就可以计算RTT了

6. TCP MSS vs IP MTU
这个MSS有点confusing,因为Segment一般是指Header + Data,但是这个TCP MSS说的是Max Data Leng. 这个图很清楚,
* Ethernet Frame size = 1518,
* IP MTU = 1500 = 1518 - 18,
* TCP MSS = 1460 = 1500 - 20 (ip.hdr_len) - 20 (tcp.hdr_len)

Reference:
1. firewall.cx
2. tcpipguide.com
A: ip.len - ip.hdr_len - tcp.hdr_len
2. TCP Flags
* 最常见的是SYN, ACK, FIN
* URG - 比方说,sender希望receiver stop,无论queue里面还有多少data.
* PSH - 和URG很像,必须high priority的处理
* RST - 本意是,如果port没有open,host就返回一个RST,容易被hacker利用
* SYN - 只有3-way handshake时有
* FIN - FINISH,4-way close? ACK/FIN-ACK-ACK/FIN-ACK
3. TCP window size
* len = 2 Bytes, max = 64K, in Byte
* 还有一个window scale,就是window size左移多少位
* SYN packet里面没有scaled
* 两边可以有不同的scale#, 不需要negotiated
这个是SYN Packet

后面的Data Packet

4. TCP checksum
看下面的图,前面加上IP Header Info, srcAdr, dstArd, reserved, proto#, tcpLen(computed), + tcpHdr, tcpData. 可以cover ip header integrity

5. TCP Timestamps
10-Byte TCP option, type(1B=8); len(=10), TS(len=4), TSEcho(len=4),例如:
1st packet, TS = 2216538

2nd packet, TSEcho = 2216538. 这样就可以计算RTT了

6. TCP MSS vs IP MTU
这个MSS有点confusing,因为Segment一般是指Header + Data,但是这个TCP MSS说的是Max Data Leng. 这个图很清楚,
* Ethernet Frame size = 1518,
* IP MTU = 1500 = 1518 - 18,
* TCP MSS = 1460 = 1500 - 20 (ip.hdr_len) - 20 (tcp.hdr_len)

Reference:
1. firewall.cx
2. tcpipguide.com
Subscribe to:
Posts (Atom)


