multple vlans same dhcp subnet

Hello,

I am trying to learn how to set up my new HEX refresh and want to set up my network so I can have two vlans with the same network mask but dhcp give them different ranges in the subnet so I can keep my IOT devices in their own area while still being able to interact with them in the same subnet.

Default vlan (1):
DHCP server address 192.168.0.1
DHCP subnet 192.168.0.1/23
DHCP range: 192.168.0.5-192.196.0.254

IOT vlan (2):
DHCP server address 192.168.0.1
DHCP subnet 192.168.0.1/23
DHCP range: 192.168.1.2-192.198.1.254

The config on the router is the default one with ether3,ether4,ether5 in the same bridge and ether1 as my wan port, when I try to add the second range/vlan to the DHCP server it reports as invalid.
I have attached a support.rif file to help people check over my work.

Edit: fixed typo in DHCP range

For starters …
why create 2 VLANs yet overlapping subnets ?
Use 192.168.0.0/24 for first vlan
Use 192.168.1.0/24 for second vlan

Much easier.

You may want to read this nice tutorial:
http://forum.mikrotik.com/t/using-routeros-to-vlan-your-network/126489/1

Secondly: supout should NEVER be posted here. Only communicated towards support.

Instead of a supout for people to view, use the export function in CLI commands in winbox menu entry NEW TERMINAL.

/export file=anynameyouwish ( minus router serial number, any public WANIP information, vpn keys )

…and - as generic advice - don’t use VLAN1, it is used internally and can cause issues in a configuration.
Use (say) VLAN10 and VLAN20, instead.

ether2?

Instead of a supout, follow this post here:
http://forum.mikrotik.com/t/forum-rules/173010/1
and post your (anonymized) configuration.

The DHCP data you posted - maybe typos? - have ranges that makes no sense:
192.168.x.y-192.196.x.254 should be 192.168.x.y-192.168.x.254

Do you really-really need two /24 grouped into a /23, i.e. do you need 254 addresses for each?
Or you could do with two /25, with 126 usable ip addresses each, grouped into a “normal” /24?
I.e.:
192.168.0.1 - 192.168.0.126
and
192.168.0.129 - 192.168.0.254

First off thanks everyone for the feedback and deleting my support file I saw the files other where posting and google search said to do the support file but google was wrong, I am very new to Mikrotik and moving my network to it and learning the “flow/order” that they want you to go though in the configuration vs my old setup which was built/expanded over many the years.

A bit more about my thought process for the same subnet, a bunch of IOT items require you to be the same subnet as they use broadcast packets to discover and communicate with the management device or each other. With the two ranges in the same subnet I can connect the IOT devices to one wireless SSID and get an IP in one range that is blocking any egress traffic to the internet (unless I allow it thought the firewall) and the other SSID be used for all other normal devices while still allowing them to communicate with the IOT devices on the same subnet.

The idea of using vlan 1 was because that is the “default” vlan for untagged traffic on my switch so normal devices will “just work” and then the IOT network be a segregated vlan but that isn’t the suggested solution from the article and I will need to set my normal clients to a vlan.

Last note is I saw that someone asked about was eth2, that is reserved for my second internet connection but that is a future setup project as I don’t want to do all the changes at once.

My current plan is at follows:

  1. wipe current config just to start fresh
  2. Follow the “Switch with a separate router” guide that was posted but with the following changes:
  • Have the base/mgmt and the normal client on the same vlan (blue/10)
  • in the IOT vlan (green/20) setup omit setting an interface IP address (line 96 of router.rsc)
  • In the IOT vlan setup changing the DHCP pool to 192.168.1.2-192.168.1.254
  • stop on line 167 (will loop back to the security after everything is working at expected)
  1. set my access point to tag the IOT SSID to vlan 20 and normal client ssid to vlan 10
  2. on my switch set the physical ports to PVID 10 so they can communicate on the normal network minus ports used for wireless or connected to router as they are trucks
  3. verify that DHCP works on both SSIDs
  4. verify that both can access internet
  5. set up vlan security
    :sunglasses: set up firewall rule to block all outbound traffic from 192.168.1.2-192.168.1.254 then poke holes as needed