Question about VLAN

Let’s say you have a Mikrotik switch with several VLANs inside of it (VLAN100, 200 and 300).

How can you put a DHCP server on a specific VLAN? There is no VLAN setting in the DHCP server.

Same thing with a bridge… can you connect a bridge to a specific VLAN that is present in the switch?

Probably I am not understanding the concept of VLANs properly…

Thanks…

Ummm, router or switch? SwitchOS does not include a DHCP server, so I have to assume you are talking about a router, and not a switch. what hardware?

Sure you can assign a DHCH server to a VLAN. If the VLAN exists, you can assign a DHCP server to the VLAN - it’s just another interface selection. I have several on one of RB750 routers.

You setup the switch menu VLAN to be able to talk to the cpu port as well as the physical ports it needs, then create the same vlan# under interfaces menu for the ‘master port’ of the switch. Assign that vlan interface to the dhcp server.

Check out Management IP configuration in this link:
http://wiki.mikrotik.com/wiki/Manual:Switch_Chip_Features

Edit: yes, you can then add that vlan interface to a bridge if needed.

It’s a CRS125, which is listed under “switches” on their routerboard.com website. That is why I called it a switch.

It’s not clear to me when we should create a virtual VLAN interface, or when we can just use the switch VLAN settings. Can someone clearify this for me?

For instance in example 2 of the above link, there is no virtual VLAN interface created. Let’s say I want to connect the red VLAN300 there with a DHCP server, then I need to create a virtual VLAN interface on the masterport, and put the DHCP server on that port? It can’t be done without creating a virtual VLAN interface?

Thanks guys.

Switch VLAN settings control what VLAN tags your switch will allow or process. Creating a VLAN interface creates it at the CPU, which is necessary for inter-VLAN routing. The CRS can do some limited routing, but its CPU isn’t strong enough for heavy use.

You need the internal virtual vlan set up and cpu authorized any time you want the vlan to send/receive information from the router… like dhcp assignments.

If you’re just routing the vlan through the switch and out another physical port, then there’s no need for the virtual interface.