12/03/2018

MAC 11:11:xx:.... is not valid MAC address

On IXIA if you configured MAC/Eth address to be 11:11:00:02:01:01, the switch doesn't take them.

Thanks Paul Lavelle for the why :-) 

The least significant bit of the first byte is known as the IG bit. An IG bit of 0 indicates that this is a unicast MAC address, an IG bit of 1 indicates a multicast or broadcast address. It is illegal to use a multicast source MAC address in ARP replies.

References:


I use a simple trick: If you are manually setting a MAC address on Ixia, make sure the first byte of the address is an even number :) 

12/02/2018

Arista EOS - customized CLI

https://www.arista.com/assets/data/pdf/Whitepapers/Arista_EOS_parser.pdf

Arista EOS CLI is implemented in Python, so you can customize the CLI yourself. Of course it is limited to simple output instead of complicated contents.  

Step 1: Modify the CLI script

bn303.17:40:17#bash

Arista Networks EOS shell

[admin@bn303 ~]$ cd /usr/lib/python2.7/site-packages/CliPlugin/
[admin@bn303 CliPlugin]$ vi RoutingBgpShowCli.py
[admin@bn303 CliPlugin]$ sudo vi RoutingBgpCli.py

Step 2: save the new CLI script and load up during boot

copy the modified to /mnt/flash
the /usr/lib is file system in memory, unsustainable after reboot. 
vi /mnt/flash/rc.eos, so copy the save script to the location

11/30/2018

Arista EOS, SSO support starts from 4.20.5F

On Sand platform, 7500R/E series. And 4.20.5F was released around Arp 2018. (bl)

We have 2 commands to check if system is sso-ready:
  • wait-for-warmup checks for any agent to be not ready
  • show redundancy stat is to ensure sso stage participating agents to be warm
And better to run these 2 commands on both sup:


bn302.10:49:50#wait-for-warmup
bn302.10:51:11#show redundancy states
  my state = ACTIVE
peer state = STANDBY HOT
      Unit = Primary
   Unit ID = 1

Redundancy Protocol (Operational) = Stateful Switchover
Redundancy Protocol (Configured) = Stateful Switchover
Communications = Up
switchover completion timeout = 120.0 seconds (default)
Not ready for switchover (Agents not ready in standby supervisor)
Agents not ready =
   Sand

  Last switchover time = 10:00:13 ago
Last switchover reason = Supervisor has control of the active supervisor lock
bn302.10:51:16#sess peer-supervisor wait-for-warmup

bn302.10:51:29#sess peer-supervisor show redu stat
  my state = STANDBY HOT
peer state = ACTIVE
      Unit = Secondary
   Unit ID = 2

Redundancy Protocol (Operational) = Stateful Switchover
Redundancy Protocol (Configured) = Stateful Switchover
Communications = Up
switchover completion timeout = 120.0 seconds (default)
Not ready for switchover (Agents not ready in standby supervisor)
Agents not ready =
   Sand

11/29/2018

Arista Linux Essential (2)

