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

How To Configure Route Map to allow only default route from BGP neighbor

0

0

Article ID: KB15453 KB Last Updated: 08 Oct 2009Version: 1.0
Summary:
Customer has a request that they only want to learn the default route from the EBGP neighbor router instead of all other routes.
Symptoms:
Customer has a request that they only want to learn the default route from the EBGP router instead of other routes. They tried to put route-map and access-list as below:

 set ipv4 neighbor 172.19.51.37 route-map "filter" in
 exit
 set access-list 1
 set access-list 1 permit 0.0.0.0/0 1
 set route-map name "filter" permit 1
 set match ip 1
 exit


The result is all the routes have been updated from the neighbor 172.19.51.37.
Solution:
The reason is 0.0.0.0/0  in the access-list will allow all routes from the EBGP neighbor.  The solution is to use the option 'default-route' in the access-list, as below.

set neighbor 172.19.51.37 remote-as 200
set neighbor 172.19.51.37 enable
set ipv4 neighbor 172.19.51.37 activate
set ipv4 neighbor 172.19.51.37 route-map "filter" in
exit
set access-list 1
set access-list 1 permit default-route 1
set route-map name "filter" permit 1
set match ip 1
exit


Then with the command, get route , you will see only the default route installed:

IPv4 Dest-Routes for <trust-vr> (5 entries)
--------------------------------------------------------------------------------------
ID IP-Prefix Interface Gateway P Pref Mtr Vsys
--------------------------------------------------------------------------------------
* 8 0.0.0.0/0 eth0/0 172.19.51.37 eB 40 0 Root
* 2 172.19.51.188/32 eth0/0 0.0.0.0 H 0 0 Root
* 4 192.168.1.1/32 bgroup0 0.0.0.0 H 0 0 Root
* 1 172.19.50.0/23 eth0/0 0.0.0.0 C 0 0 Root
* 3 192.168.1.0/24 bgroup0 0.0.0.0 C 0 0 Root

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