Community discussions

 
User avatar
BartoszP
Forum Guru
Forum Guru
Topic Author
Posts: 1717
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

VLANs & DHCP - help needed

Sun Mar 01, 2015 11:43 pm

I have followed VLAN example from http://wiki.mikrotik.com/wiki/Manual:Interface/VLAN
No problem but ...
I decided to add R5 router to serve as DHCP servers and gateway for both VLANs which are separated but use same 10.10.10.0/24 subnets.
Same subnets but they should be independend and do not mix adresses and hosts from different VLANs.
Image12004.gif
I have added two VLANs, assigned IPs in R5 VLAN3 = 10.10.10.6 and VLAN2= 10.10.10.7 ...no problem if they are static.
Next step was to define two pools
POOLVLAN2 = 10.10.10.100 - 10.10.10.120
POOLVLAN3 = 10.10.10.200 - 10.10.10.220
next define two DHCP servers with just defined pools...no problem...
and next I have started defining networks
for VLAN2: 10.10.10.0/24, GW 10.10.10.10.6, DNS 8.8.8.8...no problem...
and for VLAN3 same subnet butwith GW 10.10.10.7, DNS 4.4.4.4.....
and .... ta da ... no way to save it and to inform VLAN2 DHCP server to use one network and VLAN3 DHCP server to use second network.

Any ideas how to manage it ?
You do not have the required permissions to view the files attached to this post.
Real admins use real keyboards.
 
edgars
just joined
Posts: 10
Joined: Tue Feb 10, 2015 1:22 am
Location: London, UK

Mon Mar 02, 2015 3:38 am

You shouldn't be able to define two networks on same machine with same subnet. Easy workaround here I would do is to halve subnet to two /25s. Or put switch in place of hub and check "private vlan/port isolation" as alternative setup maybe? I think that mikrotik example there is more theoretical than practical.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Topic Author
Posts: 1717
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: VLANs & DHCP - help needed

Mon Mar 02, 2015 9:25 am

It is not "easy solution" to divide 10.10.10.0/24 into two subnets.
As VLANS are independent L2 domains there is no reason not to assign them same address ranges.
I know that I could set DHCP server on R1, R2, R3 or R4 but WHAT IF I want to have centralized management ?
Simple solution...read it as feature request...is the ability to assign interface which DHCP serves.
Real admins use real keyboards.
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: VLANs & DHCP - help needed

Mon Mar 02, 2015 7:24 pm

It is not "easy solution" to divide 10.10.10.0/24 into two subnets.
As VLANS are independent L2 domains there is no reason not to assign them same address ranges.
I know that I could set DHCP server on R1, R2, R3 or R4 but WHAT IF I want to have centralized management ?
Simple solution...read it as feature request...is the ability to assign interface which DHCP serves.
I decided to play around with this and see your problem with being unable to define multiple "networks" under DHCP server using the same subnet. The only way for this to work would be if MT allowed you to specify the interface for the network.

I don't see another workaround other than either a different router/additional device or set up a metarouter for one of your DHCP configs.
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. --Douglas Adams
 
tania
newbie
Posts: 42
Joined: Fri Feb 07, 2014 10:15 am

Re: VLANs & DHCP - help needed

Sun Mar 08, 2015 10:44 am

VLAN and DHCP Configuration video https://www.youtube.com/watch?v=6S3itRYRwLs
 
Znuff
Member Candidate
Member Candidate
Posts: 139
Joined: Tue Sep 26, 2006 2:42 am
Contact:

Re: VLANs & DHCP - help needed

Sun Mar 08, 2015 4:01 pm

As VLANS are independent L2 domains there is no reason not to assign them same address ranges.
Yeah, there are.

It's a stupid thing to do. Just use different classes.

I don't understand why you would use 100-120 for vlan2 and 200-220 for vlan3 when they aren't even on the same subnet or vlan.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Topic Author
Posts: 1717
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: VLANs & DHCP - help needed

Sun Mar 08, 2015 8:48 pm

It's a stupid thing to do.
Why it is stupid ?
Just use different classes.
Why I should use different classes ? What if I have to use same classes/subnets...e.g. clients want to use exact same IP pool. VLANS are independent LANs so I could use same addresses.
I don't understand why you would use 100-120 for vlan2 and 200-220 for vlan3 when they aren't even on the same subnet or vlan.
Why they should "even" be in the same subnet or vlan ? That is why they are intentionally in different vlan domains.

I have just added one router to official Mikrotik's example to allot it as central DHCP/DNS/GW. Could I or it is forbidden idea ?
Real admins use real keyboards.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: VLANs & DHCP - help needed

Sun Mar 08, 2015 10:47 pm

As long as the two networks use the same default gateway / DNS server addresses, then you could probably get away with just one network statement. I would also expect that you could even make the pools overlap, since technically, they're just lists of resources, right?
pool1 = 10.10.10.2-254, pool2 = 10.10.10.2-254.
You could even put 10.10.10.1/24 on both vlan subinterfaces (something Mikrotik lets you do, but other OS such as Cisco will not, unless you use VRF.)

Don't forget though, that if you install 2 DHCP processes / 2 pools / etc on one Routerboard, it's still actually two independent DHCP services to maintain, right? Why not just launch a MetaRouter for each DHCP, and make a single bridge for management access to the VRs?
When given a spoon,
you should not cling to your fork.
The soup will get cold.

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 73 guests