Hi, everybody
I had (still have) some problems with MikroTik Router 2.9.10. Some sorted out, but for some I gave up.
So I’d like to share what is working and ask everybody for an advice howto make the best configuration for Internet Cafe - Game Centre.
Of course we need Transparent Web Proxy, HotSpot - (with manager), Shaping, Managed P2P trafic, MSN, Yahoo messengers and Skype working, and, and at last on-line Games working.
The main problems are: Shaping, P2P trafic, UDP trafic (for games).
We have 2 aDSL connections with very low (256Kbps) upload trafic each. Download for us is ok (3072Kbps) each.
My idea is to send all browsing trafic (80, 21 ports) and P2P through one modem, all games trafic through another.
All chating prgs I don’t deside yet. (Need Your help).
Ok, just quick look to the configuration:
[admin@MikroTik] > ip address pr
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.0.1/24 192.168.0.0 192.168.0.255 ether1
1 192.168.1.1/24 192.168.1.0 192.168.1.255 ether2
2 192.168.2.1/24 192.168.2.0 192.168.2.255 ether3
ether1 - Local
ether2 - Public (aDSL modem1)
ether3 - Public (aDSL modem2)
[admin@MikroTik] > ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf
# DST-ADDRESS PREFSRC G GATEWAY DISTANCE INTERFACE
0 ADC 192.168.0.0/24 192.168.0.1 ether1
1 ADC 192.168.1.0/24 192.168.1.1 ether2
2 ADC 192.168.2.0/24 192.168.2.1 ether3
3 A S 0.0.0.0/0 r 192.168.2.254 ether3
4 A S 0.0.0.0/0 r 192.168.1.254 ether2
So here you can see that aDSL modem2 is Default Gateway.
If you will put this two gateways by command (twice) ![]()
add gateway/ip route add gateway=1.2.3.4
it will not work, so I’ve put a rule.
[admin@MikroTik] > ip route rule print
Flags: X - disabled, I - inactive
0 routing-mark=games interface=ether2 action=lookup table=mdm1
Ok, We have a new routing table mdm1 and will try to send traffic through ADSL modem1 (not default).
- Somebody can ask “why not load-balancing?”. I do not why, but even load balancing is working well for browsing,
but for on-line games like Battlefield2, CounterStrike – no.
The connection with game server keeps disconnecting every time after few minutes.
May be someone can explain me, what’s up?
After I’d put this route rule MikroTik has died for my local network (no ping) – winbox was just disconected. But DHCP was still working. Every computer could receive address from MT (it was
magic). So I took it out and last gateway from MT console.
So I’ve put mangle rules, than route rule, than gateway in table mdm1. Now ping is OK-- MikroTik accesible from the LAN ![]()
[admin@MikroTik] > ip firewall mangle print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting src-address=192.168.0.131 action=mark-routing
new-routing-mark=games passthrough=yes
1 chain=prerouting src-address=192.168.0.132 action=mark-routing
new-routing-mark=games passthrough=yes
.
.
.
Wow, I almost forgot…
Mascarading… ![]()
[admin@MikroTik] > ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=dstnat protocol=tcp dst-port=80 src-address-list=users
action=redirect to-ports=3128
1 chain=srcnat out-interface=ether2 action=masquerade
2 chain=srcnat out-interface=ether3 action=masquerade
[admin@MikroTik] > ip firewall address-list print
Flags: X - disabled, D - dynamic
# LIST ADDRESS
0 users 192.168.0.0/24
So idea to divide a traffic is very simple:
- All traffic will go through second gateway (not default) because of prerouting,
but port 80 (browsing) will go through default GW, because of redirect port 80 to proxy …
and proxy is working through default gw.
Only this configuration is working at the moment, nothing else ![]()
I tried mark routing in another way, for instance, P2P
or port 21 - not working.
Only addresses:
[admin@MikroTik] > ip firewall mangle print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting src-address=192.168.0.131 action=mark-routing
new-routing-mark=games passthrough=yes
1 chain=prerouting src-address=192.168.0.132 action=mark-routing
new-routing-mark=games passthrough=yes
.
.
.
Why? Something is wrong? I do not know. ![]()
Any ideas?
All the best for everyone.