Community discussions

MikroTik App
 
crosswind
newbie
Topic Author
Posts: 46
Joined: Tue Feb 18, 2020 3:47 pm

RouterOS vs BIRD, ROS won't install routes received via IBGP

Mon Sep 02, 2024 10:29 am

hello,

i'm trying to set up IBGP between RouterOS 7.15.3 on a CRS309 and BIRD 2.15.1 on FreeBSD 15.0. the BIRD system is directly connected to the CRS309 and they communicate via a VLAN interface.

the BIRD config looks like this:
protocol bgp csw1_v4 {
        local 10.1.2.2 as 64524;
        neighbor 10.1.2.1 internal;
        strict bind yes;
        direct;
        graceful restart yes;
        long lived graceful restart yes;
        enable extended messages yes;
        capabilities yes;
        advertise hostname yes;
        hold time 10;
        startup hold time 10;
        connect retry time 10;
        deterministic med yes;

        ipv4 {
                export all;
                import all;
                next hop self yes;
                aigp originate;
                gateway recursive;
                mandatory yes;
        };
}

protocol bgp csw1_v6 {
        local 2001:8b0:aab5:102::2 as 64524;
        neighbor 2001:8b0:aab5:102::1 internal;
        strict bind yes;
        direct;
        graceful restart yes;
        long lived graceful restart yes;
        enable extended messages yes;
        capabilities yes;
        advertise hostname yes;
        hold time 10;
        startup hold time 10;
        connect retry time 10;
        deterministic med yes;

        ipv6 {
                export all;
                import all;
                next hop self yes;
                aigp originate;
                gateway recursive;
                mandatory yes;
        };
}
the RouterOS config is like this:
[lexi@csw1.eden.le-fay.org] /routing/bgp> export
/routing bgp template
set default as=64524 disabled=no multihop=no output.network=bgp-networks .no-client-to-client-reflection=no router-id=10.1.2.1
/routing bgp connection
add as=64524 local.role=ibgp multihop=no name=willow-v4 nexthop-choice=force-self output.filter-chain=accept-all remote.address=10.1.2.2 router-id=10.1.2.2
add as=64524 input.filter="" local.role=ibgp multihop=no name=willow-v6 nexthop-choice=force-self output.filter-chain=accept-all remote.address=2001:8b0:aab5:102::2 router-id=10.1.2.2
[lexi@csw1.eden.le-fay.org] /routing/bgp> 
on the BIRD side, the BGP session comes up:
# birdc show proto
BIRD 2.15.1 ready.
Name       Proto      Table      State  Since         Info
device1    Device     ---        up     2024-05-24    
direct1    Direct     ---        up     2024-05-24    
kernel1    Kernel     master4    up     2024-05-24    
kernel2    Kernel     master6    up     2024-09-01    
static4    Static     master4    up     2024-05-24    
static1    Static     master6    up     2024-05-24    
radv1      RAdv       master6    up     2024-05-24    
yarrow     BGP        ---        up     07:16:05.942  Established   
amaranth   BGP        ---        up     07:16:06.810  Established   
witch      BGP        ---        up     2024-07-02    Established   
turnera    BGP        ---        up     2024-07-03    Established   
hemlock    BGP        ---        up     2024-08-25    Established   
csw1_v4    BGP        ---        up     08:21:55.081  Established   
csw1_v6    BGP        ---        up     08:19:55.244  Established   
and on the ROS side as well:
[lexi@csw1.eden.le-fay.org] /routing/bgp> session/print
Flags: E - established 
 0 E name="willow-v4-1" 
     remote.address=10.1.2.2 .as=64524 .id=81.187.73.117 .capabilities=mp,rr,em,gr,as4,err,llgr,fqdn .afi=ip .hold-time=10s .messages=110 .bytes=2269 .gr-time=120 .gr-afi=ip .eor=ip 
     local.role=ibgp .address=10.1.2.1 .as=64524 .id=10.1.2.2 .capabilities=mp,rr,gr,as4 .afi=ip .messages=86 .bytes=1634 .eor="" 
     output.procid=20 .filter-chain=accept-all 
     input.procid=20 .last-notification=ffffffffffffffffffffffffffffffff0015030604 ibgp 
     nexthop-choice=force-self multihop=yes hold-time=10s keepalive-time=3s340ms uptime=4m44s330ms last-started=2024-09-02 08:21:55 last-stopped=2024-09-02 08:21:55 prefix-count=0 

 1 E name="willow-v6-1" 
     remote.address=2001:8b0:aab5:102::2 .as=64524 .id=81.187.73.117 .capabilities=mp,rr,em,gr,as4,err,llgr,fqdn .afi=ipv6 .hold-time=10s .messages=170 .bytes=4790 .gr-time=120 .gr-afi=ipv6 .eor="" 
     local.role=ibgp .address=2001:8b0:aab5:102::1 .as=64524 .id=10.1.2.2 .capabilities=mp,rr,gr,as4 .afi=ipv6 .messages=122 .bytes=2318 .eor="" 
     output.procid=21 .filter-chain=accept-all 
     input.procid=21 .last-notification=ffffffffffffffffffffffffffffffff0015030604 ibgp 
     nexthop-choice=force-self multihop=yes hold-time=10s keepalive-time=3s340ms uptime=6m44s160ms last-started=2024-09-02 08:19:55 last-stopped=2024-09-02 08:19:55 prefix-count=0 
