Community discussions

MikroTik App
 
User avatar
grzesjan
Member Candidate
Member Candidate
Topic Author
Posts: 144
Joined: Fri Feb 24, 2006 7:43 pm
Location: Poland

Some questions - bgp and routing

Fri May 05, 2006 8:28 pm

I'm rather new user to Mikrotik, I have read all docs and some questions are still unanswered:

- why bgp has so poor performance?
- why bgp does not see restart of a peer? I have to refresh the peer
manualy on Mikrotik every time I reset its peer
- how to check what prefixes are announced to peer?
- why routing table performance is so poor? (for example - list 180.000
entries, remove some etc)
- is it possible to do ttl checking of packets?
- how to make network definition in bgp instance
- how to make null interface
- [admin@krk-r1] > /ip route remove 14235
item number too large
what to do with the above problem?
- how to list only static routes?

I use MikroTik RouterOS 2.9.22 and routing-test package.
Thanks in advance for any help.
 
n3wwn
just joined
Posts: 22
Joined: Fri Oct 08, 2004 5:39 pm
Location: Greensburg, PA, USA
Contact:

Re: Some questions - bgp and routing

Fri May 05, 2006 10:07 pm

Hi!

I'll try to answer some of your questions below:
- why bgp has so poor performance?
What do you mean by "poor" performance? We're using BGP to our upstream providers without any issues (although we're only accepting the default route and not a full table).
- why bgp does not see restart of a peer? I have to refresh the peer
manualy on Mikrotik every time I reset its peer
This is something that haunted us for quite some time, until we debugged it with our upstream provider and saw that the timers weren't decrementing.

Access the CLI:
/routing bgp peer
print detail
Chances are there are no hold-timer or keepalive-timer references there (or they're set to 0 or something).

Set the hold-timer to 60 and the keepalive timer to 20 in order to emulate the timers on a Cisco device.
set 0 hold-timer=60 keepalive-timer=20
- how to check what prefixes are announced to peer?
You used to be able to access Quagga via telnet from the localhost on 2.8.xx, but 2.9.xx appears to have done away with that access to BGP.

You can view the networks you have in
/routing bgp network print detail
and also check your prefix lists that you may have attached for inbound or outbound advertisements.
- why routing table performance is so poor? (for example - list 180.000
entries, remove some etc)
- is it possible to do ttl checking of packets?
- how to make network definition in bgp instance
I don't have any info on these...
- how to make null interface
I don't know if this is recommended, but I've created a bridge interface without any ports being assigned to it in order to simulate a null interface.
- [admin@krk-r1] > /ip route remove 14235
item number too large
what to do with the above problem?
You cannot (at least on 2.8.xx) remove a dynamic route. If you wish to prevent a route learned via BGP from being injected into your table, use prefix lists to deny it.
- how to list only static routes?

I use MikroTik RouterOS 2.9.22 and routing-test package.
Thanks in advance for any help.
You could use some scripting:
:foreach route in [/ip route find static=yes] do [/ip route print from=$route]
Not pretty, but it could get you started to what you're trying to find.

-Rich
 
User avatar
grzesjan
Member Candidate
Member Candidate
Topic Author
Posts: 144
Joined: Fri Feb 24, 2006 7:43 pm
Location: Poland

Re: Some questions - bgp and routing

Fri May 05, 2006 10:33 pm

Hi!
- why bgp has so poor performance?
What do you mean by "poor" performance? We're using BGP to our upstream providers without any issues (although we're only accepting the default route and not a full table).
I mean that I have Pentium III 1.7 GHz machine with Mikrotik and whole BGP list is loaded about 30 minutes!!! Quagga on the same machine loads all prefixes in abount 30 seconds.
- why bgp does not see restart of a peer? I have to refresh the peer
manualy on Mikrotik every time I reset its peer
Set the hold-timer to 60 and the keepalive timer to 20 in order to emulate the timers on a Cisco device.
set 0 hold-timer=60 keepalive-timer=20
Thanks, that should be helpful, however I think that mikrotik should see tcp reset packets and imidiatly reset the session not waiting to time out.
- how to check what prefixes are announced to peer?
You used to be able to access Quagga via telnet from the localhost on 2.8.xx, but 2.9.xx appears to have done away with that access to BGP.
You can view the networks you have in
/routing bgp network print detail
and also check your prefix lists that you may have attached for inbound or outbound advertisements.
That is not the answer. For now Mikrotik is amateur and cannot act a professional router. Such router needs sh ip bg nei X.Y.W.Z ad command and full other bgp functionality.
- how to make null interface
I don't know if this is recommended, but I've created a bridge interface without any ports being assigned to it in order to simulate a null interface.
It's still a trick or hack, I prefer using documented solutions.
- [admin@krk-r1] > /ip route remove 14235
item number too large
what to do with the above problem?
You cannot (at least on 2.8.xx) remove a dynamic route. If you wish to prevent a route learned via BGP from being injected into your table, use prefix lists to deny it.
No, the route number 14235 was static - I have checked it :)
But Mikrotik does not accept the input.
- how to list only static routes?
You could use some scripting:
:foreach route in [/ip route find static=yes] do [/ip route print from=$route]
Not pretty, but it could get you started to what you're trying to find.
Thanks, that should be helpful!

