Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

Routing Policy vs. Policy Based Routing on JUNOS

0

0

Article ID: KB10876 KB Last Updated: 19 Aug 2020Version: 8.0
Summary:

Routing policy is the generic term for all the mechanisms under policy-options in JUNOS.

Policy Based Routing is usually and more accurately known within Juniper as Filter Based Forwarding.

Solution:

Routing policy is the generic term for all the mechanisms under policy-options in JUNOS.  These Routing Policy allows you to modify the routes that are advertised to or accepted from a neighbor while using any of the supported routing protocols.  This is usually applied using the import / export statements in each of the protocols. It affects control plane, route updates, advertisements etc.

Configuration Sample:

            root# show interfaces ge-0/1/0  
            unit 6 {
                family inet {
                    address 1.1.1.6/30;
                }
            }
            root# show protocols 
            bgp {
                group internal-peers {
                    type internal;
                    local-address 12.18.0.4;
                    export send-direct;
                    neighbor 12.13.6.4;
                }
            }
            root# show policy-options 
            policy-statement send-direct {
                term 2 {
                    from protocol direct;
                     then accept;
                }
            }
 

Policy Based Routing (PBR) is Filter Based Forwarding(FBF). It is an approach where you override some of the fundamental rules of destination based routing and forward packets based on other characteristics of the incoming packets.  This is achieved by writing firewall filters that match the relevant characteristics of the incoming packet (src ip, dst ip, src port, dst port, protocol, packet size, etc) and modify the next-hop based on that match.  The packet is then forwarded to that next-hop rather than using the next-hop associated with the destination ip address alone. It affects the data plane L3 forwarding function.Note:  When searching the Technical Documentation for Policy Based Routing (PBR) configuration, search for:  filter-based forwarding.

Configuration sample:

         firewall {
         filter filter1 {
         term t1 {
         from {
         source-address {
         10.1.1.3/32;
         }
         }
         then {
         next-interface {
         xe-0/1/0.1;
         routing-instance rins1;
         }
         }
         }
         term t2 {
         from {
         source-address {
         10.1.1.4/32;
         }
         }
         then {
         next-interface {
         xe-0/1/0.2;
         routing-instance rins2;
         }
         }
         }
         }
         }
         routing-instances {
         rins1 {
         instance-type virtual-router;
         interface xe-0/1/0.1;
         }
         rins2 {
         instance-type virtual-router;
         interface xe-0/1/0.2;
         }
         }

Modification History:
2020-08-19: Added configuration sample for Routing Policy and Policy Based Routing. Removed EOS platforms.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search