SR-MPLS with OSPFv2

I started my part of the Segment Routing workshop @ ITNOG10 exploring SR-MPLS with IS-IS (simple SR-MPLS, dual-stack SR-MPLS, SR-MPLS over unnumbered IPv4 interfaces). Next step: let’s change the routing protocol to OSPF while using the same network topology:

Lab Topology

I had to change two lines in the initial lab topology – I had to tell netlab to use OSPF instead of IS-IS, and to use OSPF as the SR-MPLS routing protocol (by default, the netlab SR-MPLS module expects to use IS-IS). The full lab topology file is here.

Changes to netlab topology file needed to use OSPFv2 with SR-MPLS
module: [ ospf, sr ]
sr.protocol: ospfv2

Exploring SR-MPLS Using OSPFv2

After setting up netlab, changing into the 1-intro/5-ospf directory, and executing netlab up, you’ll have an SR-MPLS network using OSPFv2 to transport SR-MPLS opaque LSAs. Let’s do the same checks we did for IS-IS.

How do routers advertise SR-MPLS information in OSPFv2? The lab topology is simple, so we’d expect to see only three router LSAs in the OSPFv2 topology database. However, it contains numerous area-local (type 10) opaque LSAs:

OSPF LSAs observed on PE1 running on Arista EOS
pe1#show ip ospf database             OSPF Router with ID(10.0.0.1) (Instance ID 1) (VRF default)                   Router Link States (Area 0.0.0.0) Link ID         ADV Router      Age         Seq#         Checksum Link count10.0.0.2        10.0.0.2        13          0x80000006   0xe69b   410.0.0.3        10.0.0.3        14          0x80000005   0x8022   310.0.0.1        10.0.0.1        2           0x80000005   0x9b15   3                  Opaque Type 10 Link States (Area 0.0.0.0) Link ID         ADV Router      Age         Seq#         Checksum7.0.0.0         10.0.0.1        13          0x80000001   0x34158.0.0.0         10.0.0.3        14          0x80000001   0x7d888.0.0.1         10.0.0.2        3           0x80000001   0x2edc8.0.0.0         10.0.0.2        13          0x80000001   0x7f878.0.0.0         10.0.0.1        2           0x80000001   0x41ca4.0.0.0         10.0.0.2        14          0x80000001   0x1d2e4.0.0.0         10.0.0.3        15          0x80000001   0x17334.0.0.0         10.0.0.1        13          0x80000001   0x23297.0.0.1         10.0.0.2        14          0x80000001   0x4cf87.0.0.0         10.0.0.3        15          0x80000001   0x78ca

What is in those LSAs? Let’s inspect the ones originated by PE1:

SR-MPLS opaque LSAs generated by PE1 running Arista EOS
pe1#show ip ospf database opaque-area adv-router 10.0.0.1             OSPF Router with ID(10.0.0.1) (Instance ID 1) (VRF default)                   Opaque Type 10 Link States (Area 0.0.0.0)   LS Age: 762  Options: (DC O)  LS Type: Opaque Type 10 Links  Link State ID: 7.0.0.0  Advertising Router: 10.0.0.1  LS Seq Number: 0x80000001  Checksum: 0x3415  Length: 44  Segment Routing Extended Prefix TLV    Route Type: Intra-Area, Prefix: 10.0.0.1/32, AF: IPv4 unicast    Flags:  [N]    Prefix-SID Sub-TLV      Algorithm: Shortest Path First      Flags:  []      MT-ID: 0, SID: 1   LS Age: 751  Options: (DC O)  LS Type: Opaque Type 10 Links  Link State ID: 8.0.0.0  Advertising Router: 10.0.0.1  LS Seq Number: 0x80000001  Checksum: 0x41ca  Length: 48  Segment Routing Extended Link TLV    Link Type: 1 (Point-to-point)    Reserved: 0    Link Id: 10.0.0.2    Link Data: 10.1.0.2    Adj-SID Sub-TLV      Flags: [V, L]      Reserved: 0      Multi-Topology ID: 0      SID: 100000   LS Age: 762  Options: (DC O)  LS Type: Opaque Type 10 Links  Link State ID: 4.0.0.0  Advertising Router: 10.0.0.1  LS Seq Number: 0x80000001  Checksum: 0x2329  Length: 44  Segment Routing Router Information TLV    Supported Algorithm: Shortest Path First    Label Range      SRGB Base: 900000, Size: 65536

Compared to the concise IS-IS SR-MPLS TLVs, the OSPFv2 data structures seem like a bloatware-generating exercise:

  • Each bit of information has its own opaque LSA
  • There’s an LSA describing the SR global range, another one mapping the loopback prefix into node SID, and a separate LSA for every adjacency SID.

Regardless of the encoding quirks, the routers have enough information to figure out the SR global blocks and prefix segments of all nodes:

OSPFv2 SR-MPLS global blocks displayed on PE1 running Arista EOS
pe1#show ip ospf segment-routing global-blocksOSPF Instance ID: 1SR supported Data-plane: MPLS                   SR Router ID: 10.0.0.1Number of OSPF segment routing capable nodes excluding self: 2   Router ID         Base     Size--------------- ------------ -----    10.0.0.1       900000    65536    10.0.0.2       900000    65536    10.0.0.3       900000    65536
OSPFv2 SR-MPLS prefix segments displayed on PE1 running Arista EOS
pe1#show ip ospf segment-routing prefix-segmentsOSPF Instance ID: 1SR supported Data-plane: MPLS                   SR Router ID: 10.0.0.1Node: 3      Proxy-Node: 0      Prefix: 0       Total Segments: 3Flag Descriptions: NP: No-PHP, M: Mapping Server, E: Explicit-NULL,                   V: Value, L: LocalSegment status codes: * - Self originated Prefix  Prefix      SID Type Flags                Router ID Protection- ----------- --- ---- -------------------- --------- -----------* 10.0.0.1/32   1 Node NP:0 M:0 E:0 V:0 L:0 10.0.0.1  unprotected  10.0.0.2/32   2 Node NP:0 M:0 E:0 V:0 L:0 10.0.0.2  unprotected  10.0.0.3/32   3 Node NP:0 M:0 E:0 V:0 L:0 10.0.0.3  unprotected

Not surprisingly, the MPLS forwarding table is identical to the IS-IS SR-MPLS example:

MPLS forwarding table on PE2 running Arista EOS
pe2#show mpls route... 100000  A[1]                via M, 10.0.0.2, pop                    EgressACL: apply                    directly connected, Ethernet1                    ca:f0:00:02:00:01, vlan 1006 900002  A[1]                via M, 10.0.0.2, pop                    EgressACL: apply                    directly connected, Ethernet1                    ca:f0:00:02:00:01, vlan 1006 900003  A[1]                via M, 10.0.0.2, swap 900003                    EgressACL: apply                    directly connected, Ethernet1                    ca:f0:00:02:00:01, vlan 1006

Try It Out

The workshop GitHub repository includes the installation guidelines; you might want to read them first. After that, you can:

Add comment
Sidebar