Community discussions

MikroTik App
 
va77
just joined
Topic Author
Posts: 2
Joined: Sat Jan 14, 2023 4:51 am

Thousands of routes

Sat Jan 14, 2023 5:01 am

Hi all, is it possible somehow to add about 14000 routes ?
Idea is devide the routes between two interfaces, routes (IP addrs) to first interface belongs to one country, rest of routes of all other countries - through the second interface.
I created a text file with ~14k commands "/ip route add dst-address=..." (which belong to one country), but seems it's not possible to execute into terminal.

Will be happy to get any reply.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2865
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: Thousands of routes

Sat Jan 14, 2023 11:54 am

Upload it as rsc file and execute it with
/import file=thenameofuploadedfile
Read this to prepare import file properly

viewtopic.php?p=606832#p606832
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Thousands of routes

Sat Jan 14, 2023 12:06 pm

Before you try to do this using static routes, first consider to use a routing protocol like BGP.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3255
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Thousands of routes

Sat Jan 14, 2023 12:52 pm

This problem screams BGP. But would BGP actually be more performant if the routes are fixed? I like to think so, but not sure myself.

I guess the alternative is a firewall address-list with mange rule to set/mark routing... but have to imagine that be slower than BGP or even static routes :import by script.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Thousands of routes

Sat Jan 14, 2023 1:22 pm

The advantage of using BGP is that you do not need to maintain this list of routes (which will change over time) in all the routers.
You will only need to feed them in from an external source.
 
va77
just joined
Topic Author
Posts: 2
Joined: Sat Jan 14, 2023 4:51 am

Re: Thousands of routes

Fri Jan 20, 2023 1:25 am

Thanks to all, I imported the file with commands and run it from terminal. Proccess took 25 minutes, but my old MikroTik with 1 cpu core and 64 mb ram deal with 14k routes without any issues. 15-20 mbps through l2tp tunnel+ipsec, great use for an old router.

Who is online

Users browsing this forum: GoogleOther [Bot], toffline, zdiv and 27 guests