11/05/2019

Arista EOS Segment Routing (1) - Simplest Setup/Configuration

Here is the simplest SR setup, 
1) Only IPv4, only ipv4 node-segment; 
2) No IPv6, no ISIS multi-topology



From the above configuration, we can observe:
  • The basic ISIS-SR configuration is quite simple:
    • enable "segment-routing mpls" under router isis to attach SR info to ISIS LSA;
    • Specify the loopback0 interface with a globally unique node-segment index
    • ISIS-SR calculates the node-segment label = mpls label range base + index, so the routers in whole domain use the same label. This is an important characteristic of SR, for anycast. 

To verify the SR setup, you can use the following CLI commands:
  • show mpls label ranges
  • show isis segment-routing
  • show isis database PE2.00-00 detail !PE2.00-00 is id
  • show mpls lfib route
  • show mpls segment-routing bindings
  • show platform jericho mpls route
Detailed output of PE1:

PE1#show mpls label ranges
Start     End       Size      Usage
------------------------------------------------
0         15        16        reserved
16        99999     99984     static mpls
100000    116383    16384     ldp (dynamic)
116384    132767    16384     pseudowire (dynamic)
132768    149151    16384     bgp (dynamic)
149152    165535    16384     isis (dynamic)
165536    362143    196608    free (dynamic)
362144    899999    537856    unassigned
900000    965535    65536     isis-sr   <<< default ISIS-SR range
900000    965535    65536     bgp-sr
965536    1031071   65536     srlb
1031072   1036287   5216      unassigned
1036288   1048575   12288     l2evpn

PE1#show isis segment-routing

System ID: PE1 Instance: sr
SR supported Data-plane: MPLS SR Router ID: 1.1.1.1
SR Global Block( SRGB ): Base: 900000          Size: 65536
Adj-SID allocation mode: SR-adjacencies
Adj-SID allocation pool: Base: 149152     Size: 16384

All Prefix Segments have    : P:0 E:0 V:0 L:0
IS-IS Reachability Algorithm : SPF (0)

Number of IS-IS segment routing capable peers: 3

Self-Originated Segment Statistics:
Node-Segments       : 1
Prefix-Segments     : 0
Proxy-Node-Segments : 0
Adjacency Segments  : 1


PE1#show isis database PE2.00-00 detail


IS-IS Instance: sr VRF: default
  IS-IS Level 2 Link State Database
    LSPID                 Seq Num   Cksum  Life  IS Flags
    PE2.00-00             12        57553  1049  L2 <>
      NLPID: 0xCC(IPv4)
      Hostname: PE2
      Area address: 49.0001
      Interface address: 4.4.4.4
      Interface address: 10.3.4.4
      IS Neighbor          : P2.11               Metric: 10
        LAN-Adj-sid: 100000 flags: [ L V ] weight: 0 system ID: 0000.0000.3333
      Reachability         : 4.4.4.4/32 Metric: 10 Type: 1 Up
        SR Prefix-SID: 4 Flags: [ N ] Algorithm: 0
      Reachability         : 10.3.4.0/24 Metric: 10 Type: 1 Up
      Router Capabilities: Router Id: 4.4.4.4 Flags: [ ]
        SR Local Block:
          SRLB Base: 965536 Range: 65536
        Area leader priority: 250 algorithm: 0
        SR Capability: Flags: [ I ]
          SRGB Base: 900000 Range: 65536


PE1#show mpls lfib route


MPLS forwarding table (Label [metric] Vias) - 4 routes
MPLS next-hop resolution allow default route: False
Via Type Codes:
          M - MPLS via, P - Pseudowire via,
          I - IP lookup via, V - VLAN via,
          VA - EVPN VLAN aware via, ES - EVPN ethernet segment via,
          VF - EVPN VLAN flood via, AF - EVPN VLAN aware flood via,
          NG - Nexthop group via
Source Codes:
          G - gRIBI, S - Static MPLS route,
          B2 - BGP L2 EVPN, B3 - BGP L3 VPN,
          R - RSVP, LP - LDP pseudowire,
          L - LDP, M - MLDP,
          IP - IS-IS SR prefix segment, IA - IS-IS SR adjacency segment,
          IL - IS-IS SR segment to LDP, LI - LDP to IS-IS SR segment,
          BL - BGP LU, ST - SR TE policy,
          DE - Debug LFIB

 IA  149152   [1]
                via M, 10.1.2.2, pop
                 payload autoDecide, ttlMode uniform, apply egress-acl
                 interface Ethernet2/4
 IP  900002   [1], 2.2.2.2/32
                via M, 10.1.2.2, pop
                 payload autoDecide, ttlMode uniform, apply egress-acl
                 interface Ethernet2/4
 IP  900003   [1], 3.3.3.3/32
                via M, 10.1.2.2, forward
                 payload autoDecide, ttlMode uniform, apply egress-acl
                 interface Ethernet2/4
 IP  900004   [1], 4.4.4.4/32
                via M, 10.1.2.2, forward
                 payload autoDecide, ttlMode uniform, apply egress-acl
                 interface Ethernet2/4

PE1#show mpls segment-routing bindings
1.1.1.1/32
   Local binding:  Label: imp-null
   Remote binding: Peer ID: 0000.0000.2222, Label: 900001
2.2.2.2/32
   Local binding:  Label: 900002
   Remote binding: Peer ID: 0000.0000.2222, Label: imp-null
3.3.3.3/32
   Local binding:  Label: 900003
   Remote binding: Peer ID: 0000.0000.2222, Label: 900003
4.4.4.4/32
   Local binding:  Label: 900004
   Remote binding: Peer ID: 0000.0000.2222, Label: 900004

PE1#show platform jericho mpls route
D - ECMP is divergent across switching chips
 ---------------------------------------------------------------------------------------------
|                                       Mpls Table                                            |
|---------------------------------------------------------------------------------------------|
| label  | Destination  | VID |      MAC Code     | egress action | FEC  |olif | arp | remark |
|---------------------------------------------------------------------------------------------|
|149152  |Et2/4         |1027 | 44:4c:a8:97:8c:51 | PopE pipe auto|32773 |8200 |8    | 0      |

Egress Action Codes:
          M - Mpls Tunnel, G - GRE Tunnel, MoG - Mpls-over-GRE Tunnel
ECMP Codes:
          D - ECMP is divergent across switching chips
 -----------------------------------------------------------------------------------------------
|                                           Mpls Table
|-----------------------------------------------------------------------------------------------
|       |   Label  |                    |     |       |                   | ECMP|  FEC | Egress
| Label |  Action  |     Destination    | VID |Outlif |   MAC / CPU Code  |Index| Index| Action
|-----------------------------------------------------------------------------------------------
|900002 |Pop       | Et2/4              |1027 |8188   | 44:4c:a8:97:8c:51 |  -  |32771 |   -
|900003 |Forward   | Et2/4              |1027 |8188   | 44:4c:a8:97:8c:51 |  -  |32771 |   -
|900004 |Forward   | Et2/4              |1027 |8188   | 44:4c:a8:97:8c:51 |  -  |32771 |   -

No comments:

Post a Comment