vMX
Highlighted
vMX

Segment routing on vMX for OSPF

2 weeks ago

Hi everyone,

I am looking for an example config to configure segment routing on vMX for OSPF.  there are alot of great books/blogs written but they are for ISIS , I did not have a luck thus far.

There is  great day one book " Segmenting routing with Junos" but it does not address OSPF config.

Found this link, followed it but it did not produce expected results:  No label is generated for Adjacency Segments

https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/node-segm...

 

Do see Opaque LSA but  it does not carry any label for directly connected adajancey :

 

jcluser@vMX1> show ospf database

OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *10.100.100.1 10.100.100.1 0x8000000a 115 0x22 0x345c 72
Router 10.100.100.2 10.100.100.2 0x80000009 1678 0x22 0x75e 72
Router 10.100.100.3 10.100.100.3 0x8000000a 1690 0x22 0x3614 72
Router 10.100.100.4 10.100.100.4 0x80000009 1683 0x22 0xc979 72
Network 10.100.12.2 10.100.100.2 0x80000001 1678 0x22 0xd669 32
Network 10.100.13.2 10.100.100.3 0x80000001 1691 0x22 0xcf6d 32
Network 10.100.14.2 10.100.100.4 0x80000001 1683 0x22 0xc871 32
Network 10.100.23.2 10.100.100.3 0x80000003 839 0x22 0x6bc4 32
Network 10.100.24.2 10.100.100.4 0x80000003 675 0x22 0x64c8 32
Network 10.100.34.2 10.100.100.4 0x80000003 1269 0x22 0x41e 32
OpaqArea*4.0.0.0 10.100.100.1 0x80000002 1130 0x22 0x9c1a 44
OpaqArea 4.0.0.0 10.100.100.2 0x80000002 596 0x22 0x5dc3 284
OpaqArea 4.0.0.0 10.100.100.3 0x80000002 122 0x22 0x57c8 284
OpaqArea 4.0.0.0 10.100.100.4 0x80000002 82 0x22 0x51cd 284
OpaqArea*7.0.0.1 10.100.100.1 0x80000001 1130 0x22 0xbb39 44

 

 

jcluser@vMX1> show ospf database advertising-router 10.100.100.1 extensive

OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *10.100.100.1 10.100.100.1 0x8000000d 215 0x22 0x246a 72
bits 0x0, link count 4
id 10.100.12.1, data 10.100.12.1, Type Transit (2)
Topology count: 0, Default metric: 1
id 10.100.14.2, data 10.100.14.1, Type Transit (2)
Topology count: 0, Default metric: 1
id 10.100.13.2, data 10.100.13.1, Type Transit (2)
Topology count: 0, Default metric: 1
id 10.100.100.1, data 255.255.255.255, Type Stub (3)
Topology count: 0, Default metric: 0
Topology default (ID 0)
Type: Transit, Node ID: 10.100.13.2
Metric: 1, Bidirectional
Type: Transit, Node ID: 10.100.14.2
Metric: 1, Bidirectional
Type: Transit, Node ID: 10.100.12.1
Metric: 1, Bidirectional
Gen timer 00:33:16
Aging timer 00:56:24
Installed 00:03:35 ago, expires in 00:56:25, sent 00:03:35 ago
Last changed 00:03:35 ago, Change count: 7, Ours
Network *10.100.12.1 10.100.100.1 0x80000001 215 0x22 0xea57 32
mask 255.255.255.0
attached router 10.100.100.1
attached router 10.100.100.2

Type: Transit, Node ID: 10.100.12.1
Metric: 1, Bidirectional
Gen timer 00:33:16
Aging timer 00:56:24
Installed 00:03:35 ago, expires in 00:56:25, sent 00:03:35 ago
Last changed 00:03:35 ago, Change count: 7, Ours
Network *10.100.12.1 10.100.100.1 0x80000001 215 0x22 0xea57 32
mask 255.255.255.0
attached router 10.100.100.1
attached router 10.100.100.2
Topology default (ID 0)
Type: Transit, Node ID: 10.100.100.2
Metric: 0, Bidirectional
Type: Transit, Node ID: 10.100.100.1
Metric: 0, Bidirectional
Gen timer 00:46:24
Aging timer 00:56:24
Installed 00:03:35 ago, expires in 00:56:25, sent 00:03:35 ago

OpaqArea*4.0.0.0 10.100.100.1 0x80000002 1587 0x22 0x9c1a 44
Area-opaque LSA
SR-Algorithm (8), length 1:
Algo (1), length 1:
0
SID/Label Range (9), length 12:
Range Size (1), length 3:
100
SID/Label (1), length 3:
Label (1), length 3:
16
Gen timer 00:07:00
Aging timer 00:33:33
Installed 00:26:27 ago, expires in 00:33:33, sent 00:26:27 ago
Last changed 00:26:27 ago, Change count: 2, Ours, TE Link ID: 0
OpaqArea*7.0.0.1 10.100.100.1 0x80000002 324 0x22 0xb93a 44

 

 

OpaqArea*7.0.0.1 10.100.100.1 0x80000002 324 0x22 0xb93a 44
Area-opaque LSA
Extended Prefix (1), length 20:
Route Type (1), length 1:
1
Prefix Length (2), length 1:
32
AF (3), length 1:
0
Flags (4), length 1:
0x40
Prefix (5), length 32:
10.100.100.1
Prefix Sid (2), length 8:
Flags (1), length 1:
0x00
MT ID (2), length 1:
0
Algorithm (3), length 1:
0
SID (4), length 4:
1
Gen timer 00:20:08
Aging timer 00:54:36
Installed 00:05:24 ago, expires in 00:54:36, sent 00:05:23 ago
Last changed 00:26:27 ago, Change count: 1, Ours, TE Link ID: 0

 

 

ADDITIONAL INFO:

vMX1 config:

set system host-name vMX1

set chassis network-services enhanced-ip
set interfaces ge-0/0/0 unit 0 family inet address 10.100.12.1/24
set interfaces ge-0/0/1 unit 0 family inet address 10.100.14.1/24
set interfaces ge-0/0/2 unit 0 family inet address 10.100.13.1/24
set interfaces fxp0 unit 0 family inet address 100.123.1.0/16
set interfaces lo0 unit 0 family inet address 10.100.100.1/32
set routing-options static route 0.0.0.0/0 next-hop 100.123.0.1
set protocols mpls interface ge-0/0/0.0
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols ospf source-packet-routing node-segment ipv4-index 1
set protocols ospf source-packet-routing node-segment index-range 100
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0

jcluser@vMX

 

 

 

 

 

 

 

 

 

 

 

 

1 REPLY 1
Highlighted
vMX

Re: Segment routing on vMX for OSPF

a week ago

Hey zeeshannetwork,

 

Not sure if this is an issue with vMX or the JunOs you are running is below  16.2R1, this was asked before and the answer was just to enable the "node-segment" knob and this should be enough. 

 

https://forums.juniper.net/t5/Junos/OSPF-segment-routing-configuration-example/m-p/331556#M13171

 

Do you see anything in the show route mpls.0 table?

 

Regarding documentation, besides the link you shared, I could only find this other one: https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/source-pa...

 

the only extra piece of configuration here is 

 

srgb {
start-label start-label;
index-range index range;
 

If this solves your problem, please mark this post as "Accepted Solution" so we can help others too \Smiley Happy/

Regards,

Lil Dexx
JNCIE-ENT#863, 3X JNCIP-[SP-ENT-DC], 4X JNCIA [cloud-DevOps-Junos-Design], Champions Ingenius, SSYB