Page 1 of 1

NAT

Posted: Tue Jan 24, 2006 2:23 pm
by zack
If I have one LAN interface and 2 gateways. Can I have 2 IP addresses on the LAN interface and to do nat (masquerade) and load balancing.

If I have the following config will it work:

[admin@X] > ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.1.2/24 192.168.1.0 192.168.1.255 DSL
1 192.168.2.2/24 192.168.2.0 192.168.2.255 DSL
2 172.16.1.1/30 172.16.1.0 172.16.1.3 Inside


[admin@X] > ip firewall src-nat print
Flags: X - disabled, I - invalid, D - dynamic
0 src-address=10.0.0.0/8 out-interface=DSL action=masquerade


[admin@X] > ip route print
Flags: X - disabled, I - invalid, D - dynamic, J - rejected, C - connect, S - static, r - rip, o - ospf, b - bgp
# DST-ADDRESS G GATEWAY DISTANCE INTERFACE
0 S 0.0.0.0/0 r 192.168.1.1 1 DSL
---------------- r 192.168.2.1 DSL
1 S 10.0.0.0/8 r 172.16.1.2 1 Inside

Posted: Tue Jan 24, 2006 4:14 pm
by djape
Let me see did I understood...

You have to dsl lines for internet and you have one lan interface to your Local network?
You want to use two subnets on Local network, so one will go through one dsl line and another one will go through another dsl line?

Posted: Tue Jan 24, 2006 4:16 pm
by mezlo
If I read your post right, it looks like you're describing what I just got working this weekend. Look at this thread and see if it answer your question:

http://forum.mikrotik.com/viewtopic.php?t=6431

Mezlo

Not again

Posted: Tue Jan 24, 2006 5:20 pm
by zack
I have
1 x FastEthernet with 2 IP addresses 192.168.1.2 and 192.168.2.2

I want to do NAT on this interface and to load balance between 2 default gateways 192.168.1.1 and 192.168.2.1 connected on the same LAN segment

When send traffic to 192.168.1.1 NAT with address 192.168.1.2
and when send traffic to 192.168.2.1 NAT with address 192.168.2.2



Does this work or I must do it like all other times (to try)