Page 1 of 1

vlan with dhcp server

Posted: Tue Apr 12, 2016 5:14 am
by yaikun94
Hi guys,
I'm trying to config dhcp server with vlan on RB951UI.
Here is my config.
/interface vlan
#    NAME                     MTU ARP        VLAN-ID INTERFACE                                     
   R  vlan40                  1500 enabled         40 ether5   
/ip address
 #   ADDRESS            NETWORK         INTERFACE                                                                   
 3 D 50.0.0.3/24        50.0.0.0        ether1                                                                      
 5   40.0.0.1/24        40.0.0.0        vlan40    
/ip dhcp-server
 #   NAME       INTERFACE     RELAY           ADDRESS-POOL     LEASE-TIME ADD-ARP       
     vlan40     vlan40                        vlan40           10m 
I want my pc receive ip from vlan40 when i connect it using lan cable. But it's not worked. Did i do something wrong ?
Any ideas is helpful. Thanks in advance.

Re: vlan with dhcp server

Posted: Tue Apr 12, 2016 11:47 am
by JeremiahSims
DHCP servers centrally manage IP addresses and related information and provide it to clients automatically. This allows you to configure client network settings at a server, instead of configuring them on each client computer. If you want this computer to distribute IP addresses to clients, then configure this computer as a DHCP server.

Re: vlan with dhcp server

Posted: Tue Apr 12, 2016 3:54 pm
by pe1chl
I want my pc receive ip from vlan40 when i connect it using lan cable. But it's not worked. Did i do something wrong ?
Is your PC connected to vlan40?
Is it on a port that is sending vlan40 untagged or did you put some switch between them to remove the tag?
If not, this is not going to work.

Re: vlan with dhcp server

Posted: Wed Apr 13, 2016 5:04 am
by yaikun94
Is your PC connected to vlan40?
Is it on a port that is sending vlan40 untagged or did you put some switch between them to remove the tag?
If not, this is not going to work.
my pc connected to ether5 which has vlan40 on it. Yeah i think it's untagged. Can i remove the tag using only 1 router not adding one more switch ??

Re: vlan with dhcp server

Posted: Wed Apr 13, 2016 1:51 pm
by pe1chl
Show your config for ether5 and the VLAN.

Re: vlan with dhcp server

Posted: Thu Apr 14, 2016 4:59 am
by yaikun94
Show your config for ether5 and the VLAN.
my config on ether5 and vlan is exactly like my 1st post.
Interface vlan40 add to ether5 and i created dhcp server for vlan40.

Re: vlan with dhcp server

Posted: Thu Apr 14, 2016 8:13 am
by scampbell
Show your config for ether5 and the VLAN.
my config on ether5 and vlan is exactly like my 1st post.
Interface vlan40 add to ether5 and i created dhcp server for vlan40.
Unless your PC is using inserting Vlan Tags it will be looking for DHCP on ether5.

Use the Torch function with all options enabled (in Winbox) and a timeout of 30 seconds and see whether dhcp request are being tagged or not.

You can also take a spare Mikrotik and add your vlan40 to ether1 and then bridge vlan40 to a spare ethernet port for the PC. Plug this spare routers ether1 into you first routers ether5 and it should work.

Re: vlan with dhcp server

Posted: Thu Apr 14, 2016 9:34 am
by pe1chl
Show your config for ether5 and the VLAN.
my config on ether5 and vlan is exactly like my 1st post.
Interface vlan40 add to ether5 and i created dhcp server for vlan40.
Ahh... overlooked that.
In this case it is normal that it does not work, a PC will not use VLAN tagging by itself unless you
configure it to do so, which is normally not possible in Windows. (it requires a server-grade ethernet card)

On Linux it is possible by creating a vlan40 interface just like on the MikroTik.