Problem
Batfish does not evaluate the metric expression form in Junos policy-statement then blocks. The device applies the expression at policy evaluation time, producing a concrete metric value, but Batfish predicts metric=0.
Technical Details
Junos then metric expression metric multiplier 2 offset 5 evaluates to (incoming_metric * 2) + 5. When the incoming metric is 0 (eBGP default), the result is 5. Batfish does not implement this expression evaluation and leaves the metric unchanged.
Observed In
junos_then_action_conflicts lab, prefix 10.50.70.0/24 (MED-SET-EXPRESSION term). Device shows metric=5; Batfish predicts metric=0.
Configuration Pattern
set policy-options policy-statement IMPORT term MED-SET-EXPRESSION then metric expression metric multiplier 2
set policy-options policy-statement IMPORT term MED-SET-EXPRESSION then metric expression metric offset 5
Problem
Batfish does not evaluate the
metric expressionform in Junos policy-statementthenblocks. The device applies the expression at policy evaluation time, producing a concrete metric value, but Batfish predicts metric=0.Technical Details
Junos
then metric expression metric multiplier 2 offset 5evaluates to(incoming_metric * 2) + 5. When the incoming metric is 0 (eBGP default), the result is 5. Batfish does not implement this expression evaluation and leaves the metric unchanged.Observed In
junos_then_action_conflicts lab, prefix 10.50.70.0/24 (MED-SET-EXPRESSION term). Device shows metric=5; Batfish predicts metric=0.
Configuration Pattern