I have two internet connectios from 2 diffrent ISP’s , with 60Mbps from ISP1 and 155 Mbps from ISP2. I have a CCR 1036-12G-4S-EM with ROS ver 6.20 .Both the ISP’s have enabled full routing tables.I want to BGP peer with both ISP’s with my ASN.I have two /24 IP prefix.Is it possible to configure BGP load sharing with both the ISP’s over one /24 IP perfix ,if so please let me know the configuration or let me know of any other best alternative .
Yes, is it possible to announce the /24’s to both BGP peers. This is exactly what BGP is designed for.
How to do ‘Load Sharing’… that is the million dollar question…
FYI, Influencing traffic on BGP Peering is more of an Art than a Science…
There a number of methods available to influence inbound and outbound traffic.
You can start with a simple technique
Inbound traffic for your Prefixes can be influenced by setting AS Prepends
Outbound traffic from your router can be influenced by local-pref setting
and move to more sophisticated ones..
Inbound Traffic can also be influenced by using your IP Transit Provider’s listed BGP Communities
and you can get granular control by using Filters to pick and choose which networks / subnets you want to influence the local pref for.
Since this is more of an art and a science, I would suggest that you review the Mikrotik BGP Wiki Pages and also look at related MUM presentations
and playing/adjusting these parameters to see the impact and influence on your network is always an excellent way of learning.
(most of these changes are not service outage causing changes, and as such can be done on live networks, but be careful about not fat fingering something )
Thanks for the reply . Please could you show me the basic configuration using the AS prepends and filters such that i can make use of the full bandwidth from both ISP’s . After that ofcourse , i will start tweaking and fine tuning till i get desired results.Please help me on this.
Thanks for the link, strated implementing the process . Just want to know is it passible to use policy based PCC load balancing in BGP environment with 2 BGP peers as in the earlier network diagram.
in BGP world different methods are used for traffic engineering, as-prepend to influence inbound traffic, and local pref or med to out-bound traffic.
using PCC load balancing, with BGP… an interesting question.. I am guessing technically it may be feasible for outbound traffic, but it won’t do anything for inbound traffic, and as such you may find it not very useful.
Interesting, this is what im trying to do too , right now i have bgp full internet routing from 1 ISP but in the future we will have two isp and trying to redirect traffic from 1 building(ip_source) to internet to that second ISP. From what i understand influencing outbound connection using bgp local_pref is based on destination(public_ip). What im trying to do is like this, buildingA → Internet → ISPA and buildingB → Internet → ISPB .
I dont think policy based routing(pbr) will work here.
There’s a big requirement for you to be able to influence your inbound traffic from the Internet such that BldgA tends to come from ISPA and BldgB tends to come via ISPB. You must have a full /24 of public IP for each building. Then you could use prepending and/or BGP communities to cause what you want. If you only have a single /24 of public space, then you can only have one policy for the whole thing (inbound).
The first thing a lot of newbies to the world of BGP have to re-learn about IP networking is that traffic doesn’t necessarily come back to you via the same link you sent it out from. You could have a policy that matches YouTube’s ASN, and sets localpref to use ISP2, but Youtube’s view of the global BGP table / routing policy may cause them to send traffic to you via a path that leads ultimately through ISP1.
EDIT: I don’t mean the word “newbie” in a mean way
Thx for your reply, I also thought that have two a /24 public IP split it to those two ISP. Please correct me if I’m wrong, if i advertise two /24 public ip to difference isp, i only influenced how traffic traverse back from internet coming back to my network. And from inside to internet perspectif what I want is 0.0.0.0/0 address not only some ASN.
It is much easier to implement an outbound traffic policy because your network holds the packets and you decide how to forward them, no matter how many/few public IP addresses you have. This is called “policy-based routing” and you have many options available to you.
One option would be simply to load-balance the interfaces (assuming that all ISPs attach to the same router, but that has a major disadvantage: single point of failure. Your whole network depends on one router.
In general, policy-based routing uses criteria having to do with traffic’s source, or traffic’s destination (or some combination of them)
Example Source Options:
You can choose your outbound policy based on which interface the traffic comes in from (ether1 = building1 > goes to ISP1 / ether2 = building 2 > goes to ISP2 as long as it is up)
You can choose based on source IP address (x.x.x.0/24 → ISP1, y.y.y.0/24 → ISP2)
If you have multiple routers in your topology, with iBGP, you can cause some routers to put more LOCAL_PREF on routes learned from ISP1, and on other routers, higher LOCAL_PREF on routes from ISP2
Example Destination-Based Options:
If you are going to make decisions based on destination IP addresses/ranges, you should avoid the temptation to use static routes. You should cause BGP to see these destinations more favorably through ISP1, ISP2, etc… In general, you will use LOCAL_PREF to influence this, but other methods would be to filter (ignore) certain prefixes from the less-desirable ISP, so that the other ISP(s) will be used. (e.g. 4.0.0.0/8 comes from both ISPs, but you have a prefix 4.8.16.0/22 that you want to use ISP2 to reach, block the /22 from ISP1 so that your router will always use ISP2 because the more specific route always wins)
You can choose based on certain destinations 0.0.0.0/0 = ISP1, excepct for the following ASNs, IP ranges, etc…
You can use BGP communities:
ISPs can put community numbers into strings attached to prefixes. They have no standard meaning in BGP - each ASN can make its own meanings. The ISP may be ASN65000 and tell you that community 65000:100 = route to direct customer, 65000:200 = route through peer network, 65000:300 = inside ISPs own network. You could make a policy such that 0.0.0.0/0 → ISP1, but 65000:100 and 65000:300 → ISP2.
This example means that you use ISP1 for default, but ISP2 to reach its own networks its direct customers only.
If you can’t use communities, you could have ISP2 provide customer-only routes + default GW route, and get ISP1 to give default route only.
As you can see, there are many things you can do with BGP. I suggest that you read as many tech blogs, white papers, forum posts as you can and watch some videos about it on YouTube for ideas. Every network has its own unique needs, and the more you know about how BGP works, the better you can create a policy that works for yours.