As far as I know the conditional advertising works with any protocol,not only bgp. Here is an example of advertising rip routes into ospf only when a route exist in inet.0 table:
mx5t# run show route protocol rip logical-system r1
inet.0: 30 destinations, 30 routes (30 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.16.0/29 *[RIP/100] 1d 00:38:19, metric 2, tag 0
> to 172.27.0.30 via ge-1/1/3.200
172.16.20.0/24 *[RIP/100] 1d 00:38:19, metric 2, tag 0
> to 172.27.0.30 via ge-1/1/3.200
172.16.21.0/24 *[RIP/100] 1d 00:38:19, metric 2, tag 0
> to 172.27.0.30 via ge-1/1/3.200
mx5t# show protocols ospf
export [ export-rip export-direct ];
area 0.0.0.0 {
interface all;
}
mx5t# show policy-options policy-statement export-rip
from {
protocol rip;
condition ospf-route;
}
then accept;
mx5t# show policy-options condition ospf-route
if-route-exists {
172.27.255.5/32;
table inet.0;
}
mx5t# run show ospf database logical-system r1 external | match 172
Extern *172.16.16.0 172.27.255.1 0x80000001 34 0x22 0xc35e 36
Extern *172.16.20.0 172.27.255.1 0x80000001 34 0x22 0xc155 36
Extern *172.16.21.0 172.27.255.1 0x80000001 34 0x22 0xb65f 36
mx5t# run show route logical-system r1 172.27.255.1
inet.0: 31 destinations, 31 routes (31 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.27.255.1/32 *[Direct/0] 1d 00:54:55
> via lo0.1
When 172.27.255.1 disappear from inet.0, the ospf stop advertising rip routes:
mx5t# run show route logical-system r1 172.27.255.5
[edit logical-systems r5]
mx5t# run show ospf database logical-system r1 external | match 172
[edit logical-systems r5]