Community discussions

 
drillstring
just joined
Topic Author
Posts: 13
Joined: Fri Aug 10, 2018 11:54 pm

Add DHCP server to VLAN???

Sat Aug 11, 2018 12:10 am

I hav set up a test set as per enclosed drawing and i cannot get the dhcp working on the vlan. I must do something wrong, but what????
mikrotik setup.png
RouterOS version 6.42.6
Router hAP lite

Internet access set to automatic on eth1 (gets IPp address etcetera from DHCP server from ISP)
Firewall router, NAT and DHCP are set

Local network IP address 192.168.88.1
Netmask 255.255.255.0/24
DHCP range 192.168.88.10-192.168.88.254

two smart switches are connected to port eth2 and eth3 (see drawing) and the tagged VLANs are connected by the following command

/interface bridge vlan add bridge=bridge1 tagged=ether2,ether3 vlan-ids=220,223,230
/interface bridge set bridge1 vlan-filtering=yes
The RouterOS makes a dynamic VLAN

When device A & B set with fixed IP's (in the same sub net) and connected to the VLAN 222 ports on the switches, communication is working.

I like to connect a DHCP server to this VLAN 222 but without succes.

I connected VLAN to the bridge1 in the interface list as follow:
/interface vlan add interface=bridge1 name=vlan222 vlan-id=222

and added IP address to the VLAN:
/ip address add address=192.168.222.1/24 interface=vlan222 network=192.168.222.0

made a pool for the DHCP server
/ip pool add name=dhcp-pool-vlan222 ranges=192.168.222.100-192.168.222.200

Added DHCP server and network (gateway not required yet)
/ip dhcp-server add name=dhcp-vlan222 interface=vlan222 address-pool=dhcp-pool-vlan222
/ip dhcp-server network add address=192.168.222.0/24

enabled the dhcp server via WinBox

Device A & B do net get an IP address from the router (device A & B are set to request an IP from a DHCP server)
You do not have the required permissions to view the files attached to this post.
Last edited by drillstring on Sat Aug 11, 2018 3:04 pm, edited 1 time in total.
English is not my native language, apologize for grammar and spelling mistakes
 
diddie17
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Thu Sep 14, 2017 8:53 pm
Location: UK

Re: Add DHCP server to VLAN???

Sat Aug 11, 2018 1:40 pm

Might just be a typo when you typed up the post, but the pool definition looks wrong -
made a pool for th eDHCP server
/ip pool add name=dhcp-pool-vlan222 ranges=192.169.222.100-192.168.222.200

I think the starting range should be 192.168.222.100 not 192.169.222.100
 
drillstring
just joined
Topic Author
Posts: 13
Joined: Fri Aug 10, 2018 11:54 pm

Re: Add DHCP server to VLAN???

Sat Aug 11, 2018 3:03 pm

Might just be a typo when you typed up the post, but the pool definition looks wrong -
made a pool for th eDHCP server
/ip pool add name=dhcp-pool-vlan222 ranges=192.169.222.100-192.168.222.200

I think the starting range should be 192.168.222.100 not 192.169.222.100

You are correct, it is a typo, in the setup i used 192.168.222.100. I updated the original post
English is not my native language, apologize for grammar and spelling mistakes
 
pe1chl
Forum Guru
Forum Guru
Posts: 5832
Joined: Mon Jun 08, 2015 12:09 pm

Re: Add DHCP server to VLAN???  [SOLVED]

Sat Aug 11, 2018 3:11 pm

You should add the bridge1 to the vlan222 as well (tagged). Just like was automatically done for vlan 1, see your picture.
Without that, you cannot connect the vlan222 subinterface to the bridge (you can, but it is not connected to the actual VLAN).
 
drillstring
just joined
Topic Author
Posts: 13
Joined: Fri Aug 10, 2018 11:54 pm

Re: Add DHCP server to VLAN???

Sat Aug 11, 2018 4:37 pm

You should add the bridge1 to the vlan222 as well (tagged). Just like was automatically done for vlan 1, see your picture.
Without that, you cannot connect the vlan222 subinterface to the bridge (you can, but it is not connected to the actual VLAN).

I have done as you mentioned and it is working, Thanks

vlan222 before.png
vlan222 after.png
You do not have the required permissions to view the files attached to this post.
English is not my native language, apologize for grammar and spelling mistakes

Who is online

Users browsing this forum: No registered users and 31 guests