Setting up RB750 to be a simple router

Hi,

Attached is a simple network diagram of what i want to do.

basicaly i want to give 3 different offices with in my building different ip ranges?

This is so i can watch the clients who are renting the rooms internet usage?

Office a:
ip
192.168.1.x

b:
192.168.2.x

c:
192.168.3.x

d:
192.168.0.x


So the main router /gateway is 192.168.0.1


So ether 1 will connect to that, then i want to have ether 2 ip as 192.168.1.1 adn then the appropriate dns server.



I know how to do all the ips and dns etc. Just how do i make it so that it is a router and converts the one ip range to the next.


So if any computer at office “A” uses the net. my network managign software before my modem must pick its source ip up as 192.168.1.1

Thanks
RB750 Routing nD.jpg

So your configuration on the RB750 is like:

/ip addr
ether1 = 192.168.0.2/24
ether2 = 192.168.1.1/24
ether3 = 192.168.2.1/24
ether4 = 192.168.3.1/24

/ip route
0.0.0.0/0 over 192.168.0.1

And now you want a client e.g. 192.168.1.129 to show up as 192.168.1.1 and so on?
While I don’t really understand why you want to do this, this is possible doing NAT:

/ip fire nat
add chain=srcnat in-int=ether2 out-int=ether1 action=src-nat to-addr=192.168.1.1
and so on...

BUT it requires your main gateway to have a route back to 192.168.0.0/16 over 192.168.0.2

Say office a has 5 computers,

The guy renting the office pays for internet and telephone lines.
So the software i use that watches his itnernet usage is based on ips, So i set it to the ip address of his router and then every pc hebind the router will come up as the routers ip address. so all the internet usage is under one account.


Thaks i will give that a try now.

is that code you gave me the exact code that i must type in. Cause the route one does not work.

What must i fill in in the GUI, winbox? terminal never works for me unless i have the exact code.

And when i create the NAT rule under firewall. it says some thing about

the ingoing interfaces matching not possible in output and post routing chains

what does this mean?

No, those were just examples and not real commands.

The second one was my bad.
It basically means you can’t use in-interface in srcnat.
The command should have been:

/ip fire nat
add chain=srcnat src-address=192.168.1.0/24 out-int=ether1 action=src-nat to-addr=192.168.1.1

And for the routes.

can you pls give me the exact command for terminal to trype in there.

Cause from your psuedo code i cant use the gui to get it to work>

And with the firewall, mus ti jsut create liek 4 NAT rules with all the different IP ranges?

Well you need one route on the RB750 to reach the Internet:

/ip route
add dst-addr=0.0.0.0/0 gatew=192.168.0.1

Keep in mind that this gateway needs a route back as mentioned above.

Will a normal gateway router do this??


and with the NAT rules, do i need one or a whole lot?

Will a normal gateway router do this??

Depends on the model…

and with the NAT rules, do i need one or a whole lot?

One for each network a,b,c.

OK COOL.

So

1 route rule,
5 Ip addresses
4 Nat rules

is that all i need.

is that all i need.

Depends.
Do you want the RB750 to act as a DHCP server?
Do you want the networks to communicate with each other?
You’ll probably want to add firewall rules.

No they donot need to talk to each other, they just need to have accees to the internet,
They must not be able to see each other ort any thing on MY network.

If you donot add the nat rule what will happen?