With the following policy, all static routes are advertised via BGP to my neighbor:
root@Nitrogen# show policy-options
policy-statement bgp-export-policy {
term export-statics {
from protocol static;
then accept;
}
}
root@Nitrogen# show routing-instances myinstance
instance-type virtual-router;
interface ...
routing-options {
static {
route 0.0.0.0/0 next-hop ...; # I don't want to send this route
route x.x.x.x next-hop st0.1;
route x.x.x.x next-hop st0.1;
route x.x.x.x next-hop st0.1;
...
}
autonomous-system XXX;
}
protocols {
bgp {
group mygroup {
type external;
export bgp-export-policy;
neighbor XXX {
peer-as XXX;
}
}
}
}
How could I advertise all static routes except the default 0.0.0.0/0 one? Or, if this is easier, how could I advertise all routes that use st0.1
as the next hop?
Thank you in advance for your help.