User's Manual

Table Of Contents
40-24
SwitchD (config-router-bgp)#neighbor 3.3.3.3 remote-as 100
SwitchD (config-router-bgp)#neighbor 3.3.3.3 route-map set-metric out
SwitchD (config-router-bgp)#neighbor 1.1.1.1 remote-as 300
SwitchD (config-router-bgp)#exit
SwitchD (config)#route-map set-metric permit 10
SwitchD (Config-Router-RouteMap)#set metric 200
The configurations of SwitchB
SwitchB (config)#router bgp 400
SwitchB (config-router-bgp)#neighbor 4.4.4.4 remote-as 100
SwitchB (config-router-bgp)#neighbor 4.4.4.4 route-map set-metric out
SwitchB (config-router-bgp)#exit
SwitchB (config)#route-map set-metric permit 10
SwitchB (Config-Router-RouteMap)#set metric 50
After the configuration above, SwitchB, SwitchC and SwitchD are assumed to send a route 12.0.0.0 to
SwitchA. According to the comparison of BGP route strategy; there is an assumption that the routes sent by
the three switches above have the same attribute value before the comparison of metric attribute. At this time,
the route with lower value is the better route. But the comparison of metric attribute will only be done with the
routes from the same AS. For SwitchA, the routes passed SwitchC are preferable to the one passed SwitchD.
Because SwitchC and SwitchB are not located in the same AS, the SwitchA will not do metric comparison
between the two switches. If the metric comparison between different AS is needed, the command” bgp
always-compare-med” will be used. If this command is configured, the routes passed SwitchB are the best to
SwitchA. At this time, the following command may be added on SwitchA:
SwitchA (config-router-bgp)#bgp always-compare-med
40.3.7 Examples 7: example of BGP VPN
For the configuration of MPLS VPN, BGP is part of the core routing system and it is also an important utility to
support ILM and FTN entries on the edge devices. For DCNOS, the BGP protocol together with the LDP
protocol, constructs the foundation of the MPLS VPN application. The LDP protocol works at the WLAN side
and for the routers which are not on the edge of the network, the BGP protocol does not function.