Community discussions

MUM Europe 2020
 
robelder
just joined
Topic Author
Posts: 6
Joined: Fri Nov 06, 2009 12:57 am

Need Help w/Multiple Inet Feeds with static and Dynamic ones

Fri Nov 06, 2009 8:50 pm

Hello and thanks in advance. I have 4 internet connections comming into my building. 2 commercial cable accounts (1- 8/1 and 1- 10/2) I also have 2- 8/1 residential accounts that are dynamically assigned. I'm trying to setup load balancing and or routing via routing marks, but can't figure out the best way. We are replacing our old mikrotik router (x86) 4 port with a 9 port 532/564 one i bought a while back. I've upgraded to 4.2 and starting from scratch. We have been using simple queues forever and don't care if i stay with it or go to tree managed queues. (just more reading for me). Anyway, the problem is that when we setup DHCP client on the port that gets one of the dynamic cable modems it becomes the main gateway and i have to switch those i want to use the other (commercial account with Static IP assigned) by routing marks. Now we are adding another residential account and i would like to load balance or migrate people from one tower to one port and vice verse. I can't add a routing mark to the dhcp interface so this is a problem for me. If i choose interface, well, lets just say that did work very well at all. I can't bond the interfaces as my provider dosen't support it and my max account i can get is 10/2 that's why we use so many accounts. I have 8 tower locations and bridge them all back to my office and rout them here. Each tower or town we bring back is in it's own subnet. (example: Local is 10.2.1.1/24, next 10.3.1.1/24...10.6.1.1/24) any ideas would be greatly appreciated. I don't mind reading or looking things up, and i'm not asking for someone to jump in and do it. But trying to navigate the manual is not the easiest thing in the world. I haven't found any examples that deal with dynamic gateways, and the only way i can figure out how to do it is to use several routers as a pre interface then assign static on a second port on them then i can route to a designated gateway because I assigned it. (don't mean to ramble and i hope it made sense.)

Thanks again in advance,

confused.
 
robelder
just joined
Topic Author
Posts: 6
Joined: Fri Nov 06, 2009 12:57 am

Re: Need Help w/Multiple Inet Feeds with static and Dynamic ones

Wed Nov 11, 2009 10:48 pm

Ok, Mikrotik told me that the DHCP gateway will seldom change, so don't allow it to post to the route table automatically, but add it manually then i can add the routing mark. (Would really be nice if they added the feature to add a routing mark somewhere in the DHCP client for just such cases. But let me continue...) Well, that will work fine as long as they don't rotate my IP address to a different subnet, then I just change it accordingly. BUTTTTT, I have 2 commercial Accounts with Statics (no problem there) and 2 repeat 2 residential accounts which receive Dynamic Ip's through DHCP from my provider. Sooooooo the problem is that when I hook all up, i get a dynamic ip address on one of "72.152.98.15" and "72.152.98.187"....seeing my problem yet? They both have the same gateway. So I can't add an independant Route and specify Routing mark, cause they got to the same location. (playing with interface on the routing too, not sure if it will, but i'm desperate).

Ok, that all being said, I think i have a solution, but involves at least 1 more router. If i put a small router as in 3 port inbetween the Cable modem with the Dynamic Ip being assigned to one interface, assign another port with something like 10.0.0.1 and hook up one of the ports from my main router to the "Router bridging DHCP to Static"......then I can add the route and mark it because it is now PRIVATELY being assigned via the sedond router. And if need be, can do the same on the other DHCP Cable Modem we have as well...

Did that make sense and or do you think that is a viable solution to my situation?

Comeon guys, somebody leave some feed back.

Thanks,

Rob Elder (going bald quickly)
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8342
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Need Help w/Multiple Inet Feeds with static and Dynamic ones

Thu Nov 12, 2009 12:36 am

seeing my problem yet? They both have the same gateway. So I can't add an independant Route and specify Routing mark, cause they got to the same location.
use v3 + routing-test or v4

when adding gateway in Terminal, use 'gateway=address%interface' form
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
robelder
just joined
Topic Author
Posts: 6
Joined: Fri Nov 06, 2009 12:57 am

Re: Need Help w/Multiple Inet Feeds with static and Dynamic ones

Thu Nov 12, 2009 1:48 am

Thank you for responding. Not sure exactly what your answer is and how to implement it, but thank you very much for responding. I'm looking through terminal now and navigated to ip/route/add gateway/? and looked at the example. I understand that, but not exactly how to write the command. and if i do it that way, then do I need to add the routing mark somewhere next?

And if you don't mind, i have another question that is (hopefully) simple. I created routing rules under mangle. Example of this is all clients in the address list "residential-1" are marked with "Residential-1" routing mark which is applied to the interface assigned the same routing mark and passthrough is enabled. Now I have some clients in another list that I need to rout to the Commercial Side (But in the same IP range), so I added him in as another list "Jason's Clients", prerouting, mark routing Commercial-1, with passthrough. It works as long as i disable the other mangle rule which includes all ip's in the subnet of 10.3.1.0/24, but when I enable it (his ip is 10.3.1.20) he goes out the other rout. how do I move his mangle rule up the list or order. I thought i just used Drag and Drop, but can't. Did that make sense? And if you need, i can give you access to the router.

Thanks again for responding and your help.

Rob.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8342
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Need Help w/Multiple Inet Feeds with static and Dynamic ones

Thu Nov 12, 2009 1:29 pm

Thank you for responding. Not sure exactly what your answer is and how to implement it, but thank you very much for responding. I'm looking through terminal now and navigated to ip/route/add gateway/? and looked at the example. I understand that, but not exactly how to write the command. and if i do it that way, then do I need to add the routing mark somewhere next?
/ip route add dst-address=0.0.0.0/0 gateway=1.2.3.4%eth1 routing-mark=gw1
/ip route add dst-address=0.0.0.0/0 gateway=1.2.3.4%eth2 routing-mark=gw2
so now packets with 'gw1' routing mark will go to gateway 1.2.3.4 through the eth1 interface, etc.
I thought i just used Drag and Drop, but can't.
just sort the rules by rule order (click the first column's header)
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
jterry
just joined
Posts: 6
Joined: Fri May 08, 2009 3:44 pm

Re: Need Help w/Multiple Inet Feeds with static and Dynamic ones

Mon Nov 16, 2009 3:58 pm

I cannot put in a line like
ip route add dst-address=0.0.0.0/0 gateway=x.x.x.x%eth9 routing-mark=gw1

I get message saying invalid value for argument gw. :(
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5965
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Need Help w/Multiple Inet Feeds with static and Dynamic ones

Mon Nov 16, 2009 4:01 pm

Which version you have? If it is 3.x then make sure routing-test package is enabled.

Also make sure that eth9 is valid interface name.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], MSN [Bot] and 138 guests