Community discussions

MikroTik App
 
K0IBM
just joined
Topic Author
Posts: 7
Joined: Mon Apr 11, 2016 8:11 pm
Location: Denver, Colorado, USA
Contact:

Seperate DHCP Servers for Trunked VLAN's

Sun Apr 25, 2021 11:25 pm

Good Day, I have a network setup that has 4 routers installed in it. 3 are in bridge mode and the 4th is in router mode. I have 3 Vlans setup 1, 50 and 70. I also have 3 DHCP Servers setup. The problem I am having is that devices on VLAN50 and VLAN70 are not getting DHCP address on any of the switches. The DHCP Server on VLAN1 is working.

For ease of viewing I have included the VLAN and DHCP portions of each config below and full exports of each device as an attachment.

The Vlans are working I can see all attached devices across each VLAN on all the switches.
I can't see device across VLAN's

I need some help with the DHCP configuration for VLAN50 and VLAN70. I have looked at it for so long now that I just can't see what I have done wrong.

Thanks in advance for any help you can provide.

Device 1 is an RB4011iGS+HacQ2HnD the Wireless and ports 1-5 are on Vlan 1, Ports 6-10 are on Vlan 50 and the SPF+ 10Gbe port is a trunk carrying Vlan 1 and 50. All ports are definded to bridge tr-bridge.

/interface bridge vlan
add bridge=br-trunk tagged=sfp-sfpplus1 untagged=\
ether1,ether2,ether3,ether4,ether5,wlan1,wlan2 vlan-ids=1
add bridge=br-trunk tagged=sfp-sfpplus1 untagged=\
ether6,ether7,ether8,ether9,ether10 vlan-ids=50


Device 2 is a CRS328-24P-4S+ it is in Router mode. Ether1 is the WLAN , Ports 2-8 are in VLAN1, Ports 9-16 are in Vlan 50, Ports 17-24 are in Vlan70. SFPPlus1-4 are 10Gbe Trunk Ports. All ports are in bridge = tr-bridge.

/interface bridge vlan
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether2,ether3,ether4,ether5,ether6,ether7,ether8 vlan-ids=1
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether9,ether10,ether11,ether12,ether13,ether14,ether15,ether16 vlan-ids=50
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether17,ether18,ether19,ether20,ether21,ether22,ether23,ether24 vlan-ids=70


The DHCP server for VLAN1 is running here.

/ip address
add address=172.30.10.203/24 interface=br-trunk network=172.30.10.0
/ip dhcp-client
add disabled=no interface=ether1
/ip dhcp-server network
add address=172.30.10.0/24 gateway=172.30.10.203 netmask=24


Device 3 is a CRS238-24P-4S+ in Bridge Mode. Ports 1-12 are in VLAN1, Ports 13-18 are in Vlan 50, Ports 19-24 are in Vlan70. SFPPlus1-4 are 10Gbe Trunk Ports. All ports are in bridge = tr-bridge.

/interface bridge vlan
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether13,ether14,ether15,ether16,ether17,ether18 vlan-ids=50
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether19,ether20,ether21,ether22,ether23,ether24 vlan-ids=70
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged="ether1,ether\
2,ether3,ether4,ether5,ether6,ether7,ether8,ether9,ether10,ether11,ether12\
" vlan-ids=1

Device 4 is a CRS238-24P-4S+ in Bridge Mode. Ports 1-8 are in VLAN1, Ports 9-16 are in Vlan 50, Ports 17-24 are in Vlan70. SFPPlus1-4 are 10Gbe Trunk Ports. All ports are in bridge = tr-bridge.
/interface bridge vlan
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether1,ether2,ether3,ether4,ether5,ether6,ether7,ether8 vlan-ids=1
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether9,ether10,ether11,ether12,ether13,ether14,ether15,ether16,vlan50 \
vlan-ids=50
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether17,ether18,ether19,ether20,ether21,ether22,ether23,ether24,vlan70 \
vlan-ids=70
/ip pool
add name=dhcp_pool_70 ranges=172.30.70.10-172.30.70.199
add name=dhcp_pool_50 ranges=172.30.50.10-172.30.50.199
/ip dhcp-server
add address-pool=dhcp_pool_70 disabled=no interface=vlan70 name=dhcp70
add address-pool=dhcp_pool_50 disabled=no interface=vlan50 name=dhcp50
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether9,ether10,ether11,ether12,ether13,ether14,ether15,ether16,vlan50 \
vlan-ids=50
add bridge=br-trunk tagged=\
sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4 untagged=\
ether17,ether18,ether19,ether20,ether21,ether22,ether23,ether24,vlan70 \
vlan-ids=70

This Device is also running 2 DHCP servers for Vlan50 and Vlan70
/ip address
add address=172.30.10.200/24 interface=ether2 network=172.30.10.0
add address=172.30.50.1/24 interface=vlan50 network=172.30.50.0
add address=172.30.70.1/24 interface=vlan70 network=172.30.70.0
/ip dhcp-server network
add address=172.30.10.0/24 dns-server=8.8.8.8,7.7.7.7 gateway=172.30.10.1
add address=172.30.50.0/24 dns-server=8.8.8.8,8.8.7.7 gateway=172.30.50.1
add address=172.30.70.0/24 dns-server=8.8.8.8,8.8.7.7 gateway=172.30.70.1

/interface vlan
add interface=ether9 name=vlan50 vlan-id=50
add interface=ether18 name=vlan70 vlan-id=70
/interface list
add name=Internet
add name=Dante
add name=Video
You do not have the required permissions to view the files attached to this post.
 
Emil66
Frequent Visitor
Frequent Visitor
Posts: 62
Joined: Tue Aug 28, 2018 2:09 am

Re: Seperate DHCP Servers for Trunked VLAN's

Mon Apr 26, 2021 12:12 am

You need to create VLAN interfaces on the bridge interface, not on interfaces that are part of the bridge. And then you bind the DHCP servers to the VLAN interfaces.

So you have for example "ether1", "ether2" and "ether3" in "yourbridge". You configure "ether1", "ether2" and "ether3" as access ports (untagged) for VLAN ID 50. Then you create a VLAN interface "vlan50" with underlying interface "yourbridge". For this to work, "yourbridge" must be a tagged participant in VLAN 50. The DHCP server needs to be attached to the "vlan50" interface.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Seperate DHCP Servers for Trunked VLAN's

Mon Apr 26, 2021 4:20 am

Read this artiicle on vlans,
Forget using vlan1 to carry data, its on by default in the background wnen you create the bridges.
If you need another vlan use vlan10......... for data management or both.

viewtopic.php?f=23&t=143620

If you still have questions, will be here to answer them and assist but give it a try!!
 
K0IBM
just joined
Topic Author
Posts: 7
Joined: Mon Apr 11, 2016 8:11 pm
Location: Denver, Colorado, USA
Contact:

Re: Seperate DHCP Servers for Trunked VLAN's

Mon Apr 26, 2021 7:06 pm

You need to create VLAN interfaces on the bridge interface, not on interfaces that are part of the bridge. And then you bind the DHCP servers to the VLAN interfaces.

So you have for example "ether1", "ether2" and "ether3" in "yourbridge". You configure "ether1", "ether2" and "ether3" as access ports (untagged) for VLAN ID 50. Then you create a VLAN interface "vlan50" with underlying interface "yourbridge". For this to work, "yourbridge" must be a tagged participant in VLAN 50. The DHCP server needs to be attached to the "vlan50" interface.
Thank You so much. I will give this try later this afternoon.

Who is online

Users browsing this forum: Bing [Bot], fposavec, Semrush [Bot] and 61 guests