Community discussions

 
newone
just joined
Topic Author
Posts: 4
Joined: Thu Aug 16, 2018 8:42 pm

Bridged VLAN - Multiple DHCP-Servers - No response on VLAN-Interface

Fri Nov 02, 2018 10:43 am

Hello!

I would like to create separate where each vlan has its own dhcp server. If I connect my client to the router on eht6 and set the ip address manually I can ping the router. However, if I would like to receive the ip from the dhcp-server no address is assigned.

I have tested to assign one dhcp-server to bridge1. With this config the client immediately has an IP address.

Do you have any ideas where the issue could be located?

Below you can find my current config file.

Thank you very much!
# model = CCR1009-7G-1C-1S+
/interface bridge
add name=bridge1

/interface vlan
add interface=bridge1 name=100-mgmt vlan-id=100
add interface=bridge1 name=401-hp23-public vlan-id=401

/interface bridge port
add bridge=bridge1 hw=no interface=ether3
add bridge=bridge1 hw=no interface=ether4
add bridge=bridge1 hw=no interface=ether5 pvid=401
add bridge=bridge1 hw=no interface=ether7
add bridge=bridge1 hw=no interface=sfp-sfpplus1
add bridge=bridge1 hw=no interface=combo1
add bridge=bridge1 interface=ether6 pvid=100

/interface bridge vlan
add bridge=bridge1 tagged=sfp-sfpplus1 untagged=ether6 vlan-ids=100
add bridge=bridge1 tagged=sfp-sfpplus1 untagged=ether5 vlan-ids=401

/ip pool
add name=dhcp-100-mgmt ranges=192.168.0.100-192.168.0.250
add name=dhcp-401-wlan-public ranges=172.16.1.10-172.16.1.250
add name=dhcp-402-wlan-private ranges=172.16.2.10-172.16.2.250


/ip dhcp-server
add address-pool=dhcp-100-mgmt disabled=no interface=100-mgmt name=100-mgmt
add address-pool=dhcp-401-wlan-public disabled=no interface=401-wlan-public name=401-wlan-public

/ip address
add address=192.168.0.1/24 comment=defconf interface=sfp-sfpplus1 network=192.168.0.0
add address=192.168.0.1/24 interface=100-mgmt network=192.168.0.0
add address=172.16.1.1/24 interface=401-wlan-public network=172.16.1.0

/ip dhcp-server network
add address=172.16.1.0/24 dns-server=172.16.1.1 gateway=172.16.1.1 netmask=24
add address=192.168.0.0/24 dns-server=192.168.0.1 gateway=192.168.0.1

 
User avatar
xvo
Member
Member
Posts: 321
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Bridged VLAN - Multiple DHCP-Servers - No response on VLAN-Interface

Fri Nov 02, 2018 12:09 pm

You need to add bridge itself as a tagged port for your vlans, to make a connection to ip configuration of vlan-interfaces:

/interface bridge vlan
add bridge=bridge1 tagged=bridge1,sfp-sfpplus1 untagged=ether6 vlan-ids=100
add bridge=bridge1 tagged=bridge1,sfp-sfpplus1 untagged=ether5 vlan-ids=401
 
anav
Forum Guru
Forum Guru
Posts: 2829
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: Bridged VLAN - Multiple DHCP-Servers - No response on VLAN-Interface

Sun Nov 04, 2018 12:55 am

Psssshaw, this is so basic and easy, piece of cake but of course I will let xvo handle it. He needs the practice........... ;-PPPPPPPP
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
 
anav
Forum Guru
Forum Guru
Posts: 2829
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: Bridged VLAN - Multiple DHCP-Servers - No response on VLAN-Interface

Sun Nov 04, 2018 12:57 am

Just kidding, inside joke with xvo, he has helped through the same process held my hand, heck practically changed my diapers LOL. You are in good hands, but plug your nose, dont like his aftershave (who am I kidding I'm convinced he doesn't know what a razor looks like must be his perfume errr cologne).
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
 
User avatar
xvo
Member
Member
Posts: 321
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Bridged VLAN - Multiple DHCP-Servers - No response on VLAN-Interface

Sun Nov 04, 2018 1:40 am

Just kidding, inside joke with xvo, he has helped through the same process held my hand, heck practically changed my diapers LOL. You are in good hands, but plug your nose, dont like his aftershave (who am I kidding I'm convinced he doesn't know what a razor looks like must be his perfume errr cologne).
I guess that's how euphoria from making vlan setup to finally work for the first time looks like from aside ;)
 
