Community discussions

MikroTik App
 
3BABY
just joined
Topic Author
Posts: 22
Joined: Fri Aug 20, 2010 3:44 am
Location: New Zealand

HELP with NAT config - Router to Router

Sat Feb 26, 2011 11:47 pm

Hi Guys,

im really strugling on how to work this out.. if anyone could point me in the right direction it would be much appreciated

so this is my problem. i have a router (lets say Router 1) with Vlans 1-6 and networks 10.10.1.0/24 to 10.10.6.0/24 on these vlans.. all on ether2 and hav my modem connected to ether 1.. this is working fine..

i also have another router (lets say Router 2) with vlans 11-16 and networks 192.168.1.0/24 to 192.168.6.0/24 on these vlans all on ether 1.. all my clients hang off a switch i have connected to the trunk on ether1.. this is working

what i want to do is NAT any traffic destined for the internet from Vlan 11 on Router 2 to go to Vlan 1 on Router 1 & any traffic destined for the internet on Vlan 12 on Router 2 to go to Vlan 2 on Router 1 .. and so on.. i cant work out how to do it..

i have successfully set ether 2, ether 3, ether 4 on Router 2 as DHCP clients and have Router 1 passing it an address on there respective networks and have set a NAT rule on Router2 to sourcenat say 192.168.1.0/24 to 10.10.1.2 and this works but as you would imagine.. i have now run out of ethernet ports on my router (Router2) (RB450G).. is there a way to do this over one cable between Router 1 to Router 2..

any help would be great.. :-)
 
3BABY
just joined
Topic Author
Posts: 22
Joined: Fri Aug 20, 2010 3:44 am
Location: New Zealand

Re: HELP with NAT config - Router to Router

Mon Feb 28, 2011 2:43 am

Anyone got any ideas on this? :-)
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: HELP with NAT config - Router to Router

Mon Feb 28, 2011 3:52 am

You're not really looking for a NAT solution, NAT is only tangentially related. You are looking to do policy routing. There are plenty of examples on the wiki (PCC for example, tho you'd assign routing marks based solely on source address/in-interface without the PCC matcher).

Whether interfaces are physical or logical (VLANs) is irrelevant to the configuration. Both kinds are treated the same in RouterOS.