Riverstone Networks RS Switch Router User Guide Release 8.0 16-31
BGP Configuration Guide BGP Configuration Examples
Using the local-pref Option
For router R12’s CLI configuration file, local-pref is set to 194:
For router R13, local-pref is set to 204.
Using the set-pref Option
The formula used to compute the local preference is as follows:
Local_Pref = 254 – (global protocol preference for this route) + set-pref metric
Note A value greater than 254 will be reset to 254. ROSRD will only send Local_Pref
values between 0 and 254.
In a mixed ROSRD and non-ROSRD (or non-GateD) network, the non-ROSRD IBGP implementation may send
Local_Pref values that are greater than 254. When operating a mixed network of this type, you should make sure that
all routers are restricted to sending Local_Pref values in the range metric to 254.
In router R12’s CLI configuration file, the import preference is set to 160:
Using the formula for local preference [Local_Pref = 254 - (global protocol preference for this route) + metric], the
Local_Pref value put out by router R12 is 254 - 160+100 = 194.
For router R13, the import preference is set to 150. The Local_Pref value put out by router R13 is 254 - 150+100 = 204.
bgp set peer-group as901 local-pref 194
bgp set peer-group as901 local-pref 204
#
# Set the set-pref metric for the IBGP peer group
#
bgp set peer-group as901 set-pref 100
ip-router policy create bgp-import-source as900 autonomous-system 64900 preference 160
ip-router policy create bgp-import-source as900 autonomous-system 64900 preference 150