Transferred over from Security (SRX) Forum:
Hi all,
Don't make me explain why, it'll take too long. Suffice to say this is my only remaining option - and I wish it wasn't.
I need to redistribute routes learned via BGP into OSPF, which is easy enough. The part I cannot get to work is that I need the route to be advertised to the OSPF neighbour with a next-hop value that is NOT the IP of advertising router. I can't find any documentation that says I shouldn't be able to do this, but I just cannot make it work.
So:
Router A: IP 1.1.1.1 -> talks to Router B via BGP
Router B: IP 1.1.1.2 -> talks to Router A via BGP and to another device (Device Z - 1.1.1.3) via OSPF (this device speaks OSPF but not BGP)
I need routes advertised from Router A to Router B via BGP to be installed on Device Z, via OSPF, but with a next-hop value equal to 1.1.1.1 instead of 1.1.1.2. On Router B, BGP routes are successfully exported into OSPF but when they get to the neighbour device (Device Z) the next hop is 1.1.1.2.
Config ======================
protocols {
ospf {
export imp-bgp-2-ospf;
area 0.0.0.0 {
interface vlan.1275;
}
}
}
policy-statement imp-bgp-2-ospf {
term 1 {
from {
route-filter 10.10.0.0/16 exact;
}
then {
next-hop 1.1.1.1;
accept;
}
}
term 2 {
from {
route-filter10.20.30.0/24 exact;
}
then {
next-hop 1.1.1.1;
accept;
}
}
term 10 {
then reject;
}
}
end config=============================
Any help appreciated.
In the customer's network this works, but they're using Cisco 2801 router and route-maps. I figured the same should be achievable using Juniper hardware.
Cheers,
Ben.