Community discussions

MikroTik App
 
gusarg
just joined
Topic Author
Posts: 2
Joined: Fri Nov 13, 2009 4:10 pm

Bandwidth control for hosting servers

Thu Dec 10, 2009 5:00 pm

Hello
I need to control bandwidth for some servers that are physically located in a datacenter.
Example: 79.28.22.200 up 256kbit, down 128kbit.

Now the ISP bring my a range of public IPs like 79.28.22.0/24 and I assign the IPs statically to each server. They are connected together to a switch that have in one port the ISP connection. The bandwidth is managed very basically thought the switch limiting the speed of each port.
The idea is to use a mikrotik to do something better. The first option was to configure each server with a private address and map each private address to each public address thought the use of dst-nat (out public to private) & src-nat (out private to public). The main problem of this is that each server must have a private address.

So I think in splitting the network in something like:

Network1 79.28.22.0/30 (79.28.22.1 router ISP & 79.28.22.2 ether1 mikrotik)
Netowork2 79.28.22.3 (79.28.22.4, .5, ... ,254)

There is any better way to do this? I don´t know what the datacenter have in the other point of our connection, i only plug a RJ45 to our switch to get connectivity.

Thanks for your help, and excuse for my english i´m spanish.
 
thiele
newbie
Posts: 44
Joined: Mon Jun 01, 2009 5:08 pm
Location: Curitiba - Brasil

Re: Bandwidth control for hosting servers

Fri Dec 11, 2009 3:11 pm

Hola,


In my opinion routing is better than nating at 90% of cases. In your case think the best choice is avoid
nat because you can do all the filter on mikrotik and keep resources of your mikrotik box for queues and
other jobs.

Splitting /24 you will have the following subnets:

79.28.22.0/30 (as u said)
and...
79.28.22.4/30
79.28.22.8/29
79.28.22.16/28
79.28.22.32/27
79.28.22.64/26
79.28.22.128/25

I don't know how many servers you have, but split will generete lots of lower prefixes, per ex. if you have more than
10 server you cannot put all of them inside the other /30 or /29 prefix, so think the best choice is call to your ISP
and ask if they can spare a /30 to make the connection and route all /24 to your mikrotik through that new /30.

Excuse for my english, I'm brazilian.


Jorge
 
gusarg
just joined
Topic Author
Posts: 2
Joined: Fri Nov 13, 2009 4:10 pm

Re: Bandwidth control for hosting servers

Mon Dec 14, 2009 6:50 pm

I have about 200 servers in the following ranges

Rango 1:
190.183.63.0/24
GW: 190.183.63.1
Bcast: 190.183.63.255
Mask: 255.255.255.0

Rango 2:
190.7.31.192/27
GW: 190.7.31.193
Bcast: 190.7.31223
Mask: 255.255.255.224

Rango 3:
200.85.152.0/21
GW: 200.85.152.1
Bcast: 200.85.152.??
Mask: 255.255.???.???

Rango 4:
190.7.63.0/24
GW: 190.7.63.1
Bcast: 190.7.63.255
Mask: 255.255.255.0

Rango 5:
190.183.60.0/28
GW: 190.183.60.81
Bcast: 190.183.60.95
Mask: 255.255.255.248

Now i don't use any routers, just only some administrable switches all conected between them.

One idea is to use only one mikrotik, and the other is to put some mikrotik for different networks. What do you think is the best solution?

Hola,


In my opinion routing is better than nating at 90% of cases. In your case think the best choice is avoid
nat because you can do all the filter on mikrotik and keep resources of your mikrotik box for queues and
other jobs.

Splitting /24 you will have the following subnets:

79.28.22.0/30 (as u said)
and...
79.28.22.4/30
79.28.22.8/29
79.28.22.16/28
79.28.22.32/27
79.28.22.64/26
79.28.22.128/25

I don't know how many servers you have, but split will generete lots of lower prefixes, per ex. if you have more than
10 server you cannot put all of them inside the other /30 or /29 prefix, so think the best choice is call to your ISP
and ask if they can spare a /30 to make the connection and route all /24 to your mikrotik through that new /30.

Excuse for my english, I'm brazilian.


Jorge