Community discussions

MikroTik App
 
shubhamsoni2022
just joined
Topic Author
Posts: 4
Joined: Sat Dec 31, 2022 1:43 pm

BGP sharing between two routers in same network

Mon Jan 02, 2023 7:20 am

We have one ISP connection on two different routers Router-A and Router-B. both routers have multiple established BGP setup.
We have announced hundreds of IP networks on both routers under the BGP's, and its working fine.

Now the issue is that we want to used the IP network declared under Router-2 on Router-1 and vice-versa.
But i am not find any solution with my current structure.


Here is my current network diagram:

R1
*Router-1 (Mikrotik-CCR1036)*
*BGP-1*
WAN IP: 192.168.10.10/30
ASN: AS-101010
ISP ASN: AS-202020
Announce LAN IP 1: 103.100.100.0/23
Announce LAN IP 2: 103.100.102.0/23

*BGP-2*
WAN IP: 192.168.10.14/30
ASN: AS- 101011
ISP ASN: AS-202020
Announce IP 1: 103.100.104.0/23
Announce IP 2: 103.100.106.0/23
|
Switch-1
|
Server Rack-1

========================================
R2
*Router-2 (Mikrotik-RB4011)*
BGP-1
WAN IP: 192.168.10.18/30
ASN: AS- 101012
ISP ASN: AS-202020
|
Announce LAN IP 1: 103.200.202.0/23
Announce LAN IP 2: 103.200.204.0/23

*BGP-2*
WAN IP: 192.168.10.22/30
ASN: AS- 101013
ISP ASN: AS-202020
Announce IP 1: 103.200.206.0/23
Announce IP 2: 103.200.208.0/23
|
Switch-2
|
Server Rack-2
 
tomislav91
Member
Member
Posts: 303
Joined: Fri May 26, 2017 12:47 pm

Re: BGP sharing between two routers in same network

Wed Jan 11, 2023 2:18 pm

It sounds like you want to redistribute the IP networks that are announced under Router-2's BGP into Router-1's BGP, and vice versa. One way to accomplish this is to configure a routing protocol, such as OSPF or BGP, between the two routers, and then redistribute the BGP routes into the OSPF or BGP process on the other router.

For instance, let's say you want to redistribute Router-2's BGP-1's IP networks into Router-1's BGP-2. First, you would need to configure a routing protocol, such as OSPF, between Router-1 and Router-2. Next, on Router-2, you would need to redistribute the BGP routes into the OSPF process. Then on Router-1, you would configure a redistribution rule in BGP-2 to import the OSPF routes.

This way, Router-1 will be aware of Router-2's IP networks, and vice versa.
You would have to take into consideration how to filter the routes that you don't want to import.

Another alternative is to use a BGP Confederation, where both routers are part of the same ASN and they are able to exchange routing information under the same ASN without having to use OSPF or other IGP.

It's important to consider the impact that this type of configuration may have on your network before making any changes. This could generate unwanted loops if not configure properly. Make sure to test this in a lab environment before applying it in production.

Who is online

Users browsing this forum: No registered users and 11 guests