Juniper JUNOSE 11.2.X BGP AND MPLS Configuration Manual page 156

For e series broadband services routers - bgp and mpls configuration
Table of Contents

Advertisement

JunosE 11.2.x BGP and MPLS Configuration Guide
120
host2(config-router)#neighbor 10.6.6.1 remote-as 4
host2(config-router)#neighbor 10.6.6.1 route-map 10 out
host2(config-router)#network 192.168.33.0 mask 255.255.255.0
host2(config-router)#exit
host2(config)#route-map 10 permit 10
host2(config-route-map)#set metric 50
The following commands configure router Nice:
host3(config)#router bgp 73
host3(config-router)#neighbor 10.3.3.1 remote-as 303
host3(config-router)#neighbor 10.3.3.1 route-map 10 out
host3(config-router)#neighbor 10.2.25.2 remote-as 73
host3(config-router)#network 172.19.0.0
host3(config-router)#exit
host3(config)#route-map 10 permit 10
host3(config-route-map)#set metric 100
The following commands configure router Dublin:
host4(config)#router bgp 4
host4(config-router)#neighbor 10.5.5.1 remote-as 303
host4(config-router)#neighbor 10.5.5.1 route-map 10 out
host4(config-router)#neighbor 10.6.6.2 remote-as 73
host4(config-router)#network 172.14.27.0 mask 255.255.255.0
host4(config-router)#exit
host4(config)#route-map 10 permit 10
host4(config-route-map)#set metric 25
Router London receives updates regarding route 192.168.33.0/24 from both router Nice
and router Paris. Router London compares the MED values received from the two routers:
Router Nice advertises a MED of 100 for the route, whereas router Paris advertises a MED
of 50. On this basis, router London prefers the path through router Paris.
Because BGP by default compares only MED attributes of routes coming from the same
AS, router London can compare only the MED attributes for route 192.168.33.0/24 that
it received from routers Paris and Nice. It cannot compare the MED received from router
Dublin, because router Dublin is in a different AS than routers Paris and Nice.
However, you can use the bgp always-compare-med command to configure router
London to take into account the MED attribute from router Dublin as follows:
host1(config)#router bgp 303
host1(config-router)#neighbor 10.4.4.2 remote-as 73
host1(config-router)#neighbor 10.3.3.2 remote-as 73
host1(config-router)#neighbor 10.5.5.2 remote-as 4
host1(config-router)#network 122.28.8.0 mask 255.255.248.0
host1(config-router)#bgp always-compare-med
Router Dublin advertises a MED of 25 for route 192.168.33.0/24, which is lower—more
preferred—than the MED advertised by router Paris or router Nice. However, the AS path
for the route through router Dublin is longer than that through router Paris. The AS path
is the same length for router Paris and router Nice, but the MED advertised by router Paris
is lower than that advertised by router Nice. Consequently, router London prefers the
path through router Paris.
Copyright © 2010, Juniper Networks, Inc.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junose 11.2.x

Table of Contents