I have configured 1 WAN with full route BGP and Google peering
I am geeting 70% google inbound traffic via my WAN.When i disable my WAN BGP then all google traffic goes into my google peering port.
How can i configure to prefer all google traffic goes into my google peering port.
Usually either MED or prepend are the means to influence reception or incoming path.
Hi pukkita,
Can you share any example
See Mikrotik Wiki’s Simple BGP Multihoming Load Sharing example
Check https://wiki.mikrotik.com/wiki/Manual:BGP_Best_Path_Selection_Algorithm to understand best path selection also.
Google Peering Configuration post may be of your interest.
Specific deployment will depend on your scenario, as I said by using MED or prepend you can steer incoming GGC traffic via the GGC connected interface.
Make sure that you’re not announcing more specific prefixes to the ISP than you are to Google. In that scenario, no amount of metric tweaking will change the behavior because the first rule of routing is to choose the most specific route.
In other words, if your netblock is 10.32.64.0/22 and you only announce that prefix to Google but announce 10.32.64.0/22 and 10.32.64.0/23 and 10.32.64.66.0/23 to your ISP, then Google will never use the direct peering for your netblock.
In general, Google should prefer the shortest AS path, all other things being equal.
It’s possible that their routing policy has a higher local_pref on their end facing some other IX carrier / ISP than they have on their session with you. This would also override a lot of things you could do.
You may be able to send communities to Google - check their BGP policies documentation or request their communities policy if they have not already furnished you with one.
Hi pukkita,
I can’t understand above links.Can you help to explain with code
How to set incoming prefer value in med or prepand
otherwise please contact my mail id ajesuraja1982@gmail.com. I’ll ready to pay for your support
Hi zerobyte,
I have advertise the even prefix /24 pool google and ISP.But some times goes the traffic via google .
time to time change the traffic .It’s my issue
Just to clarify - are we talking about ingress traffic or about egress traffic?
If ingress, I would suggest that you check with Google to see if you can send a BGP community that raises your localpref on their end so that as long as your link to them is up, they will always prefer it over any other path.
If egress, then if you are receiving google-only routes via that peering, you could put a rule into your in-filter on that session that sets the localpref to something higher than 100 (100 is the default) so that all routes to Google will prefer that path as long as it is available. If you’re getting full routes from Google (which would surprise me - I would highly doubt that they offer full Internet transport) then you could use an AS-PATH condition on this localpref rule, requiring that the AS-PATH ends with Google’s ASN.
Hi zerobyte,
It’s egress traffic and i have received google full route prefixes
Can you help explain with example code.
otherwise please contact my mail id ajesuraja1982@gmail.com. I’ll ready to pay for your support
on your router that peers with Google, you will have a neighbor configured for that peering session.
In my example, I’ll say that the neighbor is named Google, and that it has an in-filter named Google-In
You could easily add the following rule to the beginning of your Google-In chain:
/routing filter add bgp-as-path=“15169$” chain=Google-in set-bgp-local-pref=110 action=passthrough
This will set the local-pref to 110 for all routes learned, whose AS path ends with Google’s ASN (15169), and then continue processing rules in the chain.
In BGP, local preference is the highest priority standard metric. (Cisco, Mikrotik, and others have also implemented a metric called weight which is even higher than localpref, but this value exists only inside a single router - i.e. there’s no “weight” field in BGP update messages). Local preference is communicated to all other routers in your ASN as well, so if this is the direction you want all egress traffic for Google to go, then it will win throughout your entire network.
Hi zerobyte,
I have added following BGP filter rule but still i have same issue.
chain=Google prefix=xxx.xxx.xxx.xxx/24 invert-match=no action=accept set-bgp-prepend-path=""
chain=Google invert-match=no action=discard set-bgp-prepend-path=""
chain=Google bgp-as-path= 15169$ invert-match=no action=passthrough set-bgp-local-pref=110 set-bgp-prepend-path=""
Rule 1 accepts the prefix x.x.x.x and stops the chain.
Rule 2 drops anything else and stops the chain.
Rule 3 never gets reached.
Move rule 3 to the top of the list - drag and drop is enough to do it.