Community discussions

MikroTik App
 
benjaminkah
just joined
Topic Author
Posts: 21
Joined: Tue Aug 07, 2018 1:16 pm

BGP problem after updating from V6.49 to 7.6

Tue Dec 06, 2022 4:22 pm

BGP problem after updating from V6.49 to 7.6
Last edited by benjaminkah on Thu Dec 08, 2022 11:50 am, edited 1 time in total.
 
User avatar
sirbryan
Member Candidate
Member Candidate
Posts: 298
Joined: Fri May 29, 2020 6:40 pm
Location: Utah
Contact:

Re: BGP problem after updating from V6.49 to 7.6

Tue Dec 06, 2022 5:01 pm

The biggest change in 6 to 7 is that RouterOS 6 filters, by default, allow all prefixes to go through unless you discard them. If you have filters enabled in RouterOS 7, they reject all prefixes unless you explicitly allow them.

You can start by adding all the prefixes you want the router to announce. Or, if your old rules were set to reject a couple routes and allow everything else, add an "accept;" rule at the end of the chain to make it 6 compatible.

Or, if you know you want to announce everything you have, a single "accept;" rule will cause it to announce everything that it receives via eBGP as well as announcing anything you've enabled (static, connected, etc.).
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: BGP problem after updating from V6.49 to 7.6

Tue Dec 06, 2022 5:03 pm

Can you post your config and the output of

routing/bgp/session/print detail
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: BGP problem after updating from V6.49 to 7.6

Tue Dec 06, 2022 6:33 pm

Reinstall routeros 6.49.7 and reload backup,
next time try another machine before upgrade to another os version one critical network component.
 
benjaminkah
just joined
Topic Author
Posts: 21
Joined: Tue Aug 07, 2018 1:16 pm

Re: BGP problem after updating from V6.49 to 7.6

Wed Dec 07, 2022 3:01 pm

CONFIG
 
User avatar
ingdaka
Trainer
Trainer
Posts: 452
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

Re: BGP problem after updating from V6.49 to 7.6

Thu Dec 08, 2022 1:01 pm

Here are my examples of BGP and Filters that Works: ISP -> My-EDGE-Router -> My-Core-Router
Filters
/routing filter rule
add chain=eBGP-IN disabled=no rule="if (dst == A.A.A.0/24) { reject; }"
add chain=eBGP-IN disabled=no rule="if (dst == B.B.B.0/24) { reject; }"
add chain=eBGP-IN disabled=no rule="if (dst == C.C.C.0/24) { reject; }"
add chain=eBGP-IN disabled=no rule="if (dst == D.D.D.0/24) { reject; }"
add chain=eBGP-IN disabled=no rule="if (dst == E.E.E.0/24) { reject; }"
add chain=eBGP-IN disabled=no rule="if (dst == 0.0.0.0/0) { set pref-src A.A.A.1; accept; }"
add chain=eBGP-OUT disabled=no rule="if (dst == A.A.A.0/24) { accept; }"
add chain=eBGP-OUT disabled=no rule="if (dst == B.B.B.0/24) { accept; }"
add chain=eBGP-OUT disabled=no rule="if (dst == C.C.C.0/24) { accept; }"
add chain=eBGP-OUT disabled=no rule="if (dst == D.D.D.0/24) { accept; }"
add chain=eBGP-OUT disabled=no rule="if (dst == E.E.E.0/24) { accept; }"
add chain=eBGP-OUT disabled=no rule="reject;"
add chain=iBGP disabled=no rule="if (dst in X.X.X.0/22 && dst-len >=25 && dst-len <= 32) { accept; }"
add chain=iBGP disabled=no rule="if (dst in E.E.E.0/24 && dst-len >=25 && dst-len <= 32) { accept; }"
add chain=iBGP disabled=no rule="if (dst == 0.0.0.0/0) { accept; }"
add chain=iBGP disabled=no rule="reject;"
BGP
/routing bgp template
add as=MyAS disabled=no name=MyISPName nexthop-choice=force-self output.keep-sent-attributes=yes router-id=10.255.255.1 routing-table=main
/routing bgp connection
add as=MyAS connect=yes disabled=no input.filter=eBGP-IN listen=yes local.role=ebgp multihop=no name=Provider nexthop-choice=force-self output.filter-chain=eBGP-OUT .keep-sent-attributes=yes .redistribute=static remote.address=10.100.102.121/32 .as=35047 router-id=10.255.255.1 routing-table=main templates=MyISPName
 
benjaminkah
just joined
Topic Author
Posts: 21
Joined: Tue Aug 07, 2018 1:16 pm

Re: BGP problem after updating from V6.49 to 7.6

Thu Dec 08, 2022 9:16 pm

We have managed to establish our BGP but we do not always have service on our private addresses as well as on the public addresses
we are posting a screenshot of our established BGP and another of our filters maybe we made a mistake somewhere.
You do not have the required permissions to view the files attached to this post.
 
User avatar
ingdaka
Trainer
Trainer
Posts: 452
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

Re: BGP problem after updating from V6.49 to 7.6

Thu Dec 08, 2022 9:54 pm

If you get 0.0.0.0/0 from providers you should accept 0.0.0.0/0 on filters!
 
macosoft
Frequent Visitor
Frequent Visitor
Posts: 76
Joined: Tue Jul 20, 2010 1:42 am

Re: BGP problem after updating from V6.49 to 7.6

Sun Jan 14, 2024 11:55 am

We have the same problem after updating from 6 to 7, but from router I have internet connection and I can ping websites.
The problem is that I don't have acces from our public ip networks (we have 2 networks /23).

The filters in ros6 are like this:
from_provider1 - prefix: x.x.96.0/23 (first public network) - action: discard
from_provider2 - prefix: x.x.96.0/23 (first public network) - action: discard
from_provider1 - prefix: x.x.98.0/23 (second public network) - action: discard
from_provider2 - prefix: x.x.98.0/23 (second public network) - action: discard
from_provider1 - prefix: 0.0.0.0/0 - action: accept
from_provider2 - prefix: none - action: accept
to_provider1 - prefix: x.x.96.0/23 (first public network) - action: accept
to_provider2 - prefix: x.x.96.0/23 (first public network) - action: accept
to_provider1 - prefix: x.x.98.0/23 (second public network) - action: accept
to_provider2 - prefix: x.x.98.0/23 (second public network) - action: accept
to_provider1 - prefix: none - action: discard
to_provider2 - prefix: none - action: discard

How should I change them in ros7 to work?
 
User avatar
vingjfg
Member Candidate
Member Candidate
Posts: 227
Joined: Fri Oct 20, 2023 1:45 pm

Re: BGP problem after updating from V6.49 to 7.6

Sun Jan 14, 2024 12:09 pm

Rule 3 in the screenshot should be in the form

If (condition) {actions;}
 
User avatar
vingjfg
Member Candidate
Member Candidate
Posts: 227
Joined: Fri Oct 20, 2023 1:45 pm

Re: BGP problem after updating from V6.49 to 7.6

Sun Jan 14, 2024 12:12 pm

Same for rule 1.

Who is online

Users browsing this forum: No registered users and 19 guests