Juniper BGP - CONFIGURATION GUIDE V 11.1.X Configuration Manual page 159

Junose software for e series routing platforms
Table of Contents

Advertisement

host2(config-router)#neighbor 10.4.4.1 remote-as 303
host2(config-router)#neighbor 10.4.4.1 route-map 10 out
host2(config-router)#neighbor 10.2.25.1 remote-as 73
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
Chapter 1: Configuring BGP Routing
Selecting the Best Path
123

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junose 11.1.x bgp and mplsBgpMpls

Table of Contents