All routing protocols store the routes that they learn in the routing table. The routing table uses this collected route information to determine the active routes to destinations. The routing table then installs the active routes into its forwarding table and exports them into the routing protocols. It is these exported routes that the protocols advertise.
For each protocol, you control which routes the protocol stores in the routing table and which routes the routing table exports into the protocol from the routing table by defining a routing policy for that protocol. For information about defining routing policy, see the JUNOS Policy Framework Configuration Guide.
To apply routing policies that affect how the routing protocol process (rpd) exports routes into IS-IS, include the export statement:
- export [ policy-names ];
For a list of hierarchy levels at which you can configure this statement, see the statement summary section for this statement.
![]() |
Note: For IS-IS, you cannot apply routing policies that affect how routes are imported into the routing table; doing so with a link-state protocol can easily lead to an inconsistent topology database. |
Define a policy that allows only host routes from USC (128.125.0.0/16), and apply the policy to routes exported from the routing table into IS-IS:
- policy-options {
-
- policy-statement usc-hosts-only {
-
- term first {
-
- from {
- route-filter 128.125.0.0/16 upto /31;
- }
- then reject;
- }
- then accept;
- }
- }
- protocols {
-
- isis {
- export usc-hosts-only;
- }
- }
Define a policy that takes Border Gateway Protocol (BGP) routes from the Edu community and places them into IS-IS with a metric of 14. Apply the policy to routes exported from the routing table into IS-IS:
- protocols {
-
- isis {
- export edu-to-isis;
- }
- }
- policy-options {
- community Edu members 666:5;
-
- policy-statement edu-to-isis {
-
- from {
- protocol bgp;
- community Edu;
- }
- to protocol isis;
- then metric 14;
- }
- }
Define a policy that rejects all IS-IS Level 1 routes so that none are exported into IS-IS:
- policy-options {
-
- policy-statement level1 {
-
- term first {
- from level 1;
- then reject;
- }
- then accept;
- }
- }
- protocols {
-
- isis {
- export level1;
- interface fxp0;
- }
- }
Define a routing policy to export IS-IS Level 1 internal-only routes into Level 2:
- [edit]
- protocols {
-
- isis {
- export L1-L2;
- }
- }
- policy-statement L1-L2 {
-
- term one {
-
- from {
- level 1;
- external;
- }
- then reject;
- }
-
- term two {
- from level 1;
- to level 2;
- then accept;
- }
- }
Define a routing policy to export IS-IS Level 2 routes into Level 1:
- [edit]
- protocols {
-
- isis {
- export L2-L1;
- }
- }
- policy-statement L2-L1 {
-
- term one {
- from level 2;
- to level 1;
- then accept;
- }
- }