Community discussions

MikroTik App
 
User avatar
gottin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 62
Joined: Fri Feb 25, 2005 8:33 am
Location: Bulgaria
Contact:

Is it a bug of BGP advertising?

Mon Oct 17, 2005 8:25 pm

Check this configuration:
/routing filter
0 chain=bgp-out prefix=84.22.28.0/24 action=accept
1 chain=bgp-out prefix=50.50.50.0/25 action=accept
2 chain=bgp-out prefix=0.0.0.0/0 action=discard

/routing bgp peer
0 remote-address=212.116.131.9 remote-as=29667 multihop=no in-filter="" out-filter=bgp-out keepalive-time=0s hold-time=0s ttl=1

/routing bgp instance
0 as=xxxxx router-id=212.116.131.13 redistribute-static=yes redistribute-connected=no redistribute-rip=no redistribute-ospf=no out-filter=""

/ip route pr from [find static=yes]
0 A S 50.50.50.0/24 r 212.116.131.13 vlan5
1 A S 84.22.28.64/26 r 212.116.131.13 vlan5
2 A S 84.22.28.128/25 r 212.116.131.13 vlan5
3 A S 0.0.0.0/0 0.0.0.0 r 212.116.131.9 200 vlan5

So, according to the bgp-out filter my MikroTik Router should advertise net 50.50.50.0/25, but not the whole 50.50.50.0/24

However the peer bgp Cicso router gets 50.50.50.0/24 advertised:

Command: show ip bgp neighbors 212.116.131.13 routes
Network Next Hop Metric LocPrf Weight Path
r>i50.50.50.0/24 212.116.131.13 100 0 ?
r>i84.22.28.64/26 212.116.131.13 100 0 ?
r>i84.22.28.128/25 212.116.131.13 100 0 ?

So , is it a bug of the BGP implementation. The tested MikroTik is version 2.9.6
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 986
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Fri Oct 21, 2005 3:23 pm

You forgot to specify prefix-length parameter.
 
User avatar
gottin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 62
Joined: Fri Feb 25, 2005 8:33 am
Location: Bulgaria
Contact:

Fri Oct 21, 2005 3:52 pm

10x Eugene.

I have one more question. Where should I put prefix-length?

In this rule: 1 chain=bgp-out prefix=50.50.50.0/25 action=accept or in separate one?
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 986
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Fri Oct 21, 2005 3:56 pm

Yup, in the same rule.

BTW, you should have /25 network in your RIB to be able to announce it.