Skip to content

Batfish does not model Junos metric expression (multiplier/offset) form #183

@dhalperi

Description

@dhalperi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions