This article explains why a commit operation fails when inheriting port-mirroring instance parameters from another instance, and reveals how to fix this problem.
A commit operation fails when inheriting port-mirroring instance parameters from another instance if the inherited instance is defined later in the configuration.
For example:
- If instance-c inherits parameters from instance-d, and
- If instance-d is defined after instance-c,
- The commit fails, as shown in the example below.
lab@R1# show chassis fpc 3 { port-mirror-instance instance-d; } lab@R1# show firewall filter mirror-c { term a { then { count mirror-c; port-mirror-instance instance-c; accept; } } } filter mirror-d { term a { then { count mirror-d; port-mirror-instance instance-d; accept; } } } lab@R1# show forwarding-options port-mirroring { instance { instance-c { input-parameters-instance instance-d; family inet { output { interface ge-0/0/9.3 { next-hop 10.1.3.2; } } } } instance-d { input { rate 1; run-length 1; maximum-packet-length 2000; } family inet { output { interface ge-0/0/9.4 { next-hop 10.1.4.2; } } } } } } lab@R1# commit check [edit forwarding-options port-mirroring instance instance-c] Input parameters instance not defined error: configuration check-out failed
Forward referencing of port-mirroring instances is not supported in the Junos OS.
You must configure a port-mirroring instance from which parameters are inherited before the instance inheriting the parameters.
To fix the issue in the example in the Problem section above, insert instance-d before instance-c, as shown below. The commit operation will then succeed.
[edit forwarding-options port-mirroring instance] lab@R1# insert instance-d before instance-c [edit forwarding-options port-mirroring instance] lab@R1# show | compare [edit forwarding-options port-mirroring instance] +instance-d { + input { + rate 1; + run-length 1; + maximum-packet-length 2000; + } + family inet { + output { + interface ge-0/0/9.4 { + next-hop 10.1.4.2; + } + } + } +} +instance-c { + input-parameters-instance instance-d; + family inet { + output { + interface ge-0/0/9.3 { + next-hop 10.1.3.2; + } + } + } +} [edit forwarding-options port-mirroring instance] lab@R1# commit check configuration check succeeds