Useful Utilities
  • Date/time
    • date +%Y%m%d-%H%M%S
    • Epoch - Linux born time
  • Sort
    • du -s /var/* | sort -n
    • -n: numeric order
  • Cut
    • cut -d: -f:1,6 /etc/password
    • -c: cut columns
  • Diff:
    • Cli -p15 -c "show run" | diff -y -w -B --suppress-common-lines - /mnt/flash/startup-config
    • -B --ingore-blank-lines
    • -y --side-by-side
    • -w --ignore-all-space
  • regexp:
    • greedy vs lazy, ? at the end of pattern
  • grep = global reg exp print
    • -i: ignore case
    • -v: inverse, not-matching
    • -A: print # lines AFTER matching
    • -B: print # lines BEFORE matching
  • sed = powerful stream editor
    • remove quotes: sed -e 's/"//g'
    • reverse ip address:
      • echo "10.20.30.40" | sed -e 's/\([0-9]+\)\.\([0-9]+\)\.\([0-9]+\)\.\([0-9]+\)/\4.\3.\2.\1/'
      • reverse A-record to fwd record
  • awk
    • awk -F: '{print $1, $6}
    • alias shmc show int | awk '/^[A-Z]/ { intf=$1 } 
  • tar
    • tar czvf config.1.gz config.1

[admin@bn303 etc]$ Cli -p15 -c "show run" | diff -y -w -B --suppress-common-lines - /mnt/flash/startup-config
! Command: show running-config        | ! Startup-config last modified at  Wed Nov 28 17:01:44 2018 b
! device: bn303 (DCS-7512N, EOS-4.20.1F)       | ! device: bn303 (DCS-7512N, EOS-4.20.10M)

Arista Linux Essentials (1)

From the course - "Arista Linux Essentials"

Linux Flavors

  • Linux Distribution = Distro
    • Generally includes:
      • Kernel
      • Package manager
      • GNU tools and libraries
      • Documentation
      • GUI
  • Debian
    • All Ubuntu are Debian distro
  • Gentoo
    • For power users
    • ChromeOS is based on Gentoo
  • Android:
    • Uses a Linux Kernel
    • NO GNU tools and libraries, like glibc
  • SUSE
  • Fedora:
    • Red Hat, CentOS
    • Oracle's Unix OS
      • Not Linux anymore because changing kernel 
    • Arista EOS is Fedora Core
      • No change in kernel
      • ver 18 or 21 now
Bootup

  • Boot Loaders:
    • Same on all computers
    • Multi-stage
  • First: BIOS/POST
    • Stored in ROM or NVRAM
    • Initialize system hw
  • MBR (Master Boot Record, Boot Loader) 
    • Not OS-specific
    • Examples: Coreboot, LILO, GRUB
    • @arista switch, Aboot = a mini linux
    • Point to VBR
  • VBR (Volume Boot Record) .... OS Boot .... Kernel
  • OS Boot
    • dmesg display kernel message buffer
Arista Boot:
  • Power On:
    • BIOS
  • Active partition
    • Aboot -> init
    • init -> boot-config
    • ctrl - C to stop Aboot calls kexec
  • EOS Kernel:
    • Aboot calls kexec
EOS Boot Stages
  • EOS Stage 1:
    • /mnt/flash/persist
    • boot hooks - patch, bug fix here
    • not change kernel, change boot
  • Hw Init:
    • FRU initialize
    • Cell type config - module/fixed, supervisor
    • hw device tree
  • EOS Stage 2:
    • Kernel modules
    • ProcMgr
    • SysDB
    • Launcher
Init/runLevel:
  • scripts in /etc/init.d
  • init <runlevel>
Package Management:
  • wget - a web client to download files
    • in aboot
  • curl - more protocol support, http/ftp/imap/scp/....
    • not in aboot
  • Package Managers:
    • different distros use different manager
    • Debian/Ubuntu
      • uses dpkg
      • format is .deb
      • advanced tool apt, manage dependencies
      • apt-get, manage installation
    • Fedors (EOS) 
      • uses rpm
      • format is .rpm
      • yum manage dependencies
      • as Fedora 18, yum is replaced by dnf
  • sudo dnf install sysstat

Python Notes (3) - Beautiful Python Code by Raymond Hettinger

https://www.youtube.com/watch?v=OSGv2VnC0go

Faster and prettier code:

1. Looping backwards
for color in reversed(colors):
    print color

2. Looping over collection and indices
for i, color in enumerate(colors):
    print i, ":", color

3. Zip of 2 lists
for name, color in zip(names, colors):
    print name, ":", color

! zip has higher memory req, prone to cache miss;
! in python 3.x, using izip instead of zip

4. Sorted list
for color in sorted(colors):
for color in sorted(colors, reverse=True):

def compare_length(c1, c2):
    if len(c1) &lt; len(c2): return -1
    if len(c1) &gt; len(c2): return 1
    return 0

for color in sorted(colors, cmp=compare_length):
for color in sorted(colors, key=len):

Looping over a dict with keys and values:
for k,v in d.items():     # req. memory to store list
for k,v in d.iteritems(): # use iterator instead of mem

Counting with dict
d ={}
for color in colors:
    d[color] = d.get(color, 0) + 1

d = defaultdict(int)
for color in colors:
    d[color] += 1

Grouping with dictionaries:
# group the list by length
names = ['Raymond', 'Rachel', 'Matthew', 'Roger', 'Betty']

#old
d = {}
for name in names:
    key = len(name)
    if key not in d:
        d[key] = []
    d[key].append(name)

#1
d = {}
for name in names:
    key = len(name)
    d.setdefault(key, []).append(name)

#2
d = defaultdict(list)
for name in names:
    key = len(name)
    d[key].append(name)

Function calls with keyword arguments
twitter_search('@obama', False, 20, True)

twitter_search('@obama', retweets=False, numtweets=20, 
               popular=True)


Packing/Unpacking = simultaneous state updates
x, y, dx, dy = ( x + dx *t,
                 y + dy *t,
                 influence(m,x,y),
                 influence(m,x,y))

Concatenating strings
', '.join(names)

Updating sequences
names = ['Raymond', 'Rachel', 'Matthew', 'Roger', 'Betty']

del names[0]
names.pop(0)
names.insert(0, 'mark')

#==&gt;
names = deque(['Raymond', 'Rachel', 'Matthew', 'Roger', 'Betty'])

del names[0]
names.popleft()
names.appendleft('mark')

Python Notes (2)

1. Sort: 
  • sorted() vs list.sort()
    • Sorted() returns a new list vs list.sort() does in place. 
    • list.sort() only for list. But sorted() for all iterables. 
  • key function and (reverse=True)
  • Sorted by multiple elements, like by first item then 2nd. 
>>> p = [[1,2,3],[3,2,1],[2,4,6],[1,2,5],[1,3,7],[3,1,0],[1,7,2]]
>>> p.sort(key=lambda x:(x[0], x[2]))
>>> p
[[1, 7, 2], [1, 2, 3], [1, 2, 5], [1, 3, 7], [2, 4, 6], [3, 1, 0], [3, 2, 1]]
  • Sorted by reversed plus asc
>>> p = [[1,2,3],[3,2,1],[2,4,6],[1,2,5],[1,3,7],[13,1,0],[-1,7,2]]
>>> p.sort(key=lambda x:(-x[0], x[2]))
>>> p
[[13, 1, 0], [3, 2, 1], [2, 4, 6], [1, 2, 3], [1, 2, 5], [1, 3, 7], [-1, 7, 2]]


2. SET:

1) No duplicate
2) No order
3) Sets contain only hashable items, for __contain__ method
4) Sets have operator like "-"

_set = set([1,2,3,3]) # (1,2,3)


s1 = set([1,2,3,4])
s2 = set([2,3,5])

l1 = [1,2,3,4]
l2 = [2,3,5]
s1 - s2
set([1, 4])


l1 - l2
Error

3. Variable length arguments in function call

positional argument with unknown number of arguments
def __func__(*args):
    for count, item in enumerate(args):
        print '{0}. {1}'.format(count, thing)

named arguments
def __func__(**kwargs):
    for name, value in kwargs.items():
        print '{0} = {1}' % (name, value)

TCL:
proc __proc__ {first args} {}

4. How to re-import python module in interactive mode
>>> from myrange import *
>>> for i in myrange(1,3,1):
...     print i
...
1 <<<<< extra print out due to debug print
1
2

$ more myrange.py
class myrange:
    def __init__(self, start, end, step):
        self.start = start
        self.end = end
        self.step = step
        print self.step   <<<< need to remove this

Change the py file, and do 2 steps



>>> import myrange   <<< need to import module for reload()
>>> reload(myrange)
<module 'myrange' from 'myrange.py'>
>>> from myrange import *
>>> for i in myrange(1,3,1):
...     print i
...
1  <<<< corrected
2

5. Python class class/instance/internal variables

啥叫class/instance/internal variables? 
- classVar 是Object之间share,一个改,大家都改,也叫Static variable
- instanceVar,所以叫Self.instanceVar,就是object自己本地
- internal,就不说了

class Obj(object):
    classVar = [10,20,30]
    def __init__(self):
        self.instanceVar = [1,2,3]
        internalVar = [100,200,300]

o1 = Obj()
o2 = Obj()

o1.instanceVar.append(11)
o1.instanceVar.append(12)
o2.instanceVar.append(21)
o2.instanceVar.append(22)

print o1.instanceVar
print o2.instanceVar

o1.classVar.append(111)
o2.classVar.append(222)
print o1.classVar
print o2.classVar

Python Notes (1)

1. Python FAQ:
https://docs.python.org/2.7/faq/programming.html

2. Python module search path
https://docs.python.org/2.7/tutorial/modules.html#the-module-search-path

If you do an "import syslib", how does the python locate the library?


1. local directory <<<< surprised?!

2. PYTHONPATH

so if you have a locally mistaken syslib.py or syslib.pyc under the local directory, you gonna break this import. And if you see something wanky, print cmd.__file__ will be helpful (or cmd.__version__)


3. Python Set
https://docs.python.org/3/tutorial/datastructures.html#sets
  • {} and set() can be used to create set
  • But to create an empty one, must use set(), not {} which is to create a dictionary. 
  • set_ = {0}
4. 3 Ways to delete an element in a list
1) most efficient - del List[idx]
2) less efficient if need to have the element - List.pop(idx)
3) lest effificient - slice, List[:i] + List[i+1:]

5. Python reduce, filter
>>> l = [1,2,3,4]
>>> reduce( (lambda x,y: x*10+y), l)
1234
>>> reduce( (lambda x,y: x*100+y), l)
1020304
>>> l = range(1, 100, 5)
>>> l
[1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76, 81, 86, 91, 96]
>>> filter(lambda x:x%4, l)

[1, 6, 11, 21, 26, 31, 41, 46, 51, 61, 66, 71, 81, 86, 91]

6. Python Naming Convention

http://legacy.python.org/dev/peps/pep-0008/#code-lay-out
  • limit all lines to 79,docstring/comment to 72
class Rectangle(Blob):

    def __init__(self, width, height,
                 color='black', emphasis=None, highlight=0):
        if (width == 0 and height == 0 and
                color == 'red' and emphasis == 'strong' or
                highlight &gt; 100):
            raise ValueError("sorry, you lose")
        if width == 0 and height == 0 and (color == 'red' or
                                           emphasis is None):
            raise ValueError("I don't think so -- values are %s, %s" %
                             (width, height))
        Blob.__init__(self, width, height,
                      color, emphasis, highlight)

  • Module: short, 
    • all-lower-case name, like pystock.py
  • Class: CapWords, like 
    • StockHist, StockInfo, StockERHist
  • Function: 
    • lower_case_with_underscore
  • Method and instance: 
    • lower_case_with_underscore
  • Constants: 
    • ALL_CAPITALS_WITH_UNDERSCORE
  • Internal attribute: 
    • _single_leading_underscore
    • NOT imported. 
  • empty sequence = FALSE, so 
    • YES: if not seq:... 
    • NO: if len(seq)
  • Attributes: 
    • self.lower_case_with_underscore



11/16/2018

SR Policy Architecture

https://datatracker.ietf.org/doc/html/draft-filsfils-spring-segment-routing-policy-06.txt

SR Policy包括什么?
  1. ID of SR Policy = <headend, color, endpoint>
  2. 1个Policy可以有多个Candidate Path, 一个CP可以有多个SID-lists, 可以有weight for LB
  3. Protocol origin of CP 
    • 10: PCEP; 
    • 20: BGP SR; 
    • 30: Local, CLI/Yang...
  4. Originator of CP, 160b = 20B
    • = 4B AS# + 16B Addr (128b) 
    • 如果Addr是v4,就放在最后4B
  5. Discriminator of CP, default 0, 这个是啥?一个就是seq#,作为tie-breaker
  6. ID of CP = <protoOrig, originator, discrimator>
  7. pref of CP = 100
  8. Valid of CP, 就是SID是valid
  9. Active CP
    • higher origin id
    • lower originator ip
    • higher discriminator
  10. SR policy还可以有priority,就是有topology change, 先算那个
SR Policy 例子:
  • 1个policy, <headend, color, endpoint>
  • 2个CP,CP1 is active 因为preference 200
  • CP1有两个SID-List, 都installed in HW, 而且ECMP
验证 CP
  • An explicit CP with SID-list = 应该是指静态CP
    • 为空
    • Weight = 0
    • 1st SID不能resolve
    • non-1st SID of type 3~11 into MPLS Label or SRv6 SID? 什么意思
    • 挺多的,还有最后一个不是prefix SID
  • Dynamic CP
Binding SID
  • 非常关键的一个概念
  • = CP,SR的无缝衔接?
  • 可以代表任何的interface, tunnel. 
Steering:
  • 这个是很关键的概念
  • Headend可以steer traffic,以下方式:
    • local BSID
    • Per-dest, 需要BGP
    • Per-flow?
    • PBR
  • 如果SR Policy失效,就fall back to 普通的routing
  • SR Policy可以是Drop
BSID Steering
  • <B, L2, L3> 变成 <S1, S2, S3, L2, L3> 如果S1不是PHP
Per-Dest Steering:
  • 这个一个是最常见的
  • BGP routes <prefix, N, ext-color-C, VPN-Label-V>
  • Valid SR Policy - <endPt = N, color = C> of SID-list <S1, S2, S3> and BSID B
  • 如果都met,NH != N, 而是=SR policy P of BSID B. 
  • 收到prefix pkt, push <S1, S2, S3, V> label
  • 一个BGP update里面可以有多个color, 如果有对应的policy with colors, 最终只有一个FIB,因为higher color prefered

10/31/2018

sum dropped pkts in "show platform jericho counter drop"

bn302.12:51:12#show platform jericho counters drops | grep "Counts Match" | awk '{print $9}' | awk '{sum += $1} END {print sum}'
52508425

10/30/2018

EOS: collect data and save to flash

bash dmesg | gzip > /mnt/flash/dmesg-$HOSTNAME-$(date +%Y-%m-%d_%H-%M).gz

show tech-support | gzip > /mnt/flash/shtech-$HOSTNAME-$(date +%Y-%m-%d_%H-%M).gz

show log sys | cat > /mnt/flash/shlogsys-$HOSTNAME-$(date +%Y-%m-%d_%H%M).txt

show agent log | gzip > /mnt/flash/shagentlog-$HOSTNAME-$(date +%Y-%m-%d_%H-%M).gz

show agent qt | gzip > /mnt/flash/shagentqt-$HOSTNAME-$(date +%Y-%m-%d_%H-%M).gz


10/25/2018

Arista EOS: Change the default shape and bandwidth of CoPP class

The purpose of CoPP is to protect the CPU from unnecessary or malicious packets. Arista EOS has a default CoPP set with pre-defined bandwidth and shape.

R1#sh policy-map type control-plane copp-system-policy
Service-policy input: copp-system-policy
  Number of units programmed: 8
  Hardware programming status: Successful

  Class-map: copp-system-arp-inspect (match-any)
       shape : 250000 kbps
       bandwidth : 25000 kbps
<....>

Most of the class names are intuitive, some need a little explanation. 
  • l3destmiss - unicast routed packets but no ARP info, need ARP resolution. 
  • l3lpmoverflow - ip broadcast destined to router???
  • linklocal - multicast packets to 224.0.0.*
  • l3slowpath - header option
How to change:

bn302.15:27:12(config)#policy-map type control-plane copp-system-policy
bn302.15:27:29(config-pmap-control-plane-copp-system-policy)#class copp-system-l3destmiss
bn302.15:27:43(config-pmap-c-control-plane-copp-system-policy-copp-system-l3destmiss)#shape kbps 999999
bn302.15:27:49(config-pmap-c-control-plane-copp-system-policy-copp-system-l3destmiss)#bandwidth kbps 88888

Policy map changes are applied when existing configuration mode. Use 'abort' to ignore any changes. 

How to verify:

bn302.16:47:57#show policy-map interface control-plane copp-system-policy
....
  Class-map: copp-system-l3destmiss (match-any)
       shape : 999999 kbps
       bandwidth : 88888 kbps

bn302.15:29:48(config-cp)#sh platform jericho copp mapping | egrep 'Shape|destmiss'
                         Class name   SysPhyPort First Voq# Total Voqs Bandwidth(kbps) Shape(kbps)
             copp-system-l3destmiss           36       1680       0-40             250        2500

10/23/2018

Arista EOS Tunneling (3) - IPinIP

IP-in-IP format:
  • Size = 20B, just an ip header, 
  • Protocol# = 4
Digram and configuration:


Verification:

R4.cd681#sh ip decap-group
NOTE: "D" column indicates dynamic entries
D | Name         | Type           | Info               | Version | Address Type
--|--------------|----------------|--------------------|---------|-------------
  | ipinip       | IP-in-IP       | 100.20.255.4       | IPv4    |

R4.cd681#show platform trident l3 shadow tunnel encap raw
EGR IP Tunnel:
--------------------------------------------------------------------------------
maxEntries: 512, numEntries: 1
EGR_IP_TUNNEL Address: 0xd72817a4, magic:aeaeaeae, maxEntries: 512, numEntries: 1

EGR_IP_TUNNEL[2]:  0x01  | 0x1 0x0 0x0 0x100000 0x9053fc11 0x9053fc0d 0x1 0x0


R4.cd681#show platform trident l3 shadow tunnel encap
EGR IP Tunnel:
--------------------------------------------------------------------------------
Unit    Id       TnlType       EntType       TTL       DscpSel              SrcIp           DstIp
0        2             0          IPV4        64             1       100.20.255.4    100.20.255.3

R4.cd681#show nexthop-group
ipip
  Id         1
  Type       ipInIp
  Size       1
  TTL        64
  Source IP  100.20.255.4 (Loopback20)
  Entries (left most label is the top of the stack)
    0  100.20.255.3
         Via 100.20.34.3, Ethernet31  (100.20.255.3/32)
         00:1c:73:54:27:cb, Ethernet31

10/22/2018

Arista EOS Tunneling (2) - GRE

Supported and Release:
The GRE Tunneling in EOS is supported from 4.15.0F (Apr 2015)

Not like the interface tunnel configuration in Cisco OS's, Arista uses nexthop-group and decap-group as the encap and decap endpoints. (EOS also has tunnel interfaces, but it is performed by software and ONLY for control plane purpose).

GRE Header Info:
  • Protocol #: 47 (0x2F)
  • Between Outer IP Header and Payload packet:
    • GRE Flags (2B)
    • Protocol Type (2B) = 0x0800 (ipv4)
    • Key (4B) if enabled tunnel-key shown as below
Diagram and configuration:

Configuration details:
  • nexthop-group <tunnel_intf_name> type gre
    • on Arad platform: there is 4 encap - gre, ip-in-ip, mpls and mpls-over-gre
  • size 1:
    • # of ecmp path
  • tunnel-source intf <intf, loopback most of time>
    • Source ip of outer GRE/IP header
  • entry 0 tunnel-destination <ip>
    • Dest ip of GRE/IP header
    • match above size #, starting from 0
  • tunnel-key ingress-interface
    • if enabled, will add 4B of GRE key value after 4B GRE header(flag + protocol#). This key is calculated from ingress interface + vlan id. 
Show output:

R1.yo412#sh ip decap-group
NOTE: "D" column indicates dynamic entries
D | Name               | Type       | Info              | Version | Address Type
--|--------------------|------------|-------------------|---------|-------------
  | gre-tunnel-1       | GRE        | 100.1.255.1       |         |
R1.yo412#sh platform arad decap-group

        DecapIp         |   LIF
------------------------+-------
100.1.255.1             |      1

R1.yo412#show nexthop-group
gre-tunnel-1
  Id         2
  Type       gre  (key: ingress-interface)
  Size       1
  TTL        64
  Source IP  100.1.255.1 (Loopback1)
  Counters   shared
  Entries (left most label is the top of the stack)
    0  100.1.255.2
         Via 100.1.12.2, Ethernet7/36/1  (100.1.255.2/32)
         00:1c:73:44:58:d0, Ethernet7/36/1
R1.yo412#sh platform arad ip nexthop-group
gre-tunnel-1
Type: GRE (key: ingress-interface)
Ecmp Fec Id: -
 ---------------------------------------------------------------------------------------------------------
|Pos|  Tunnel DIP   |Tunnel SIP [idx]    |TTL[idx]| FEC |OLIF |Cmd |     Intf      |VID | MAC / CPU Code  |
 ---------------------------------------------------------------------------------------------------------
|0  |100.1.255.2    |100.1.255.1    [0  ]|64 [0  ]|1047 |6144 |GRE |Et7/36/1       |3983|00:1c:73:44:58:d0|


R1.yo412#sh platform arad ip route | egrep '222|VRF|ID'
|VRF|   Destination    |     |                    |     |       |                   | ECMP|  FEC | Tunnel
| ID|      Subnet      | Cmd |     Destination    | VID |Outlif |   MAC / CPU Code  |Index| Index|T Value
|0  |222.100.0.0/16    |ROUTE| Et5/1/1            |3984 |4094   | 00:1c:73:3b:ce:c9 |  -  |1046  |   -
|0  |222.200.0.0/16    |ROUTE| Et7/36/1           |3983 |  -    | 00:1c:73:44:58:d0 |  -  |1047  |G 100.1.255.2



Arista EOS Tunneling (1)

Arista EOS Tunneling is a little different from other vendors' implmentations
  • Encap and decap are separated, which are defined in nexthop-group and decap-group. 
    • On 1 router configure nexthop-group and on other router only has decap group. 
    • For example, you can have internet traffic to FW, which tunnels the packets to severs. And servers directly route the returning traffic to users. 
  • nexthop-group does NOT equal to tunnel interface. It is not an interface, actually it is encap endpoint. 
  • Starting from 4.21.1F, EOS support hw GRE tunnel interface. Only on Jericho platforms - 7020R, 7280R, 7500R. 
Tunneling vs platforms(chipset) and releases. 
  • Sand platform - Arad/Jericho/J+/Qurman
    • GRE encap + decap
    • IPinIP decap only
  • Strata platform - Trident 2/Thomahawk
    • IPinIP encap + decap
In this quick lab, we will configure the GRE and IPinIP tunnels in the following topology:
  • Use ONE router - RtrAB to simulate end hosts by dividing into VRFs.
  • 222.10.10.1 -- 222.10.20.1 over GRE tunnel
  • 222.20.10.1 -- 222.20.20.1 over IPinIP tunnel


10/15/2018

FB's back bone network - EBB

https://code.fb.com/networking-traffic/building-express-backbone-facebook-s-new-long-haul-network/

Why need EBB? Inter-DC traffic growth is much faster than internet egress traffic and WAN technology evolution.

What needed for the new EBB?
  • Incremental deployment of software features. 不是一步到位,而且可以roll back. 
  • NO RSVP-TE, because of inefficiency and complexity. 嗯,锤!
  • Use MPLS SR so network state lean. 这倒是真的,SR分离CP和Local segment management.
How
  • Use DC network ideas
    • Small routing table - on the order of K routes
    • 4 planes. 
  • 3 Steps:
    • IGP + full-mesh iBGP for packet forwarding
    • TE + controller
    • OPEN/R to replace IGP
  • Components:
    • 3 server-side:
      • SFlow - read
      • BGP route injector - write
      • Controller - think
    • 2 device-side:
      • Open/R = IGP
      • SR = forwarding
    • 还有clean fault domain splitting, 这是咋做的?
Software Design:
  • Hybrid approach: centralized controller + SR, best way
    • path computation is at central level with global view
    • network failure is handled at distributed level. 
  • Open/R
    • how to open/R on arista devices?
  • Traffic estimator:
    • SFlow, need src/dst pair
    • what is the sample rate? 1 of 1000? how accurate
  • LSP agent:
    • With thrift-based API (eapi on eos) to program hw
    • In future? need failure detection and fails over within hundreds of msec. 
Next step:
  • per-service model
  • scheduler for bulk transfer

10/10/2018

20+ sec traffic seen during Mlag peer reload

https://eos.arista.com/mlag-issu/

The reason of such long period loss is most likely caused by STP flap or the STP is not stable before system reload. Another symptom is the output of "show hardware counter drop". If you see high # of drop due to dropVoqInPortNotVlanMember, it is likely the STP issue. 

Use these 2 commands to verify STP status:


bn303.14:47:42(config)#show mlag issu warnings
Stp is not restartable. Topology changes will occur during the upgrade
process.

bn303.14:49:21(config)#show spanning-tree bridge det | more
Stp Detailed Status:
   Stp agent restartable         :        False
   MST-PVST interoperation       :     Disabled

One of the reasons of unstable STP is, this switch receives its own BPDU on one port. That happens if both mlag peers have 1 port connected to same switch then form a loop. Even the STP kicks in and put the port in "discarding" mode, but this bouncing back BPDU still causing the STP unstable. 

In this case, use command - "show spanning topology status" to find those looped interfaces. 

bn302.14:49:44(config)#show spanning-tree topology status | more
Topology: Cist
  Mapped Vlans: 1
  Ethernet12/32/1:      forwarding
  Ethernet14/32/1:      forwarding
  PeerEthernet12/32/1:  discarding <<<<<< check this peer port
  Port-Channel2000:     forwarding

bn303.15:32:02(config)#tcpdump ver interface et12/32/1
....
15:32:21.036169 28:99:3a:84:8d:68 > 01:80:c2:00:00:00, 802.3, length 105: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1s, Rapid STP, CIST Flags [Proposal, Learn, Forward, Agreement], length 102
port-role Designated, CIST root-id 2000.46:4c:a8:a5:11:40, CIST ext-pathcost 0
CIST regional-root-id 2000.46:4c:a8:a5:11:40, CIST port-id 8789,
message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
v3len 64, MCID Name , rev 0,
digest 64b4d42c08d6bff5b647fc0be11d4ebb, CIST int-root-pathcost 0,
CIST bridge-id 2000.46:4c:a8:a5:11:40, CIST remaining-hops 20