Community discussions

MikroTik App
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

BGP load & backup

Wed Jun 05, 2013 11:27 am

Hi, i'm new to this BGP world.

I bought a /24 bloc and a AS number.
I have opened two BGP sessions ISP1 and ISP2, from both i get default route + all metropolitan prefixes

What i want is to use both providers i really don't care through the pachets are going, as long the traffic it's shared somehow between them. (I have the same bandwidth from both) How i can do this ?
Also let's assume one provider is down how i can keep /24 alive? or this is smth automatically done by the router?

Thank you !
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Wed Jun 05, 2013 4:44 pm

Hi,
What i want is to use both providers i really don't care through the pachets are going, as long the traffic it's shared somehow between them. (I have the same bandwidth from both) How i can do this ?
Well, there are several different things that may be tweaked. But you can start with the AS-Path prepending on the sesson to the ISP that brings more traffic.
How it can be done is described here: http://wiki.mikrotik.com/wiki/Manual:Si ... ultihoming
Also let's assume one provider is down how i can keep /24 alive? or this is smth automatically done by the router?
The router takes care of that.

- Mat
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 8:13 am

well, thank you.
But now i have another problems.
It seems like i add the ip addresses for BGP 1 provider and BGP2 provider. They can't be pinged from outside my country.
It's strange, do i need to make sort of packet marking for each provider gateway ?
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Thu Jun 06, 2013 9:43 am

well, thank you.
But now i have another problems.
It seems like i add the ip addresses for BGP 1 provider and BGP2 provider. They can't be pinged from outside my country.
It's strange, do i need to make sort of packet marking for each provider gateway ?
It's difficult to say what happens but please use the Looking Glass sites of different (bigger) ISPs to check if they get your prefix. This is essencial. Also check via traceroute of your packet find their way to the routers of your ISP.
If your ISP gets your prefix but others don't, you should talk to your ISP so they check their config. Maybe they are filtering your prefix.

There is no "Packet Marking" in BGP, but there is something called "BGP communities", which can be used to influence the routing of your upstream ISP or get some information about the source of the prefixes (how or where they learned the prefix) you get from them. But usually you don't need communities for basic connectivity.

- Mat
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 10:26 am

Hmm maybe because of this:

On the router i have 3 gateways and 2 * /24 IP block
IPS1 - Gateway 1 & 2
ISP2 - Gateway 3.

The first /24 is older routed through my ISP1 with his AS, as a result i have in the routing table a static route for gateway, added by me.
Like this:
dst-address= 0.0.0.0/0 gateway=gateway1 distance=1 interface=WAN

The dynamic gateways from actual BGP they are in blue this means the gateway 1 is replaces them somehow.

It's possible that this causes the problem ?

For traceroute the packets stops exaclty before my router.
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Thu Jun 06, 2013 11:37 am

This can't work. You need to send the packets from the newer /24 to the correct gateway. The static route overrides a dynamic route. That's why it doesn't work.

I would change the routing so you announce both Prefixes, otherwise the first /24 has no redundancy. And kick the static route.
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 11:43 am

Ok i have deleted the static route, temporary to see if the BGP works.
Still the same.
But if i delete the static route and a BGP session also. It's working !

With 2 BGP i have 2 gateways but still one of them is in blue. Maybe i have to do some extra settings ?

Image
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Thu Jun 06, 2013 11:53 am

I can't open the pic, so I can't see anything.
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 11:54 am

I can't open the pic, so I can't see anything.
http://hostpicture.eu/upload/big/2013/0 ... be23ba.png
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Thu Jun 06, 2013 12:01 pm

I can't open the pic, so I can't see anything.
http://hostpicture.eu/upload/big/2013/0 ... be23ba.png
"No direct Link permitted"
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 12:07 pm

This is odd.I give up try the link below.

http://items.dhost.ro/pic/routing-table.png
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Thu Jun 06, 2013 12:23 pm

This looks strange. One of the default routes should be "A". I saw that you run RC7, maybe it's a bug. Is this device in production?
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 12:29 pm

