SmartSwitch Router User Reference Manual 99Chapter 6: BGP Configuration GuideIn router SSR12’s CLI configuration file, the import preference is set to 160:Using the formula for local preference [Local_Pref = 254 - (global protocol preference forthis route) + metric], the Local_Pref value put out by router SSR12 is 254 - 160+100 = 194For router SSR13, the import preference is set to 150. The Local_Pref value put out byrouter SSR12 is 254 - 160+100 = 204.Notes on Using the Local_Pref Attribute• All routers in the same network that are running GateD and participating in IBGPshould use the setpref metric, and the setpref metric should be set to the same value.For example, in Figure 7, routers SSR12, SSR13, and SSR14 have the following line intheir CLI configuration files:• The value of the setpref metric should be consistent with the import policy in thenetwork.The metric value should be set high enough to avoid conflicts between BGP routes andIGP or static routes. For example, if the import policy sets GateD preferences rangingfrom 170 to 200, a setpref metric of 170 would make sense. You should set the metrichigh enough to avoid conflicts between BGP routes and IGP or static routes.Multi-Exit Discriminator Attribute ExampleMulti-Exit Discriminator (MED) is a BGP attribute that affects the route selection process.MED is used on external links to discriminate among multiple exit or entry points to thesame neighboring AS. All other factors being equal, the exit or entry point with a lowermetric should be preferred. If received over external links, the MED attribute may bepropagated over internal links to other BGP speakers within the same AS. The MEDattribute is never propagated to other BGP speakers in neighboring autonomous systems.Figure 8 shows a sample BGP configuration where the MED attribute has been used.## Set the set-pref metric for the IBGP peer group#bgp set peer-group as901 set-pref 100ip-router policy create bgp-import-source as900 autonomous-system 64900preference 160ip-router policy create bgp-import-source as900 autonomous-system 64900preference 150bgp set peer-group as901 set-pref 100