We have 2 upstreams ISP A and ISP B. ISP A (10Mb/s) is our main upstream with good bandwidth. It sends us default route over bgp. ISP B (2Mb/s) is our backup upstream with a small bandwidth, but it sends us Full Routing Table. I am new to BGP so I'm looking for a way to make sure that most of the inbound and outbound traffic would use ISP A and fail-over to ISP B. What are the best ways to do it?
There are many possible ways to do this with your BGP policy. While the nicest thing would be to beat ISP A over the head until they give you a proper route, we can still work with this.
Natively, anything that's meant for ISP B's network that matches your local interface will go there. Assuming you want anything that is one hop away from them, go ahead and add a rule that sets priority on anything from that interface which is within one hop. You might change that constraint to be 0 hops (only what matches the ISP's AS) or some other idea.
Set ISP A's traffic (the default route) to have a slightly higher metric. Set anything else from ISP B that we hadn't decide to give priority to earlier to have an even higher metric.
Spend some time looking at route maps to figure out what you think will best suit your circumstance.
When you're done with that, get back to yelling at ISP A for the issues that can crop of from your local link remaining online while they possibly lose some paths.
There is no particularly good way to do this. One ugly way is to drop long AS paths from the full table. That way, you will only get "short" AS paths, and most of your traffic will take the default route.
Take care to think about your inbound traffic too!
Thanks for advice. The solution I came up with is as follows:
This way all my outgoing traffic is departing ISP B (since it sends me more specific routes) and all my incoming traffic comes in from ISP A (it shows up as a better route on the internet). If one of the ISPs goes down, the internet will still be available through another ISP.