Description

I have a basic policy set up to redistribute static routes into BGP:


set policy-options policy-statement accept-connected term static from protocol static

set policy-options policy-statement accept-connected term static then community add no-export

set policy-options policy-statement accept-connected term static then accept

set policy-options policy-statement accept-connected term connected from protocol direct

set policy-options policy-statement accept-connected term connected then community add no-export

set policy-options policy-statement accept-connected term connected then accept

set policy-options policy-statement accept-connected term last then next policy


However, when I check the router I'm peered with I notice that any static routes I have with a qualified next hop are not being redistributed. Only the static routes with a regular next hop.

Symptoms

Example static routes:

set routing-options static route a.b.c.d/32 qualified-next-hop et-0/0/6.3034

set routing-options static route e.f.g.h/30 next-hop w.x.y.z


Peer router:

|

root@JTAC> show route a.b.c.d

<snip>

a.b.c.d1/27 *[IS-IS/18] 2d 14:27:08, metric 10

 > to 148.59.204.165 via et-0/0/26.10

 [OSPF/150] 12w0d 20:53:32, metric 20, tag 0

 > to 148.59.204.177 via et-0/0/28.76

 [BGP/170] 00:28:27, localpref 100, from 148.59.204.160

 AS path: I, validation-state: unverified

 > to 148.59.204.165 via et-0/0/26.10

|

root@JTAC> show route e.f.g.h

<snip>

168.245.198.124/30 *[BGP/170] 00:08:09, localpref 100, from 148.59.204.160

 AS path: I, validation-state: unverified

 > to 148.59.204.165 via et-0/0/26.10

Solution

The issue was with next-hop self & it got resolved post adding same to policy.


set policy-options policy-statement accept-connected term unumbered from protocol static

set policy-options policy-statement accept-connected term unumbered from route-filter a.b.c.d1/27 prefix-length-range /32-/32

set policy-options policy-statement accept-connected term unumbered from route-filter e.f.g.h1/26 prefix-length-range /32-/32

set policy-options policy-statement accept-connected term unumbered then next-hop self

set policy-options policy-statement accept-connected term unumbered then accept

Modification History

2025-08-01 : Article Created