If you are [used to] so familiar with CISCO .IlI..IlI. [Purchase "Used & Refurbished" Cisco]
And it always hard to find the online JunOS documentation sometimes 
Next-Hop Self command was one of them.
Anyway directly I’d like to tell that you WILL NEVER found this next-hop self command in BGP configuration of M Series.
It’s located under a term of a Policy Statement as a choice of action to be taken after “THEN”.
Here :
admin@JunOS# set term policy-options policy-statement LINK-1-EXPORT term PREFIX-1 then next-hop self
Here the policy-statement LINK-1-EXPORT looks like :
admin@JunOS# show
term PREFIX-1 {
from {
prefix-list PREFIX-NETWORK-A;
}
then {
local-preference 5000;
next-hop self;
accept;
}
}
term ISP-D {
from {
as-path ISP-D;
}
then {
local-preference 5000;
next-hop self;
accept;
}
}
term else {
then reject;
}
This kind of configuration is very useful two load balance routes/prefixes volume between two routers which connected by two non-equal link using iBGP.
Why ? it might happened these ways :
- You have announced separated prefixes over this two links [bgp session].
- You might have configured local-preference to have some prefixes to pass first link and others to the second link.
- The traffic would only fill one link ?.
- You have to announce each of prefix next-hops to the right link ?
It’s all waste of your time.
Just do as a Simple of above configuration, you will have your traffic fills both link follows the number of announced prefixes.
.
== BEFORE ===
admin@JunOS2> show route 192.168.250.0
192.168.250.0/23 *[BGP/170] 00:00:01, MED 0, localpref 2500, from 10.172.224.100
AS path: 4390 I
> to 10.172.224.113 via fe-1/1/2.0
[BGP/170] 03:06:29, MED 0, localpref 100
AS path: 4390 I
> to 10.172.224.113 via fe-1/1/2.0
admin@JunOS2> show route 192.168.250.0
192.168.250.0/23 *[BGP/170] 00:00:01, MED 0, localpref 2500, from 10.172.224.100
AS path: 4390 I
> to 10.172.224.113 via fe-1/1/2.0
[BGP/170] 03:06:29, MED 0, localpref 100
AS path: 4390 I
> to 10.172.224.113 via fe-1/1/2.0
admin@JunOS2> show route 192.168.250.0
192.168.250.0/23 *[BGP/170] 00:00:01, MED 0, localpref 2500, from 10.172.224.100
AS path: 4390 I
> to 10.172.224.113 via fe-1/1/2.0
[BGP/170] 03:06:29, MED 0, localpref 100
AS path: 4390 I
> to 10.172.224.113 via fe-1/1/2.0
== AFTER ===
admin@JunOS2> show route 192.168.250.0
192.168.250.0/23 *[BGP/170] 00:00:01, MED 0, localpref 2500, from 10.172.224.100
AS path: 4390 I
> to 10.172.224.109 via fe-1/1/1.0
[BGP/170] 03:06:29, MED 0, localpref 100
AS path: 4390 I
> to 10.172.224.113 via fe-1/1/2.0
a. rahman isnaini r.sutan