![Edge-Core ES3628EA User Manual Download Page 538](http://html1.mh-extra.com/html/edge-core/es3628ea/es3628ea_user-manual_2359702538.webp)
538
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
SwitchA(config-router-bgp)# bgp always-compare-med
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”
13.8.5 BGP Troubleshooting
In the process of configuring and implementing BGP protocol, physical connection,
configuration false probably leads to BGP protocol doesn’t work. Therefore, the
customers should give their attention to points as follow:
First of all, to ensure correct physical connection;
Secondly, to ensure interface and link protocol are UP (execute show interface
instruction);
And startup BGP protocol (use router bgp command), configure affiliated IBGP and
EBGP neighbors (use neighbor remote-as command).