Yes it is in production :(
Can this be because of the routing filters ? I don't understand exactly how it works.

I did this :

set isp1 out-filter=isp1-out
set isp2 out-filter=isp2-out

add chain=isp1-out prefix=myclass/24 action=accept
add chain=isp1-out action=discard

add chain=isp2-out prefix=myclass/24 action=accept set-bgp-prepend=3
add chain=isp2-out action=discard
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Thu Jun 06, 2013 12:41 pm

Yes it is in production :(
Can this be because of the routing filters ?
I don't think so.
I don't understand exactly how it works.

I did this :

set isp1 out-filter=isp1-out
set isp2 out-filter=isp2-out

add chain=isp1-out prefix=myclass/24 action=accept
add chain=isp1-out action=discard

add chain=isp2-out prefix=myclass/24 action=accept set-bgp-prepend=3
add chain=isp2-out action=discard
This limits the announcement to your /24 and prepends it on the link to ISP2. This ist OK. Most likely you will get the most of the traffic via ISP1.
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 12:45 pm

The distance for the isp 2 gateway should not be bigger that ISP1 ?
Maybe this is causing the problem.


PS: i have upgraded to: 6.0 (2013-May-17 14:04):
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Thu Jun 06, 2013 12:54 pm

The distance for the isp 2 gateway should not be bigger that ISP1 ?
Maybe this is causing the problem.
No, most likely not.

It should look like this:
You do not have the required permissions to view the files attached to this post.
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 1:11 pm

Ok, after a restart they are like that :lol: . But still can't ping my /24 block only if i disable one of the BGP peers.

Maybe i need the full world table from both ISP ? Because now i'm receiving only my country, but in my country the / 24 block works perfect.

Or maybe i have to tick an option here?

redistribute-connected=no
redistribute-ospf=no
redistribute-other-bgp=no
redistribute-rip=no
redistribute-static=no

I was reading smth on the forum if you have 2 peers you need to tick an option.
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Thu Jun 06, 2013 2:11 pm

Ok, after a restart they are like that :lol: .
That's a bug. Search in the forum for "stuck routes".
But still can't ping my /24 block only if i disable one of the BGP peers.
Does this happen to both peers or do you need to disable a specific peer.
Maybe i need the full world table from both ISP ? Because now i'm receiving only my country, but in my country the / 24 block works perfect.
The full table is not needed to make it work.
Or maybe i have to tick an option here?

redistribute-connected=no
redistribute-ospf=no
redistribute-other-bgp=no
redistribute-rip=no
redistribute-static=no

I was reading smth on the forum if you have 2 peers you need to tick an option.
No, you don't need that.

Try different Looking Glass sites to check if your prefix is there.
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 2:20 pm

Does this happen to both peers or do you need to disable a specific peer.
This is happening with both peers active. My /24 works perfectly fine, but only in my country.
Try different Looking Glass sites to check if your prefix is there.
How can i do that, can you give me a example ?
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Thu Jun 06, 2013 3:50 pm

I was saying before if i stop one peer the /24 block starts to work. But this works only to one of the providers.
Is it posible that the ISP have some limits to external ? thus making conflicts ?
Also it is possible that my AS is not propagated yet? i bought the AS 24 hours ago.
 
strg
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Sun Mar 07, 2010 4:01 am

Re: BGP load & backup

Fri Jun 07, 2013 12:59 pm

Fixed.
Providers fault ! :evil:
 
SwissWISP
Member Candidate
Member Candidate
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP load & backup

Fri Jun 07, 2013 1:52 pm

Fixed.
Providers fault ! :evil:
Ha! That's why I asked if this happens on a specific ISP.
But just to make sure you know about a bug in RouterOS: Sometimes, routes get stuck in the table (what you've seen -> None of the routes gets active and also some strange things).
I would advice you to follow the Forum posts about this issue and upgrade to the most recent Version of RouterOS as soon as this issue is fixed.

- Mat

Who is online

Users browsing this forum: No registered users and 13 guests