You must be familiar with the default routing policies to know when you need to modify them to suit your needs. Table 9 summarizes the default routing policies for each routing protocol that imports and exports routes. The actions in the default routing policies are taken if you have not explicitly configured a routing policy. This table also shows direct and explicitly configured routes, which for the purposes of this table are considered a pseudoprotocol. Explicitly configured routes include aggregate, generated, and static routes.
The default import policy is always the same: accept all routes learned from the protocol. Table 9 includes information about the routing tables used by each protocol.
Accept all BGP IPv4 routes learned from configured neighbors and import into the
inet.0routing table. Accept all BGP IPv6 routes learned from configured neighbors and import into theinet6.0routing table.Accept all DVMRP routes and import into the
inet.1routing table.Accept all IS-IS routes and import into the
inet.0andinet6.0routing tables. (You cannot override or change this default policy.)Reject everything. (The protocol uses flooding to announce local routes and any learned routes.)
Accept all LDP routes and import into the
inet.3routing table.Accept all MPLS routes and import into the
inet.3routing table.Accept all OSPF routes and import into the
inet.0routing table. (You cannot override or change this default policy.)Reject everything. (The protocol uses flooding to announce local routes and any learned routes.)
Accept all PIM dense mode routes and import into the
inet.1routing table.Accept all PIM sparse mode routes and import into the
inet.1routing table.Accept all direct and explicitly configured routes and import into the
inet.0routing table.The pseudoprotocol cannot export any routes from the routing table because it is not a routing protocol.
Routing protocols can export these or any routes from the routing table.
Accept all RIP routes learned from configured neighbors and import into the
inet.0routing table.Reject everything. To export RIP routes, you must configure an export policy for RIP.
Accept all RIPng routes learned from configured neighbors and import into the
inet6.0routing table.Reject everything. To export RIPng routes, you must configure an export policy for RIPng.
Accept all routes. For additional information about test policy, see Routing Policy Tests.
When multiple routes for a destination exist in the routing table, the protocol selects an active route and that route is placed in the appropriate routing table. For equal-cost routes, the JUNOS software places multiple next hops in the appropriate routing table.
When a protocol is exporting routes from the routing table, it exports active routes only. This applies to actions specified by both default and user-defined export policies.
You cannot change the default import policy for the link-state protocols IS-IS and OSPF. As link-state protocols, IS-IS and OSPF exchange routes between systems within an autonomous system (AS). All routers and systems within an AS must share the same link-state database, which includes routes to reachable prefixes and the metrics associated with the prefixes. If an import policy is configured and applied to IS-IS or OSPF, some routes might not be learned or advertised or the metrics for learned routes might be altered, which would make a consistent link-state database impossible.
The default export policy for IS-IS and OSPF protocols is to reject everything. These protocols do not actually export their internally learned routes (the directly connected routes on interfaces that are running the protocol). Both IS-IS and OSPF protocols use a procedure called flooding to announce local routes and any routes learned by the protocol. The flooding procedure is internal to the protocol, and is unaffected by the policy framework. Exporting can be used only to announce information from other protocols, and the default is not to do so.
For information about the routing protocols from which the routing table can import routes and to which routing protocols the routing table can export routes, see Table 7. For information about the user-defined import and export policies supported for each routing protocol and the level at which you can apply these policies, see Table 11.
The following default actions are taken if the following situations arise during policy evaluation:
- If a policy does not specify a match condition, all routes evaluated against the policy match.
- If a match occurs but the policy does not specify an accept, reject, next term, or next policy action, one of the following occurs:
- The next term, if present, is evaluated.
- If no other terms are present, the next policy is evaluated.
- If no other policies are present, the action specified by the default policy is taken.
- If a match does not occur with a term in a policy and subsequent terms in the same policy exist, the next term is evaluated.
- If a match does not occur with any terms in a policy and subsequent policies exist, the next policy is evaluated.
- If a match does not occur by the end of a policy or all policies, the accept or reject action specified by the default policy is taken.