So, after working with JTAC yesterday, "I", as in I really didn't need JTAC since I figured out the issue on my own.. realized that my firewall filter was a bit redundant and was lacking a "permit any" statement.
OSPF adjacency was breaking because the firewall filter was taking the "else" traffic (term DEFAULT) and sending it to routing-instance PATH-2, which didn't help either way since it was sending traffic right back to SW-2, something a "then accept" statement would have done easily
So, to repair the issue..
New SW-2 & RTR-2 corrected configlets:
delete routing-instances PATH-2
delete firewall family inet filter FBF-TEST term DEFAULT
set firewall family inet filter FBF-TEST term PERMIT-ANY then accept
New config snips for SW-2:
routing-options {
nonstop-routing;
interface-routes {
rib-group inet STAGING-RIB;
}
static {
route 10.100.190.0/24 next-hop 10.100.100.2;
route 10.100.191.0/24 next-hop 10.100.100.2;
}
rib-groups {
STAGING-RIB {
import-rib [ inet.0 PATH-1.inet.0 ];
}
}
router-id 10.100.254.1;
}
firewall {
family inet {
filter FBF-TEST {
term TERM-1 {
from {
source-address {
10.100.190.0/24;
10.100.191.0/24;
}
}
then {
routing-instance PATH-1;
}
}
term PERMIT-ANY {
then accept;
}
}
}
}
routing-instances {
PATH-1 {
instance-type forwarding;
routing-options {
static {
route 10.100.30.0/24 {
next-hop 10.100.254.2;
qualified-next-hop 10.10.10.1 {
preference 100;
}
}
}
}
}
}
New config snips for RTR-2:
routing-options {
interface-routes {
rib-group inet STAGING-RIB;
}
rib-groups {
STAGING-RIB {
import-rib [ inet.0 PATH-1.inet.0 ];
}
}
router-id 200.200.200.2;
autonomous-system 1;
}
firewall {
family inet {
filter FBF-TEST {
term TERM-1 {
from {
source-address {
10.100.190.0/24;
10.100.191.0/24;
}
}
then {
routing-instance PATH-1;
}
}
term PERMIT-ANY {
then accept;
}
}
}
}
routing-instances {
PATH-1 {
instance-type forwarding;
routing-options {
static {
route 10.100.30.0/24 {
next-hop 200.200.200.1;
qualified-next-hop 10.100.254.1 {
preference 100;
}
}
}
}
}
}
That is because Cisco determines the AD used by its devices, and EIGRP is a Cisco protocol, so Cisco decided to make EIGRP have a lower AD than other protocols.
Each vendor determines the relative reliability of protocols for its equipment; there is no outside standard for this. Some vendors may not even have an AD equivalent.
According to Cisco default distance value table,
| Route Source | Default Distance Values |
|--------------------- |------------------------- |
| Connected interface | 0 |
| Static route | 1 |
| EIGRP summary route | 5 |
| eBGP | 20 |
| Internal EIGRP** | 90 |
| IGRP | 100 |
| OSPF** | 110 |
| ............. | ... |
Best Answer
You can use the command
set protocols bgp group <group name> preference <value>
or you can also use a routing policy to change preference for specific routes within BGP.
However as commented by @TeunVink, there's only limited cases where you would tweak administrative distances. There's generally better options, or that would mean your network design is somewhat flawed.
Also you must be aware of how Juniper handle external BGP vs internal BGP and OSPF.
From the page Example: Configuring the Preference Value for BGP Routes