anav
Forum Guru
Forum Guru
Posts: 2829
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: Bridged VLAN - Multiple DHCP-Servers - No response on VLAN-Interface

Sun Nov 04, 2018 7:45 pm

Hahah, true dat. By the way, if you put on glasses and ditch the hat and drive by in a red car, one might you are NORMIS LOL, heee heee haaa haaa.
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
 
newone
just joined
Topic Author
Posts: 4
Joined: Thu Aug 16, 2018 8:42 pm

Re: Bridged VLAN - Multiple DHCP-Servers - No response on VLAN-Interface

Wed Jan 02, 2019 12:42 pm

Hello!

Thank you for your help! With the changed config dhcp is working perfectly for all clients connected to a switch which is connected via tagged port. However, if I try to connect a client directly to ether5 or ether6 this client does not receive an IP from the DHCP.

Here is the config:

Code: Select all

# jan/02/2019 11:24:08 by RouterOS 6.43.4
# software id = IDHP-Y9BI
#
# model = CCR1009-7G-1C-1S+
/interface bridge
add name=bridge1
/interface ethernet
set [ find default-name=ether1 ] speed=100Mbps
set [ find default-name=ether2 ] speed=100Mbps
set [ find default-name=ether3 ] speed=100Mbps
set [ find default-name=ether4 ] speed=100Mbps
set [ find default-name=ether5 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full speed=100Mbps
set [ find default-name=ether6 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full speed=100Mbps
set [ find default-name=ether7 ] speed=100Mbps
set [ find default-name=sfp-sfpplus1 ] advertise=10M-full,100M-full,1000M-full
/interface vlan
add interface=bridge1 name=100-mgmt vlan-id=100
add interface=bridge1 name=120-print vlan-id=120
add interface=bridge1 name=401-public vlan-id=401
/ip pool
add name=dhcp-100-mgmt ranges=192.168.100.100-192.168.100.250
add name=dhcp-401-public ranges=172.16.1.10-172.16.1.250
add name=dhcp-402-23-private ranges=172.16.2.10-172.16.2.250
add name=dhcp-120-printer ranges=192.168.20.100-192.168.20.250
/ip dhcp-server
add address-pool=dhcp-100-mgmt disabled=no interface=100-mgmt name=100-mgmt
add address-pool=dhcp-401-public disabled=no interface=401-public name=401-public
add address-pool=dhcp-120-printer disabled=no interface=120-print name=120-print
/interface bridge port
add bridge=bridge1 hw=no interface=ether3
add bridge=bridge1 hw=no interface=ether4
add bridge=bridge1 hw=no interface=ether5 pvid=401
add bridge=bridge1 hw=no interface=ether7
add bridge=bridge1 hw=no interface=sfp-sfpplus1
add bridge=bridge1 hw=no interface=combo1
add bridge=bridge1 hw=no interface=ether6 pvid=100
/interface bridge vlan
add bridge=bridge1 tagged=sfp-sfpplus1,bridge1 untagged=ether6 vlan-ids=100
add bridge=bridge1 tagged=sfp-sfpplus1,bridge1 untagged=ether5 vlan-ids=401
add bridge=bridge1 tagged=sfp-sfpplus1,bridge1 vlan-ids=120
/ip address
add address=192.168.100.1/24 interface=100-mgmt network=192.168.100.0
add address=10.0.1.1/24 network=10.0.1.0
add address=172.16.1.1/24 interface=401-public network=172.16.1.0
add address=192.168.20.1/24 interface=120-print network=192.168.20.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1
/ip dhcp-server network
add address=172.16.1.0/24 dns-server=172.16.1.1 gateway=172.16.1.1 netmask=24
add address=192.168.100.0/24 dns-server=192.168.100.1 gateway=192.168.100.1 netmask=24
add address=192.168.20.0/24 dns-server=192.168.20.1 gateway=192.168.20.1
Thank you very much!
 
mkx
Forum Guru
Forum Guru
Posts: 2446
Joined: Thu Mar 03, 2016 10:23 pm

Re: Bridged VLAN - Multiple DHCP-Servers - No response on VLAN-Interface

Wed Jan 02, 2019 1:14 pm

Set vlan-filtering=yes on bridge1 in /interface bridge. Setting bridge MAC address by hand might proove benefitial (for other reasons) as well.
BR,
Metod

Who is online

Users browsing this forum: Bing [Bot] and 14 guests