Community discussions

MikroTik App
 
upviqq
newbie
Topic Author
Posts: 39
Joined: Thu Jun 02, 2016 10:18 am

One lan port with two subnets

Tue Jan 30, 2018 3:48 pm

Hi! I have one lan port connected to switch with one subnet 192.168.0.0/24 and dhcp server.
And I want to add second subnet 192.168.1.0/24 for some clients on the same switch with static addresses in that second subnet.
Is this possible?
 
Sob
Forum Guru
Forum Guru
Posts: 9120
Joined: Mon Apr 20, 2009 9:11 pm

Re: One lan port with two subnets

Tue Jan 30, 2018 4:34 pm

Yes, it will work. Just remember that there won't be any real isolation betweet two subnets, e.g. any dhcp client can simply set static address and access devices in other subnet. In case you'd have managed switch, you could use vlan to isolate subnets.
 
upviqq
newbie
Topic Author
Posts: 39
Joined: Thu Jun 02, 2016 10:18 am

Re: One lan port with two subnets

Tue Jan 30, 2018 4:49 pm

Yes, it will work. Just remember that there won't be any real isolation betweet two subnets, e.g. any dhcp client can simply set static address and access devices in other subnet. In case you'd have managed switch, you could use vlan to isolate subnets.
I'v tried to add second address to local bridge, but then I set address from that network on my pc it doesn't work. Can't ping gateway or anything else.
What is the right way to get my config working?
And I don't need isolation, just free to use subnet for temporaly cases.
 
tippenring
Member
Member
Posts: 304
Joined: Thu Oct 02, 2014 8:54 pm
Location: St Louis MO
Contact:

Re: One lan port with two subnets

Tue Jan 30, 2018 4:59 pm

The way you describe what you've done, it sounds right. What is your new IP address and subnet on the local bridge? What IP did you assign to the PC?
 
saper2
newbie
Posts: 29
Joined: Sun Jun 14, 2015 2:00 pm

Re: One lan port with two subnets

Tue Jan 30, 2018 5:04 pm


I'v tried to add second address to local bridge, but then I set address from that network on my pc it doesn't work. Can't ping gateway or anything else.
What is the right way to get my config working?
And I don't need isolation, just free to use subnet for temporaly cases.
If you're on win try switching network type to home or work ( but pings should work fine anyway).
This might be also a result of firewall dropping packets from unknown subnet but that's depends on your FW setup at router.

Too many if, need more data [emoji41]



Sent from my VTR-L29 using Tapatalk

 
Sob
Forum Guru
Forum Guru
Posts: 9120
Joined: Mon Apr 20, 2009 9:11 pm

Re: One lan port with two subnets

Tue Jan 30, 2018 5:05 pm

Nothing special is required. If you previously had e.g.:
/ip address
add interface=<LAN> address=192.168.0.1/24
and you added:
/ip address
add interface=<LAN> address=192.168.1.1/24
Then when you connect device with e.g. 192.168.1.2/24 (or 192.168.1.2/255.255.255.0 in Windows terms), you must be able to ping 192.168.1.1 from it, unless you have some firewall rules preventing that. And if you add 192.168.1.1 as that device's default gateway, the internet access will probably also work (but it depends on exact NAT rule used).
 
saper2
newbie
Posts: 29
Joined: Sun Jun 14, 2015 2:00 pm

Re: One lan port with two subnets

Tue Jan 30, 2018 5:05 pm


I'v tried to add second address to local bridge, but then I set address from that network on my pc it doesn't work. Can't ping gateway or anything else.
What is the right way to get my config working?
And I don't need isolation, just free to use subnet for temporaly cases.
If you're on win try switching network type to home or work ( but pings should work fine anyway).
This might be also a result of firewall dropping packets from unknown subnet but that's depends on your FW setup at router.

Too many if, need more data [emoji41]



Sent from my VTR-L29 using Tapatalk

 
upviqq
newbie
Topic Author
Posts: 39
Joined: Thu Jun 02, 2016 10:18 am

Re: One lan port with two subnets

Wed Jan 31, 2018 9:32 am

It works today, thanks.

Who is online

Users browsing this forum: Google [Bot], GoogleOther [Bot], svmk and 64 guests