Community discussions

MikroTik App
 
jbar
just joined
Topic Author
Posts: 8
Joined: Sun Nov 12, 2017 8:46 pm

v7 Multi-home same ISP

Wed May 11, 2022 5:07 pm

I'm trying to setup a multi-home situation with two mikrotik routers that are v7. Each router has a port to our ISPs router and they have two ports and two routers each with BGP session running. Each router on our side has a cross-connect over on 192.168.99.0/24. I have iBGP sessions running on 192.168.99.0/24 sending RT05 the network of 222.222.222.200/29. I want RT05 to advertise that to DC RT 01 with the path prepending so it's a backup route if the physical connection drops between RT06->DC RT 01. I can see 222.222.222.200/29 in the route table for RT05, I setup a Router Filter of the below to prepend the path so the upstream routers only use it for a backup and set it on the connection output filter. Our provider lets us advertise our /29 to them via bgp.
if (dst in 222.222.222.200/29) {set bgp-path-prepend 1; accept }
Both 222.222.222.200/29 and 222.222.222.192/29 are in an address list the BGP connection is pointing to. Both are in the route table as well.

I'm on 7.2.3. I tried the dump-saved-advertisements and no file was created. output-keep-sent-attributes=yes currently.

What should I be checking for next steps to try to set this up. My first try of not announcing the route dropped the whole subnet from our upstream while I saw RT05 still had the route (222.222.222.200/29) listed in their route table.


DC RT 01 BGP connection details.
[admin@MikroTik] /routing/bgp/connection> print
Flags: D - dynamic, X - disabled, I - inactive 
 0   name="DC RT 01" 
     remote.address=111.111.111.121/30/32 
     local.address=111.111.111.122 .role=ebgp 
     routing-table=bgp templates=ISP as=64568 
     output.filter-chain=bgp_out .network=bgp-networks .keep-sent-attributes=yes 
You do not have the required permissions to view the files attached to this post.
 
pe1chl
Forum Guru
Forum Guru
Posts: 9010
Joined: Mon Jun 08, 2015 12:09 pm

Re: v7 Multi-home same ISP

Wed May 11, 2022 5:51 pm

set bgp-path-prepend does not work. Bug.
 
jbar
just joined
Topic Author
Posts: 8
Joined: Sun Nov 12, 2017 8:46 pm

Re: v7 Multi-home same ISP

Fri May 20, 2022 3:53 pm

Update.

My ISP had our /29 prefix set to on router each so announcing it was getting blocked from their own prefix filters. I asked, which I'm glad I did, and they updated their config on their cisco routers and a quick ping test showed I can swap primary routes just fine on the two connections.

Now, I have
if (dst in XXX.XX.XXX.XXX/29) {set bgp-path-prepend 2; accept }
as one of our BGP output filters, which has been mentioned it's a bug. The bug I ran into is that
dump-saved-advertisements 1 save-to=test_out.pcap
does nothing, even after setting the keep sent attributes flag on the connection. Maybe it's because it's the 2nd session? So I turned on the packet sniffer and disabled and enabled the subnet in the address list and Wireshark shows a BGP UPDATE message with the AS_PATH with 2 instead of one for that subnet.
 
pe1chl
Forum Guru
Forum Guru
Posts: 9010
Joined: Mon Jun 08, 2015 12:09 pm

Re: v7 Multi-home same ISP

Fri May 20, 2022 4:19 pm

The set-bgp-path-prepend does work, but only in output filters. The corresponding input filter set is set-bgp-path-peer-prepend.
Also note that the default action for route filters has changed from accept to reject. When you have converted your filters from RouterOS v6 you may need to add an accept at the end of each chain.

Who is online

Users browsing this forum: StreamlinkUK and 0 guests