Community discussions

MikroTik App
 
Gocik
just joined
Topic Author
Posts: 2
Joined: Wed Feb 14, 2024 12:39 pm

Source base routing with BGP

Wed Feb 14, 2024 1:47 pm

Good Day.
I'm using CCR1009-7G-1C-1S+, on which are established eBGP sessions (2 sessions per ISP, one for the default route and the second for local prefixes) with two different upstream ISPs (diagram attached, private ASN and prefixes are just for example, off course public are used in real configuration). My main objective is to pass the traffic for one prefix through ISP1 and for second prefix through ISP2. Currently, i have the working configuration - i'm advertising 10.0.0.0/24 to ISP1 and 10.0.1.0/24 to ISP2, thus manipulating with the inbound traffic. For outbound traffic - prefixes learned from ISP1 fall into the global routing table, prefixes learned from ISP2 are marked with VRF_ISP2 and also added the policy routing rule to achieve src based forwarding:
/ip route rule
add src-address=10.0.1.0/24 action=lookup table=VRF_ISP2
The scheme is working, however i need a solution the achieve the redundancy. In case of failure of one of the ISPs both prefixes shall be working on the second ISP.
Does anyone have an idea for such implementation?
Thank you.
 
User avatar
ahmdzaki18
just joined
Posts: 12
Joined: Fri Oct 06, 2023 7:52 pm
Location: Jakarta, Indonesia
Contact:

Re: Source base routing with BGP

Wed Feb 14, 2024 11:24 pm

Theres some ways to achieve that.

1. You can peer both isp without Route Rule and VRF, then edit your bgp peer connection with different router-id (will go with different instance) and you will see + sign on routing table showing multipath.

2. Also without vrf and Route Rule. You can add single dummy static route maybe 1.1.1.1/32 with multiple gateway to isp1 and isp2. Then edit both filter-in bgp to set gw 1.1.1.1; accept;. It will showing recursive and based multiple gateway, you achieve ecmp also.

3. Wait until MikroTik supported BGP Equal Cost Multipath officialy :)
 
Gocik
just joined
Topic Author
Posts: 2
Joined: Wed Feb 14, 2024 12:39 pm

Re: Source base routing with BGP

Thu Feb 15, 2024 1:19 pm

Thanks for your reply. As i understand this ways i can achieve ecmp. But actually what i need is to always route 10.0.0.0/24 traffic (both inbound and outbound) through ISP1 and 10.0.1.0/24 through ISP2 unless one of the peers fails.
 
User avatar
ahmdzaki18
just joined
Posts: 12
Joined: Fri Oct 06, 2023 7:52 pm
Location: Jakarta, Indonesia
Contact:

Re: Source base routing with BGP

Thu Feb 15, 2024 11:03 pm

Thanks for your reply. As i understand this ways i can achieve ecmp. But actually what i need is to always route 10.0.0.0/24 traffic (both inbound and outbound) through ISP1 and 10.0.1.0/24 through ISP2 unless one of the peers fails.
i assuming 10.0.0.0/24 is your downlink network owned by you and you have another prefix.
then do just like i said but only set routing rule only for 10.0.0.0/24 then advertise to ISP1 no prepend and to ISP2 with some prepend (maybe prepend 4 for sure).

Who is online

Users browsing this forum: massinia and 2 guests