Community discussions

MikroTik App
 
Rutzki89
just joined
Topic Author
Posts: 2
Joined: Fri Mar 18, 2016 8:10 pm

How to setup 2 different networks on one router with one gateway?

Fri Mar 18, 2016 8:29 pm

Hi,

we use a RB2011UiAS-2HnD-IN.

The first Eth-Port is the gateway.

I´ve tried to setup two different networks (work and guests).

Example:
1. Network:
Ethernet Ports 2-7
IP Range: 192.168.5.0/24

2. Network:
Ethernet Port 8-10
IP Range: 10.5.50.0/24

Both Networks should use Port 1 as Gateway. And they should not see each other.

Questions:
Is it somehow possible with one Router? If Yes, how :)?

Such things are new for me.

Sorry for my bad english (I´m from austria)

Best regards
Rutzki
 
User avatar
ShayanFiroozi
Member Candidate
Member Candidate
Posts: 281
Joined: Sat Jun 01, 2013 12:44 pm
Location: Bandar Abbas , Iran

Re: How to setup 2 different networks on one router with one gateway?

Sat Mar 19, 2016 12:37 am

Hi,

we use a RB2011UiAS-2HnD-IN.

The first Eth-Port is the gateway.

I´ve tried to setup two different networks (work and guests).

Example:
1. Network:
Ethernet Ports 2-7
IP Range: 192.168.5.0/24

2. Network:
Ethernet Port 8-10
IP Range: 10.5.50.0/24

Both Networks should use Port 1 as Gateway. And they should not see each other.

Questions:
Is it somehow possible with one Router? If Yes, how :)?

Such things are new for me.

Sorry for my bad english (I´m from austria)

Best regards
Rutzki

Hi ,
you can easily drop communication in IP/Firewall/Filter Rules


chain=forward action=drop src-address=192.168.5.0/24 dst-address=10.5.50.0/24 log=no log-prefix=""

chain=forward action=drop src-address=10.5.50.0/24 dst-address=192.168.5.0/24 log=no log-prefix=""
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: How to setup 2 different networks on one router with one gateway?

Sat Mar 19, 2016 3:36 pm

Example:
1. Network:
Ethernet Ports 2-7
IP Range: 192.168.5.0/24

2. Network:
Ethernet Port 8-10
IP Range: 10.5.50.0/24

Both Networks should use Port 1 as Gateway. And they should not see each other.
In the ethernet interfaces menu, set ports 8, 9, and 10 to have master-port=none

Then create a second lan bridge (name it something appropriate like GUEST)

Add the IP address and dhcp server for the second network to the new bridge interface.
If your srcnat masquerade rule simply states that packets going out-interface=ether1, then this is good enough for both LANs. If it mentions IP addresses, I would modify it to only specify out-interface=ether1.

Forward filter rules - after the fasttrack/accept rules for connection-state=established,related , create a new rule:
action=drop out-interface=!ether1 (! means 'not' and is the little checkbox next to the interface selection in winbox.)
If you have a rule that accepts dstnat packets, then that rule should come before this new rule.

Done.
 
guileite
just joined
Posts: 2
Joined: Tue Apr 05, 2016 9:43 pm

Re: How to setup 2 different networks on one router with one gateway?

Wed Apr 06, 2016 2:52 pm

I have a similar question, but in my case i need that both networks have independent gateways. Routers are not really my thing and this is the first time using a Mikrotik hardware.

Something like:

Network 1
- Gateway ETH1 (Has its own valid IP)
- Port ETH2 (Connected to a switch)

Network 2
- Gateway ETH3 (Has its own valid IP)
- Port ETH4 (Connected to a switch)

I am substituting two routers for one RB2011 Ui AS-RM.
How can it be done?
 
User avatar
ShayanFiroozi
Member Candidate
Member Candidate
Posts: 281
Joined: Sat Jun 01, 2013 12:44 pm
Location: Bandar Abbas , Iran

Re: How to setup 2 different networks on one router with one gateway?

Wed Apr 06, 2016 7:11 pm

I have a similar question, but in my case i need that both networks have independent gateways. Routers are not really my thing and this is the first time using a Mikrotik hardware.

Something like:

Network 1
- Gateway ETH1 (Has its own valid IP)
- Port ETH2 (Connected to a switch)

Network 2
- Gateway ETH3 (Has its own valid IP)
- Port ETH4 (Connected to a switch)

I am substituting two routers for one RB2011 Ui AS-RM.
How can it be done?
Route marking and route policy,search them,tutorials are available
 
User avatar
ShayanFiroozi
Member Candidate
Member Candidate
Posts: 281
Joined: Sat Jun 01, 2013 12:44 pm
Location: Bandar Abbas , Iran

Re: How to setup 2 different networks on one router with one gateway?

Wed Apr 06, 2016 7:12 pm

I have a similar question, but in my case i need that both networks have independent gateways. Routers are not really my thing and this is the first time using a Mikrotik hardware.

Something like:

Network 1
- Gateway ETH1 (Has its own valid IP)
- Port ETH2 (Connected to a switch)

Network 2
- Gateway ETH3 (Has its own valid IP)
- Port ETH4 (Connected to a switch)

I am substituting two routers for one RB2011 Ui AS-RM.
How can it be done?
Route marking and route policy,search them,tutorials are available
 
guileite
just joined
Posts: 2
Joined: Tue Apr 05, 2016 9:43 pm

Re: How to setup 2 different networks on one router with one gateway?

Wed Apr 06, 2016 8:09 pm

I have a similar question, but in my case i need that both networks have independent gateways. Routers are not really my thing and this is the first time using a Mikrotik hardware.

Something like:

Network 1
- Gateway ETH1 (Has its own valid IP)
- Port ETH2 (Connected to a switch)

Network 2
- Gateway ETH3 (Has its own valid IP)
- Port ETH4 (Connected to a switch)

I am substituting two routers for one RB2011 Ui AS-RM.
How can it be done?
Route marking and route policy,search them,tutorials are available
Thanks, I will try those.

Who is online

Users browsing this forum: Bing [Bot], vingjfg, voltriq and 200 guests