I think the issue is due to the forwarding filter since the first term is TO-COMCAST which matches on any source and directs the traffic to the COMCAST instances so the traffic will always be forwarded via the COMCAST routing-instance despite ATT having better metric..
filter OUTPUT-ISP {
term TO-COMCAST {
from {
source-address {
0.0.0.0/0;
}
}
then {
routing-instance COMCAST;
}
}
term TO-ATT {
from {
source-address {
0.0.0.0/0;
}
}
then {
routing-instance ATT;
}
}
}
}
Did a quick test in lab and was getting the same results
root@R1# show routing-instances
ATT {
instance-type forwarding;
routing-options {
static {
route 0.0.0.0/0 next-hop 172.30.0.2;
}
}
}
COMCAST {
instance-type forwarding;
routing-options {
static {
route 0.0.0.0/0 {
next-hop 172.30.0.6;
metric 10;
}
}
}
}
[edit firewall family inet filter FBF]
root@R1# show
term COMCAST {
from {
source-address {
0.0.0.0/0;
}
}
then {
routing-instance COMCAST;
}
}
term ATT {
from {
source-address {
0.0.0.0/0;
}
}
then {
routing-instance ATT;
}
}
root@R1# show interfaces ge-0/0/5.300
vlan-id 300;
family inet {
filter {
input FBF;
}
address 192.168.1.1/24;
}
root@CE# run traceroute 192.168.0.2 source 192.168.1.3 routing-instance CE
traceroute to 192.168.0.2 (192.168.0.2) from 192.168.1.3, 30 hops max, 40 byte packets
1 192.168.1.1 (192.168.1.1) 7.540 ms 3.277 ms 4.164 ms
2 172.30.0.6 (172.30.0.6) 11.686 ms 14.695 ms 8.026 ms <<---- COMCAST next-hop
3 172.30.0.21 (172.30.0.21) 10.847 ms 8.088 ms 7.622 ms
4 192.168.0.2 (192.168.0.2) 10.467 ms 12.881 ms 10.617 ms
making ATT term the first one changes the routing
[edit firewall family inet filter FBF]
root@R1# insert term ATT before term COMCAST
[edit firewall family inet filter FBF]
root@R1# commit
commit complete
root@CE# run traceroute 192.168.0.2 source 192.168.1.3 routing-instance CE
traceroute to 192.168.0.2 (192.168.0.2) from 192.168.1.3, 30 hops max, 40 byte packets
1 192.168.1.1 (192.168.1.1) 5.435 ms 3.750 ms 8.480 ms
2 172.30.0.2 (172.30.0.2) 7.569 ms 4.267 ms 7.572 ms <<---- ATT next-hop
3 172.30.0.14 (172.30.0.14) 14.135 ms 8.877 ms 5.959 ms
4 192.168.0.2 (192.168.0.2) 10.060 ms 12.412 ms 8.191 ms
I wonder if you really need two forwarding instances & ip-monitoring policies in this case? Wouldn't it be enough to have one ip-monitoring policy which changes the next-hop in the ATT policy to the COMCAST next-hop 2.2.2.238?