Support Support Downloads Knowledge Base Juniper Support Portal 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

[ScreenOS] Local preference set in route map does not reflect in the routing table preference



Article ID: KB22822 KB Last Updated: 07 Feb 2012Version: 1.0
This article describes the issue of the local preference set the route map not being reflected correctly in the routing table preference.

The default route learnt via iBGP has the route preference as 250 (default set on VR). However, the route map has local preference set as 50 and origin as IGP. This route map has been included as neighbors in the BGP instance. The rib-in on BGP shows the default route learnt with preference of 50 via IGP. But on the Web UI, it has a preference of 250.
Customer wants the role, learnt via iBGP, to take the local preference configured in the route map; instead of the default preference set on VR.

In the Web UI:

Go to Network > Routing > Virtual Router > Trust and edit [default preference for iBGP=250].

Go to Network > Routing > Virtual Router > Trust > Route Map > Sequence number and edit Local preference[Enable]=50.

In the CLI:
SSG520-> get vr trust route-map BGP

Route-map (BGP)
Entry (1) - Action (permit)
Match Fields
ip-address: 1 (access-list)

Set Fields
local pref: 50
origin: igp

On checking the routing table, after disabling and re-enabling the BGP instance, it was found that the preference is 250.

In the CLI:
SSG520-> get route

IPv4 Dest-Routes for <untrust-vr> (0 entries)
H: Host C: Connected S: Static A: Auto-Exported
I: Imported R: RIP/RIPng P: Permanent D: Auto-Discovered
iB: IBGP eB: EBGP O: OSPF/OSPFv3 E1: OSPF external type 1
E2: OSPF/OSPFv3 external type 2 trailing B: backup route

IPv4 Dest-Routes for <trust-vr> (13 entries)
ID IP-Prefix Interface Gateway P Pref Mtr Vsys
* 4 eth0/0 H 0 0 Root
3 eth0/0 C 0 0 Root
6 vlan1 H 0 0 Root
* 20 eth0/2 S 20 1 Root
23 eth0/2 iB 250 0 Root
* 19 loopback.1 C 0 0 Root
2 eth0/0 H 0 0 Root
* 15 eth0/2 C 0 0 Root
1 eth0/0 C 0 0 Root
* 25 tun.1 S 20 1 Root
* 24 loopback.2 C 0 0 Root
* 16 eth0/2 H 0 0 Root
5 vlan1 C 0 0 Root

But on checking the  rib-in table via CLI:
SSG520(M)-> get vr trust protocol bgp rib-in

i: IBGP route, e: EBGP route, >: best route, *: valid route
Prefix Nexthop Wt Pref Med Orig AS-Path
Total ipv4 routes in rib-in: 1 (0 in flap-damping history)
>i* 100 50 0 IGP
Total no. of ipv4 entries shown: 1
i: IBGP route, e: EBGP route, >: best route, *: valid route
Prefix Wt Pref Med Orig
Nexthop AS-Path

The local preference of BGP, set in the route-map, is independent of the default preference in a vrouter as they are 2 different entities.

The local preference attribute is used to prefer an exit point from the local autonomous system. The local preference attribute is propagated throughout the local autonomous system. If there are multiple exit points from the AS, the local preference attribute is used to select the exit point for a specific route. So you can use the Local Preference in route maps to load balance between exit points within an AS.

There is no way to force the firewall to insert iBGP-learned routes into the routing table, using a specific route preference. The only option is to change the route preference table, so that the IBGP will take precedence over EBGP routes.
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