[lexi@csw1.eden.le-fay.org] /routing/bgp> 
however, ROS does not install any routes learned from IBGP:
[lexi@csw1.eden.le-fay.org] /routing/bgp> /ip/route/print
Flags: D - DYNAMIC; A - ACTIVE; c - CONNECT; H - HW-OFFLOADED
Columns: DST-ADDRESS, GATEWAY, DISTANCE
     DST-ADDRESS  GATEWAY  DISTANCE
DAcH 10.1.2.0/24  vlan102         0
[lexi@csw1.eden.le-fay.org] /routing/bgp> /ipv6/route/print
Flags: D - DYNAMIC; A - ACTIVE; c - CONNECT, s - STATIC; H - HW-OFFLOADED
Columns: DST-ADDRESS, GATEWAY, DISTANCE
#      DST-ADDRESS             GATEWAY             DISTANCE
0  AsH ::/0                    fd12:8247:3:300::1         1
  DAc  ::1/128                 lo                         0
  DAcH 2001:8b0:aab5:102::/64  vlan102                    0
  DAcH fd12:8247:3:300::/64    vlan300                    0
  DAcH fe80::%lan/64           lan                        0
  DAcH fe80::%vlan300/64       vlan300                    0
  DAcH fe80::%vlan102/64       vlan102                    0
  DAcH fe80::%vlan103/64       vlan103                    0
[lexi@csw1.eden.le-fay.org] /routing/bgp> 
this is despite the fact that tcpdump show BIRD advertising many routes, e.g. for IPv4 (10.1.2.1 is ROS, 10.1.2.2 is BIRD):
08:21:55.081744 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto TCP (6), length 135, bad cksum 0 (->60ad)!)
    10.1.2.2.179 > 10.1.2.1.40879: Flags [P.], cksum 0x187e (incorrect -> 0x2430), seq 112:195, ack 69, win 1120, options [nop,nop,TS val 1004956594 ecr 3980828330], length 83: BGP
        Update Message (2), length: 83
          Origin (1), length: 1, Flags [T]: IGP
          AS Path (2), length: 0, Flags [T]: empty
          Next Hop (3), length: 4, Flags [T]: 10.1.2.2
          Local Preference (5), length: 4, Flags [T]: 100
          Updated routes:
            0.0.0.0/0
            10.1.2.2/32
            81.187.47.193/32
            10.1.3.1/32
            10.1.6.1/32
            81.187.73.117/32
            10.64.0.0/16
            10.254.3.1/32
            10.255.0.21/32
08:21:55.081888 IP (tos 0xc0, ttl 255, id 27765, offset 0, flags [DF], proto TCP (6), length 52)
    10.1.2.1.40879 > 10.1.2.2.179: Flags [.], cksum 0x91ad (correct), ack 195, win 978, options [nop,nop,TS val 3980828330 ecr 1004956594], length 0
08:21:55.081901 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto TCP (6), length 224, bad cksum 0 (->6054)!)
    10.1.2.2.179 > 10.1.2.1.40879: Flags [P.], cksum 0x18d7 (incorrect -> 0x342f), seq 195:367, ack 69, win 1120, options [nop,nop,TS val 1004956595 ecr 3980828330], length 172: BGP
        Update Message (2), length: 64
          Origin (1), length: 1, Flags [T]: IGP
          AS Path (2), length: 0, Flags [T]: empty
          Next Hop (3), length: 4, Flags [T]: 10.1.2.2
          Local Preference (5), length: 4, Flags [T]: 100
          Community (8), length: 4, Flags [OT]: 64522:666
          Updated routes:
            172.16.0.0/12
            192.168.0.0/16
            81.187.47.192/28
            10.0.0.0/8
        Update Message (2), length: 85
          Origin (1), length: 1, Flags [T]: IGP
          AS Path (2), length: 0, Flags [T]: empty
          Next Hop (3), length: 4, Flags [T]: 10.1.2.2
          Local Preference (5), length: 4, Flags [T]: 100
          Accumulated IGP Metric (26), length: 11, Flags [O]: 
            AIGP TLV (1), length 11, metric 0
          Updated routes:
            10.1.3.0/24
            81.187.81.187/32
            10.1.6.0/24
            10.1.2.0/24
            81.187.47.192/29
            10.255.0.20/30
        Update Message (2), length: 23
          End-of-Rib Marker (empty NLRI)
can anyone see what i've done wrong here?

thanks!
 
crosswind
newbie
Topic Author
Posts: 46
Joined: Tue Feb 18, 2020 3:47 pm

Re: RouterOS vs BIRD, ROS won't install routes received via IBGP

Mon Sep 02, 2024 10:50 am

update: after disabling and re-enabling the BGP session on the MikroTik side, it magically started working. apparently restart on the BIRD side was not sufficient.
 
crosswind
newbie
Topic Author
Posts: 46
Joined: Tue Feb 18, 2020 3:47 pm

Re: RouterOS vs BIRD, ROS won't install routes received via IBGP

Mon Sep 02, 2024 11:07 am

update #2: after restarting BGP again, the CRS309 is again not receiving any routes. nothing in the config has changed other than adding a new local IP address.
 
uCZBpmK6pwoZg7LR
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Mon Jun 15, 2015 12:23 pm

Re: RouterOS vs BIRD, ROS won't install routes received via IBGP

Wed Sep 04, 2024 3:01 pm

update #2: after restarting BGP again, the CRS309 is again not receiving any routes. nothing in the config has changed other than adding a new local IP address.
I have it as well even between different mikrotiks on 7.15.3. routes from another ibgp just ignored but in my case also vpn4 route multiplicate and never removed even if remote peer physically disconnected. i can consider that bgp still not stable in ros 7

Who is online

Users browsing this forum: No registered users and 33 guests