Hi,
I have two interfaces both with DHCP assigned DSL modems which assigns a public ip to each respective interface on the mik. There are two other interfaces (so a total of four) each has a different private subnet assigned to each interface. The problem I am experiencing is getting traffic from one subnet to go out a specified gateway, this is easy if if the ISP assigned address which are static but is not the case. Im using NAT masq and currently have both private subnets going out of one of the DHCP cliented gateways from the ISP. How can I tell which private subnet to go through specified gateways? One use this, another use that. Period.
Thank you for your time.
It sounds like you are trying to break this into two routers with each private network having its own dsl gateway?
If that is the case, why not set up two VLANs? Each vlan will have its own WAN gateway and its own LAN port with private network. Then set up an access list to keep each separated.
Tom
Greetings!
If ether1 and ether2 are the public interfaces, then
/ip firewall nat
add chain=srcnat action=masquerade src-address=192.168.0.0/24 out-interface=ether1
add chain=srcnat action=masquerade src-address=192.168.2.0/24 out-interface=ether2
I used ether3 net=192.168.0.0/24 and ether4 net=192.168.2.0/24.
EDIT: I guess you could use this too. I have not tried this:
/ip firewall nat
add chain=srcnat action=masquerade in-interface=ether3 out-interface=ether1
add chain=srcnat action=masquerade in-interface=ether4 out-interface=ether2