Page 1 of 1

IPv4/IPv6 dual-stack BGP issues

Posted: Sun Aug 16, 2009 8:22 pm
by liteforce
Hi,

Long-time Quagga user here albeit newbie RouterOS user - so please be gentle...

I have recently replaced three Quagga boxes with three Mikrotik RB1000 running RouterOS 3.28; our network currently runs IPv4 and IPv4 natively.

From what I can determine, IPv4 BGP works absolutely fine but when I try and add a IPv6 peer into the mix, the router is advertising the IPv4 prefixes learnt from another IPv4 peer to the IPv6 peer.

Config is below:
[admin@gh-gw1.spilsby.net.uk] > /routing bgp export
# jan/02/1970 21:52:44 by RouterOS 3.28
# software id = 0QXF-KE21
#
/routing bgp instance
set default as=43950 client-to-client-reflection=yes comment="" disabled=no ignore-as-path-len=no name=default out-filter="" \
    redistribute-connected=no redistribute-ospf=no redistribute-other-bgp=no redistribute-rip=no redistribute-static=no router-id=\
    79.98.39.101
/routing bgp network
add disabled=no network=79.98.32.0/21
add disabled=no network=2a01:568::/32
/routing bgp peer
add address-families=ip comment="" default-originate=never disabled=no hold-time=3m in-filter="" instance=default interface=ether4 \
    multihop=no name=gh-ipv4-full-ukgrid nexthop-choice=default out-filter=spilsby-ipv4 remote-address=89.21.0.13 remote-as=39757 \
    remove-private-as=no route-reflect=no tcp-md5-key="" ttl=default update-source=89.21.0.14
add address-families=ipv6 comment="" default-originate=never disabled=yes hold-time=3m in-filter="" instance=default interface=sit1 \
    multihop=no name=gh-ipv6-full-he nexthop-choice=default out-filter=spilsby-ipv6 remote-address=2001:470:14:95::1 remote-as=6939 \
    remove-private-as=no route-reflect=no tcp-md5-key="" ttl=default update-source=2001:470:14:95::2

[admin@gh-gw1.spilsby.net.uk] > /routing prefix-lists export
# jan/02/1970 21:56:57 by RouterOS 3.28
# software id = 0QXF-KE21
#
/routing prefix-lists
add action=accept chain=spilsby-ipv4 disabled=no invert-match=no prefix=79.98.32.0/32 prefix-length=21
add action=accept chain=spilsby-ipv6 disabled=no invert-match=no prefix=2a01:568::/128 prefix-length=32
Please note that I am explicitly specifying either IPv4-only or IPv6-only to the respective peers so I can't figure out why the BGP code in RouterOS is trying to advertise IPv4 networks to an IPv6 peer.

As the config shows above, the IPv6 peer is currently disabled - all looks normal:
[admin@gh-gw1.spilsby.net.uk] > /routing bgp advertisements print
PEER     PREFIX               NEXTHOP          AS-PATH                                                                ORIGIN     LOCAL-PREF
gh-ip... 79.98.32.0/21        89.21.0.14                                                                              igp       
Enabling the IPv6 peer shows the IPv4 routes learned from other IPv4 peers being advertised to the IPv6 peer - as below:
[admin@gh-gw1.spilsby.net.uk] > /routing bgp advertisements print
PEER     PREFIX               NEXTHOP          AS-PATH                                                                ORIGIN     LOCAL-PREF
gh-ip... 79.98.32.0/21        89.21.0.14                                                                              igp       
gh-ip... 170.35.228.0/22      0.0.0.0          39757,3257,7018,19540                                                  igp       
gh-ip... 65.163.214.0/24      0.0.0.0          39757,3257,174,19159                                                   igp       
gh-ip... 24.123.160.0/20      0.0.0.0          39757,3356,10796,12262                                                 igp       
gh-ip... 153.96.248.0/23      0.0.0.0          39757,3257,680                                                         incomplete
gh-ip... 93.92.248.0/21       0.0.0.0          39757,3257,12301                                                       igp       
gh-ip... 216.40.76.0/24       0.0.0.0          39757,3356,32479                                                       igp       
gh-ip... 66.185.180.0/24      0.0.0.0          39757,3356,12182,12182,12182,18730                                     igp       
gh-ip... 80.75.172.0/24       0.0.0.0          39757,3257,6453,36992,20858                                            igp       
gh-ip... 212.241.54.0/24      0.0.0.0          39757,3356,286                                                         igp       
gh-ip... 204.209.240.0/21     0.0.0.0          39757,3257,852                                                         igp       
gh-ip... 68.28.189.0/24       0.0.0.0          39757,3257,1239,10507                                                  igp       
gh-ip... 194.116.133.0/24     0.0.0.0          39757,3257,12887,12741,34377                                           igp       
<snip>
Also, it looks like IPv6 prefix lists are broken from other posts - are there any timescales from Mikrotik as to when this is likely to be fixed ?

Am I doing something incredibly stupid here or is this functionality currently known to be broken ?

Suggestions from others who have found a workaround would be very much appreciated!

Regards,
Terry Froy
Spilsby Internet Solutions

Re: IPv4/IPv6 dual-stack BGP issues

Posted: Sun Aug 16, 2009 9:54 pm
by Chupaka
if you think it's a bug - please send description among with supout.rif to support@mikrotik.com

Re: IPv4/IPv6 dual-stack BGP issues

Posted: Sun Sep 06, 2009 8:42 pm
by karyal
Hi,

Long-time Quagga user here albeit newbie RouterOS user - so please be gentle...
Same path here, ROS can be confusing sometimes when you're used to Quagga :D
I have recently replaced three Quagga boxes with three Mikrotik RB1000 running RouterOS 3.28; our network currently runs IPv4 and IPv4 natively.

From what I can determine, IPv4 BGP works absolutely fine but when I try and add a IPv6 peer into the mix, the router is advertising the IPv4 prefixes learnt from another IPv4 peer to the IPv6 peer.

...........

Suggestions from others who have found a workaround would be very much appreciated!

Regards,
Terry Froy
Spilsby Internet Solutions
Uhm.. if you're running dual stack and all the network is running on ROS, create a peer between the ROS boxes and select both ip and ipv6 as address family, ROS will propagate v4 and v6 prefixes over the same session.
If you're peering one of the boxes with a non MT box create two different peers, as you did, one on the ipv6 address, one on the ipv4 address. Please note that ipv6 behaviour tends to change between versions, as ROS evolves, so what you see working on 3.28 may not on 3.17

Re: IPv4/IPv6 dual-stack BGP issues

Posted: Tue Sep 08, 2009 12:32 pm
by Eising
You're making me worried! What version have you tested this filtering with?

Re: IPv4/IPv6 dual-stack BGP issues

Posted: Tue Sep 08, 2009 12:38 pm
by karyal
You're making me worried! What version have you tested this filtering with?
If you exlcude the route bgp crash bug that may affect you (which is not ipv6 related though), ROS 3.27 works fine with ipv6.
ROS 3.30 also fixes the bgp crash bug (or at least greatly greatly reduces it, as we experienced just one crash in a week of test). No worry :D

Re: IPv4/IPv6 dual-stack BGP issues

Posted: Wed Sep 09, 2009 10:26 am
by mrz
Prefix lists are not broken. '/routing prefix-lists' can be used only for RIP;
for BGP filtering use '/routing filter'.

'/routing bgp advertisments print' sometimes show too much info - will be
fixed in future. For now use 'updates-sent' and 'withdrawn-sent' in peer
status to see the actual information on how many prefixes were sent out.