Using A Route Map; Using An As-Path Access List - Juniper BGP - CONFIGURATION GUIDE V 11.1.X Configuration Manual

Junose software for e series routing platforms
Table of Contents

Advertisement

host1(config-router)#neighbor 10.72.4.2 remote-as 300
host1(config-router)#neighbor 10.72.4.2 weight 500
Router LA sends traffic through router Boston in preference to router NY.

Using a Route Map

A route map instance is a set of conditions with an assigned number. The number
after the permit keyword designates an instance of a route map. For example,
instance 10 of route map 10 begins with the following:
host1(config)#route-map 10 permit 10
In the following commands to configure router LA, instance 10 of route map 10
assigns a weight of 1000 to any routes from AS 100. Instance 20 assigns a weight
of 500 to routes from any other AS.
host1(config)#router bgp 400
host1(config-router)#neighbor 10.5.5.1 remote-as 100
host1(config-router)#neighbor 10.5.5.1 route-map 10 in
host1(config-router)#neighbor 10.72.4.2 remote-as 300
host1(config-router)#neighbor 10.72.4.2 route-map 20 in
host1(config-router)#exit
host1(config)#route-map 10
host1(config-route-map)#set weight 1000
host1(config-route-map)#route-map 20
host1(config-route-map)#set weight 500
See JUNOSe IP Services Configuration Guide for more information about using route
maps.

Using an AS-Path Access List

The following commands assign weights to routes filtered by AS-path access lists on
router LA:
host1(config)#router bgp 400
host1(config-router)#neighbor 10.5.5.1 remote-as 100
host1(config-router)#neighbor 10.5.5.1 filter-list 1 weight 1000
host1(config-router)#neighbor 10.72.4.2 remote-as 300
host1(config-router)#neighbor 10.72.4.2 filter-list 2 weight 500
host1(config-router)#exit
host1(config)#ip as-path access-list 1 permit ^100_
host1(config)#ip as-path access-list 2 permit ^300_
Access list 1 permits any route whose AS-path attribute begins with 100 (specified
by ^). This permits routes that pass through router Boston, whether they originate
in AS 100 (AS path = 100) or AS 200 (AS path = 100 200) or AS 300 (AS path =
100 200 300). Access list 2 permits any route whose AS-path attribute begins with
300. This permits routes that pass through router NY, whether they originate in AS
300 (AS path = 300) or AS 200 (AS path = 300 200) or AS 100 (AS path = 300 200
100).
Chapter 1: Configuring BGP Routing
Selecting the Best Path
113

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junose 11.1.x bgp and mplsBgpMpls

Table of Contents