Description

Starting in Junos OS Release 17.4R1, a BGP speaker supports traffic steering based on a segment routing policy. The controller can specify a segment routing policy consisting of multiple paths to steer labeled or IP traffic. This feature enables BGP to support a segment routing policy for traffic engineering at ingress routers but the route may be hidden. 

Symptoms

Example topology:

(PE1 Ingress) <<<<<>>>>> (Segment Routing Core) <<<<>>>> (PE2 Egress)
PE2 is advertising 10.5.0.0/24 network  to ingress router PE1 with the color color:1:50:

ISIS config is the same for both PE1 and PE2:

root@PE1# show protocols isis
backup-spf-options {
    use-post-convergence-lfa maximum-labels 5;
    use-source-packet-routing;
}
source-packet-routing {
    srgb start-label 16000 index-range 8000;
    node-segment ipv4-index 1;
}

interface ge-0/0/2.40 {
    point-to-point;
    level 1 disable;
    level 2 {
        post-convergence-lfa;
    }
}

interface lo0.0 {
    level 1 disable;
    level 2 metric 10;
}

BGP config of PE2

root@PE2# show protocols bgp
group P5 {
    type internal;
    family inet {
        segment-routing-te;
        unicast {
            extended-nexthop-color;
        }
    }
    export ORANGE-ROUTES;
    neighbor 172.16.0.1;
}
local-address 172.16.0.5

root@PE2# show policy-options
policy-statement Export-to-BGP {
    term 1 {
        from {
            protocol direct;
            route-filter 10.0.0.0/8 orlonger accept;
        }
    }
}

policy-statement ORANGE-ROUTES {
    term 1 {
        from {
            protocol direct;
            route-filter 10.5.0.0/24 exact;
        }
        then {
            community add ORANGE;
            accept;
        }
    }
}
community ORANGE members color:1:50;

Advertisement of 10.5.0.0/24 from PE2 to PE1 with color:1:50:

root@PE2# run show route advertising-protocol bgp 172.16.0.1 extensive
inet.0: 25 destinations, 25 routes (25 active, 0 holddown, 0 hidden)
* 10.5.0.0/24 (1 entry, 1 announced)
 BGP group P5 type Internal
     Nexthop: Self
     Localpref: 100
     AS path: [100] I
     Communities: color:1:50

On PE1 the route is hidden due to unusable protocol next-hop:

root@PE1# run show route protocol bgp hidden extensive
inet.0: 27 destinations, 27 routes (26 active, 0 holddown, 1 hidden)
10.5.0.0/24 (1 entry, 0 announced)
         BGP    Preference: 170/-101
                Next hop type: Unusable, Next hop index: 0
                Address: 0xc0862d0
                Next-hop reference count: 3
                State: <Hidden Int Ext SRTEColorOnlyRslv>
                Local AS:   100 Peer AS:   100
                Age: 3d 18:16:35
                Validation State: unverified
                Task: BGP_100.172.16.0.5
                AS path: I
                Communities: color:1:50
                Accepted
                Localpref: 100
                Router ID: 172.16.0.5
                Indirect next hops: 2
                        Protocol next hop: 50<code>
                        Indirect next hop: 0x0 - INH Session ID: 0x0 Weight 0x1
                        Protocol next hop: 172.16.0.5-50<code>
                        Indirect next hop: 0x0 - INH Session ID: 0x0 Weight 0x4000

Solution

With extended-nexthop-color option configured, prefixes with color community are resolved using the inetcolor.0 or inet6color.0 table. Therefore, the protocol next hop must be resolved via this inetcolor.0 table. 

Configure a rib group in ISIS to import inetcolor.0 table to resolve protocol next-hop. 

root@PE1# show routing-options rib-groups
srte-v4 {
    import-rib [ inet.3 inetcolor.0 ];
}

[edit

[edit]
root@PE1# set protocols isis rib-group inet srte-v4

[edit]
root@PE1# commit
commit complete

After committing the above change the route is no longer hidden:

[edit]
root@PE1# run show route 10.5.0.0/24

inet.0: 27 destinations, 27 routes (27 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.5.0.0/24        *[BGP/170] 00:11:58, localpref 100, from 172.16.0.5
                      AS path: I, validation-state: unverified
                    >  to 10.10.10.21 via ge-0/0/2.40, Push 16005

[edit]
root@PE1# run show route 10.5.0.0/24 extensive

inet.0: 27 destinations, 27 routes (27 active, 0 holddown, 0 hidden)
10.5.0.0/24 (1 entry, 1 announced)
TSI:
KRT in-kernel 10.5.0.0/24 -> {composite(541)}
        *BGP    Preference: 170/-101
                Next hop type: Indirect, Next hop index: 0
                Address: 0xd3a63a0
                Next-hop reference count: 1
                Source: 172.16.0.5
                Next hop type: Router, Next hop index: 0
                Next hop: 10.10.10.21 via ge-0/0/2.40 weight 0x1
                Label operation: Push 16005
                Label TTL action: prop-ttl
                Load balance label: Label 16005: None;
                Label element ptr: 0xe262ac8
                Label parent element ptr: 0x0
                Label element references: 2
                Label element child references: 0
                Label element lsp id: 0
                Session Id: 0x0
                Protocol next hop: 50<code>
                Indirect next hop: 0x0 - INH Session ID: 0x0 Weight 0x1
                Protocol next hop: 172.16.0.5-50<code>
                Composite next hop: 0xb94ea50 541 INH Session ID: 0x0
                Indirect next hop: 0xc323584 1048574 INH Session ID: 0x0 Weight 0x4000
                State: <Active Int Ext SRTEColorOnlyRslv>
                Local AS:   100 Peer AS:   100
                Age: 11:59      Metric2: 40
                Validation State: unverified
                ORR Generation-ID: 0
                Task: BGP_100.172.16.0.5
                Announcement bits (1): 0-KRT
                AS path: I
                Communities: color:1:50
                Accepted
                Localpref: 100
                Router ID: 172.16.0.5
                Indirect next hops: 2
                        Protocol next hop: 50<c>
                        Indirect next hop: 0x0 - INH Session ID: 0x0 Weight 0x1
                        Protocol next hop: 172.16.0.5-50<c> Metric: 40
                        Composite next hop: 0xb94ea50 541 INH Session ID: 0x0
                        Indirect next hop: 0xc323584 1048574 INH Session ID: 0x0 Weight 0x4000
                        Indirect path forwarding next hops: 1
                                Next hop type: Router
                                Next hop: 10.10.10.21 via ge-0/0/2.40 weight 0x1
                                Session Id: 0x0
                                172.16.0.5-0

[edit]
root@PE1#