Community discussions

MikroTik App
 
itrack
just joined
Topic Author
Posts: 17
Joined: Sun Oct 08, 2023 10:57 am
Location: Localhost
Contact:

Router Internet Access via BGP

Sat Jul 06, 2024 4:28 am

I have a strange case and I can't find a solution.

I have 2 interfaces: SFP-ISP1 and SFP-ISP2, each interface has one BGP session through a private IP.
I have a Bridge: LAN-Bridge, in this Bridge is allocated the public ip class 81.x.x.x/24 , announced through BGP

The gateway in LAN-Bridge is assigned the IP 81.x.x.1.

LAN-Bridge users can use the Internet and public IPs without any problems, but Gateway 81.x.x.1 does not, I mean the router has no internet access for itself.

(I mention that SFP-ISP1 and SFP-ISP2 are stand-alone interfaces, not part of the LAN-Bridge)

How could I make this work?

Thank you!
 
itrack
just joined
Topic Author
Posts: 17
Joined: Sun Oct 08, 2023 10:57 am
Location: Localhost
Contact:

Re: Router Internet Access via BGP  [SOLVED]

Sat Jul 06, 2024 12:24 pm

I solved it, who would say that sometimes ChatGPT is not a brilliant service :)

Solution:
/routing filter rule
add chain=bgp-IN disabled=no rule=\
"if(dst in 0.0.0.0/0){set pref-src 81.x.x.1; accept;}"
 
clemaxidc
just joined
Posts: 4
Joined: Sat Aug 24, 2024 6:08 am

Re: Router Internet Access via BGP

Sat Aug 24, 2024 6:19 am

Hello, I have config same to you but I am able to connect to IP .1, not need user this: /routing filter rule
add chain=bgp-IN disabled=no rule=\
"if(dst in 0.0.0.0/0){set pref-src 81.x.x.1; accept;}"
Could you please show full rsc file ?