Community discussions

MikroTik App
 
Life
just joined
Topic Author
Posts: 16
Joined: Tue Feb 13, 2007 1:23 pm

HELP!!! 2 IP and one GATEWAY

Sat Mar 03, 2007 10:47 am

Will it work?

/ ip address
add address=1.1.1.50/24 network=1.1.1.0 broadcast=1.1.1.255 interface=Local comment="" \
disabled=no
add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=Public2 \
comment="" disabled=no
add address=10.111.0.3/24 network=10.111.0.0 broadcast=10.111.0.255 interface=Public1 \
comment="" disabled=no
/ ip firewall mangle
add chain=prerouting in-interface=Local connection-state=new nth=1,1,0 \
action=mark-connection new-connection-mark=odd passthrough=yes comment="" \
disabled=no
add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \
new-routing-mark=odd passthrough=no comment="" disabled=no
add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 \
action=mark-connection new-connection-mark=even passthrough=yes comment="" \
disabled=no
add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \
new-routing-mark=even passthrough=no comment="" disabled=no
/ ip firewall nat
add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
to-ports=0-65535 comment="" disabled=no
add chain=srcnat connection-mark=even action=src-nat to-addresses=10.111.0.3 \
to-ports=0-65535 comment="" disabled=no
/ ip route
add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=even \
comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 comment="" \
disabled=no

:roll:
 
yogid
newbie
Posts: 27
Joined: Mon Dec 05, 2005 8:14 pm
Contact:

Mon Mar 05, 2007 7:39 pm

I think that will not work :?
I have the same problem, how to make load balancing on the same gatheway?!
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Tue Mar 06, 2007 8:31 am

first is would suggest that you DO NOT USE PUBLIC ADDRESSES

second maybe in this page you could find something useful:
http://wiki.mikrotik.com/wiki/Routing
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

The public IP

Tue Mar 06, 2007 5:22 pm

I think it is not going to work because you have to public IP-s of the same class. as you writte it down in your configuration:

add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=Public2 \
comment="" disabled=no
add address=10.111.0.3/24 network=10.111.0.0 broadcast=10.111.0.255 interface=Public1 \
comment="" disabled=no

the two IP-s, 10.111.0.2 and 10.111.0.3 are of the same class, on the same broadcast, they got to be different, like the second should be sth. like 10.111.1.2