# Junos Route Filters, Policing, and Preference Explained

The Juniper Networks Certified Specialist Enterprise Routing and Switching (JNCIS-ENT) certification is a credential that validates the networking professionals' knowledge of routing and switching technologies. One of the key topics covered in this certification is Junos Route Filters, Policing, and Preference. This blog post will delve into these topics to provide a comprehensive understanding.

## Route Filters

Route filters in Junos are used to control the routes that are imported into the routing table. They are defined using routing policy and can be applied to both inbound and outbound routes. 

A route filter can be defined using a prefix, a prefix length, or a range of prefix lengths. The 'exact' keyword can be used to match a specific prefix length, while the 'orlonger' keyword can be used to match the specified prefix length or any longer prefix.

Here is an example of a route filter:

policy-statement my-filter {
    from {
        route-filter exact;
    then accept;

In this example, the policy will only accept routes that exactly match the prefix


Policing in Junos is used to control the rate of traffic passing through a network. It is implemented using a policer, which defines the maximum rate of traffic and the action to take when that rate is exceeded.

A policer can be defined with a bandwidth limit, a burst size limit, and an action. The action can be to discard the traffic, to mark it with a certain forwarding class, or to mark it with a certain loss priority.

Here is an example of a policer:

policer my-policer {
    if-exceeding {
        bandwidth-limit 1m;
        burst-size-limit 1k;
    then discard;

In this example, the policer will discard any traffic that exceeds a rate of 1 Mbps or a burst size of 1 KB.

Route Preference

Route preference in Junos is used to determine the preferred route when there are multiple routes to the same destination. It is defined using a preference value, with lower values indicating higher preference.

The default route preference values in Junos are as follows:

Here is an example of how to change the route preference for OSPF routes:

protocols {
    ospf {
        preference 20;

In this example, the preference for OSPF routes is changed to 20, making them less preferred than the default.

Understanding Junos Route Filters, Policing, and Preference is crucial for network professionals preparing for the JNCIS-ENT certification. These concepts are fundamental to controlling and optimizing network traffic in a Juniper network environment.

© Ben Jacobson.RSS