
test policy
Syntax
test policy policy-name prefix
Release Information
Command introduced before Junos OS Release 7.4.
Command introduced in Junos OS Release 9.0 for EX Series switches.
Description
Test a policy configuration to determine which prefixes match routes in the routing table.
Options
policy-name
—Name of a policy.
prefix
—Destination prefix to match.
Additional Information
All prefixes in the default unicast routing table (
inet.0
) that match prefixes that are the
same as or longer than the specific prefix are processed by the
from
clause in the specified
policy. All prefixes accepted by the policy are displayed. The
test policy
command
evaluates a policy differently from the Border Gateway Protocol (BGP) import process.
When testing a policy that contains an
interface
match condition in the
from
clause, the
test policy
command uses the match condition. In contrast, BGP does not use the
interface
match condition when evaluating the policy against routes learned from internal BGP
(IBGP) or external BGP (EGBP) multihop peers.
Required Privilege
Level
view
Related
Documentation
show policy damping on page 2151
•
List of Sample Output
test policy on page 3142
Output Fields
For information about output fields, see the output field tables for the show route
command, the show route detail command, the show route extensive command, or the
show route terse command.
test policy
test policy
user@host>
test policy test-statics 3.0.0.1/8
inet.0: 44 destinations, 44 routes (44 active, 0 holddown, 0 hidden)
Prefixes passing policy:
3.0.0.0/8 *[BGP/170] 16:22:46, localpref 100, from 10.255.255.41
AS Path: 50888 I
> to 10.11.4.32 via en0.2, label-switched-path l2
3.3.3.1/32 *[IS-IS/18] 2d 00:21:46, metric 0, tag 2
> to 10.0.4.7 via fxp0.0
3.3.3.2/32 *[IS-IS/18] 2d 00:21:46, metric 0, tag 2
> to 10.0.4.7 via fxp0.0
3.3.3.3/32 *[IS-IS/18] 2d 00:21:46, metric 0, tag 2
> to 10.0.4.7 via fxp0.0
3.3.3.4/32 *[IS-IS/18] 2d 00:21:46, metric 0, tag 2
> to 10.0.4.7 via fxp0.0
Policy test-statics: 5 prefixes accepted, 0 prefixes rejected
Copyright © 2010, Juniper Networks, Inc.
3142
Complete Software Guide for Junos
®
OS for EX Series Ethernet Switches, Release 10.3
Summary of Contents for JUNOS OS 10.3 - SOFTWARE
Page 325: ...CHAPTER 17 Operational Mode Commands for System Setup 229 Copyright 2010 Juniper Networks Inc ...
Page 1323: ...CHAPTER 56 Operational Mode Commands for Interfaces 1227 Copyright 2010 Juniper Networks Inc ...
Page 2841: ...CHAPTER 86 Operational Commands for 802 1X 2745 Copyright 2010 Juniper Networks Inc ...
Page 3367: ...CHAPTER 113 Operational Mode Commands for CoS 3271 Copyright 2010 Juniper Networks Inc ...
Page 3435: ...CHAPTER 120 Operational Mode Commands for PoE 3339 Copyright 2010 Juniper Networks Inc ...
Page 3529: ...CHAPTER 126 Operational Mode Commands for MPLS 3433 Copyright 2010 Juniper Networks Inc ...