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] Configuration to deny default route by BGP peer is not working



Article ID: KB21095 KB Last Updated: 19 Jul 2011Version: 1.0
This article describes the procedure used to deny the default route advertised by a BGP peer.
  • Juniper firewall is configured to have BGP neighbors with many devices
  • Customer receives the default route from some peers, and the best default route is selected based on metric.
  • An access list is created with IP, to deny the default route; but the route is still in the rib-in table.

set protocol bgp 1234
set enable
set neighbor remote-as 4321 local-ip outgoing-interface ethernet0/2
set neighbor enable
unset ipv4 synchronization
set ipv4 neighbor activate
set ipv4 neighbor route-map "default-route deny" in
unset ipv6 synchronization
set access-list 1
set access-list 1 deny ip 1
set route-map name "default-route deny" deny 1
set match ip 1
The above configuration above will not block the default route.
This is because the in the set access-list 1 deny ip 1 statement is treated as any IP address, not the default route.
The correct statement  to deny the default route is:
set access-list 1 deny default-route 1
When this access-list is selected in the route-map, it will filter out the default route. 

Note:  You cannot configure the deny default-route statement thru the WebUI.

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