Gregor
 
n3wwn
just joined
Posts: 22
Joined: Fri Oct 08, 2004 5:39 pm
Location: Greensburg, PA, USA
Contact:

Re: Some questions - bgp and routing

Tue May 09, 2006 6:23 pm

I mean that I have Pentium III 1.7 GHz machine with Mikrotik and whole BGP list is loaded about 30 minutes!!! Quagga on the same machine loads all prefixes in abount 30 seconds.
Sorry, can't help you there. We only accept the default route from our upstream peers (one per city) and redistribute that default route with a lower priority to the other cities. That way the upstream for a city is always it's upstream peer and falls back to our fiber between cities if the upstream peer fails.
Set the hold-timer to 60 and the keepalive timer to 20 in order to emulate the timers on a Cisco device.
set 0 hold-timer=60 keepalive-timer=20
Thanks, that should be helpful, however I think that mikrotik should see tcp reset packets and imidiatly reset the session not waiting to time out.
I'm not an authority on BGP, but from what I understand, BGP does not maintain an established connection.

The keepalive-timer sends out a keepalive packet to the remote host upon expiration if no packets have been received from the remote host. Any packets received from the remote host reset the keepalive-timer.

The hold-timer sets how long can go between received packets from the peer before closing the session due to keepalive failure.

Setting hold-timer to 60 and keepalive-time to 20, 2 keepalive packets will be sent to try to establish that the BGP session is still up. If, after 60 seconds, no reply is received, BGP drops the session.
That is not the answer. For now Mikrotik is amateur and cannot act a professional router. Such router needs sh ip bg nei X.Y.W.Z ad command and full other bgp functionality.
I agree that a command line interface to the BGP and OSPF functions is necessary... and was provided (though not actually documented - like the hold-timer and keepalive-timer) in RouterOS 2.8.xx, but has been removed in 2.9.xx to my knowledge.
- how to make null interface
I don't know if this is recommended, but I've created a bridge interface without any ports being assigned to it in order to simulate a null interface.
It's still a trick or hack, I prefer using documented solutions.
The null interface on a Cisco (or other router) is the same kind of trick or hack... It's an interface that not used for actual traffic. You create one on a Cisco and reference it as Null0 (or whatever) and I create one on a MikroTik and reference it as null. Granted, it is not an official "null interface", but performs the exact same function.

After all, this is just my advice and/or opinions... take them or leave them :wink:
No, the route number 14235 was static - I have checked it :)
But Mikrotik does not accept the input.
Ah... perhaps the remove command is looking for a different integer size than the add/print commands or something. That would have to be resolved by MikroTik support. But, you could get the route reference using a technique like below for finding all the static routes and remove it by reference instead of route number.
You could use some scripting:
:foreach route in [/ip route find static=yes] do [/ip route print from=$route]
Not pretty, but it could get you started to what you're trying to find.
Thanks, that should be helpful!
Yes, the scripting is quite powerful (for a CLI) on the MikroTiks. Allows you to script almost anything that you can do manually, if you know the steps to take to get the desired result.

Good luck!

-Rich
 
User avatar
grzesjan
Member Candidate
Member Candidate
Topic Author
Posts: 144
Joined: Fri Feb 24, 2006 7:43 pm
Location: Poland

Re: Some questions - bgp and routing

Tue May 09, 2006 9:27 pm

I'm not an authority on BGP, but from what I understand, BGP does not maintain an established connection.
-Rich
It does. BGP uses TCP connections on port 179. When BGP router receives TCP reset it MUST close the session and clear all routes immediately!
It can't wait any second. I use Mikrotik not for fun. I want router, not a toy.
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: Some questions - bgp and routing

Tue May 09, 2006 9:31 pm

I'm not an authority on BGP, but from what I understand, BGP does not maintain an established connection.
-Rich
It does. BGP uses TCP connections on port 179. When BGP router receives TCP reset it MUST close the session and clear all routes immediately!
It can't wait any second. I use Mikrotik not for fun. I want router, not a toy.
Is a TCP RESET not causing the RIB to update? If it is not, send a bug report to mikrotik because it used to and should.

Who is online

Users browsing this forum: No registered users and 54 guests