BGP 2 ISP and ROS 4.5

Hi all :slight_smile:
last few days i am trying to configure MT 4.5 on x86 platform as Border Router
I have two ISPs with 3 BGP sessions (Internet, Country and City) from each of them.
Everything works OK except my upstream traffic, i tried to configure “set-bgp-local-pref” without any success.
I need to prioritize my upstream traffic.

Here is my config:

/routing bgp instance print
0 name=“bgp_GCN” as=44509 router-id=10.108.240.10 redistribute-connected=no redistribute-static=no redistribute-rip=no redistribute-ospf=no
redistribute-other-bgp=no out-filter=“” client-to-client-reflection=no ignore-as-path-len=no routing-table=“”

0 name=“bgp_TC” as=44509 router-id=10.79.66.10 redistribute-connected=no redistribute-static=no redistribute-rip=no redistribute-ospf=no
redistribute-other-bgp=no out-filter=“” client-to-client-reflection=no ignore-as-path-len=no routing-table=“”


/routing bgp peer print detail
0 E name=“GCN-Internet” instance=bgp_GCN remote-address=10.108.240.10 remote-as=12615 tcp-md5-key=“” nexthop-choice=default multihop=no route-reflect=no
hold-time=4m ttl=default in-filter=gcn_Internet-in out-filter=gcn_Internet-out address-families=ip default-originate=never remove-private-as=no
as-override=no passive=no use-bfd=no

1 E name=“GCN-Bulgaria” instance=bgp_GCN remote-address=10.155.255.10 remote-as=12615 tcp-md5-key=“” nexthop-choice=default multihop=no route-reflect=no
hold-time=4m ttl=default in-filter=gcn_bulgaria-in out-filter=gcn_bulgaria-out address-families=ip default-originate=never remove-private-as=no
as-override=no passive=no use-bfd=no

2 E name=“GCN-Varna” instance=bgp_GCN remote-address=10.155.255.11 remote-as=12615 tcp-md5-key=“” nexthop-choice=default multihop=no route-reflect=no
hold-time=4m ttl=default in-filter=gcn_varna-in out-filter=gcn_varna-out address-families=ip default-originate=never remove-private-as=no as-override=no
passive=no use-bfd=no

3 E name=“TC-Varna” instance=bgp_TC remote-address=10.79.95.1 remote-as=16154 tcp-md5-key=“” nexthop-choice=default multihop=no route-reflect=no hold-time=3m
ttl=default in-filter=tc_varna-in out-filter=tc_varna-out address-families=ip default-originate=never remove-private-as=no as-override=no passive=no
use-bfd=no

4 E name=“TC-Bulgaria” instance=bgp_TC remote-address=10.79.95.5 remote-as=16154 tcp-md5-key=“” nexthop-choice=default multihop=no route-reflect=no
hold-time=3m ttl=default in-filter=tc_bulgaria-in out-filter=tc_bulgaria-out address-families=ip default-originate=never remove-private-as=no
as-override=no passive=no use-bfd=no

5 E name=“TC-Internet” instance=bgp_TC remote-address=10.79.95.9 remote-as=16154 tcp-md5-key=“” nexthop-choice=default multihop=no route-reflect=no
hold-time=3m ttl=default in-filter=tc_internet-in out-filter=tc_internet-out address-families=ip default-originate=never remove-private-as=no
as-override=no passive=no use-bfd=no

/routing bgp network print
0 X.X.X.0/23 no
1 Y.Y.Y.0/24 no

/routing filter print
0 chain=gcn_varna-out prefix=X.X.X.0/23 prefix-length=23-32 invert-match=no action=accept set-bgp-local-pref=230
1 chain=gcn_bulgaria-out prefix=X.X.X.0/23 prefix-length=23-32 invert-match=no action=accept set-bgp-local-pref=220
2 chain=gcn_Internet-out prefix=X.X.X.0/23 prefix-length=23-32 invert-match=no action=accept set-bgp-local-pref=210
3 chain=tc_varna-out prefix=Y.Y.Y.0/24 prefix-length=24-32 invert-match=no action=accept set-bgp-local-pref=160
4 chain=tc_bulgaria-out prefix=Y.Y.Y.0/24 prefix-length=24-32 invert-match=no action=accept set-bgp-local-pref=140
5 chain=tc_internet-out prefix=Y.Y.Y.0/24 prefix-length=24-32 invert-match=no action=accept set-bgp-local-pref=120

and there is the result :slight_smile:
/routing bgp advertisements print where prefix=X.X.X.0/23
PEER PREFIX NEXTHOP AS-PATH ORIGIN LOCAL-PREF
GCN-I… X.X.X.0/23 78.108.240.49 igp
GCN-B… X.X.X.0/23 93.155.255.205 igp
GCN-V… X.X.X.0/23 93.155.255.201 igp
TC-Varna X.X.X.0/23 217.79.95.2 igp
TC-Bu… X.X.X.0/23 217.79.95.6 igp
TC-In… X.X.X.0/23 217.79.95.10 igp

Same result is for other /24 network, no LOCAL-PREF :frowning:
am i i doing something wrong ?

Local pref is not the right attribute to send to upstream providers.

You need to prepend AS path or if more than one peer connects to the same AS then you can also use MED.

Just to elaborate a little: Local preference is only carried in iBGP updates, and as such is only valid internally within your AS. As mrz said, use prepending, or check with your upstream if they support any communities for traffic engineering. Most often, you can tag your routes with a BGP community that lets your upstream change their local preference, prepend a number of times or similar and they can often do this with a great deal of flexibility.