I'm trying to do destination based CoS on Juniper MX basing on destination ASN. I've tried config below.
set policy-options as-path BGP-PATH-TO-MARK-COS "65512 .* set policy-options policy-statement MARK-POLICY-1 term term-1 to as-path BGP-PATH-TO-MARK-COS set policy-options policy-statement MARK-POLICY-1 term term-1 then forwarding-class network-control set routing-options forwarding-table export MARK-POLICY-1 set class-of-service interfaces ge-7/2/2 unit 0 rewrite-rules inet-precedence default
I expect traffic to AS65512 destinations to be marked as network-control, however tcpdump shows 0x0 tos filed. Looks like term-1 condition is right, since if I change 'then forwarding-class network-control' to 'then reject' traffic towards AS65512 is indeed rejected.
Let's ignore for a moment 'network-control' it's here only to see that marking is indeed happens (which is not the case).
What could be wrong with my config?