One subnet per vlan?
mikearama
Member Posts: 749
in CCNA & CCENT
I understand that this is best practice, but... that means that it's possible to create a vlan that has multiple subnets in it.
IE, I create vlan 200 for my dynamic users, and assign the 10.10.200.0 /24 scope to my dhcp server. But, on the 254th dynamic user, I'm out of IP's. So I add a scope for 10.10.201.0 /24.
Anyone done this? Any implications?
IE, I create vlan 200 for my dynamic users, and assign the 10.10.200.0 /24 scope to my dhcp server. But, on the 254th dynamic user, I'm out of IP's. So I add a scope for 10.10.201.0 /24.
Anyone done this? Any implications?
There are only 10 kinds of people... those who understand binary, and those that don't.
CCIE Studies: Written passed: Jan 21/12 Lab Prep: Hours reading: 385. Hours labbing: 110
Taking a time-out to add the CCVP. Capitalizing on a current IPT pilot project.
CCIE Studies: Written passed: Jan 21/12 Lab Prep: Hours reading: 385. Hours labbing: 110
Taking a time-out to add the CCVP. Capitalizing on a current IPT pilot project.
Comments
-
rjbarlow Member Posts: 411mikearama wrote:I understand that this is best practice, but... that means that it's possible to create a vlan that has multiple subnets in it.
IE, I create vlan 200 for my dynamic users, and assign the 10.10.200.0 /24 scope to my dhcp server. But, on the 254th dynamic user, I'm out of IP's. So I add a scope for 10.10.201.0 /24.
Anyone done this? Any implications?
router(config-if)#ip address <ip address> <subnet-mask> secondary
If You are using more VLANs You could probably need to put that command under a subinterface, then You have to put just coherent IP addresses on the new or out of IP addresses devices and all would have to work well, I guess. -
georgemc Member Posts: 429If I remember right, there are some issues with DHCP and secondary addresses. As in I don't think the IP Helper Addresses work. You may want to test it out in a lab. In your stated scenario, I would probably just slide the subnet mask 1 bit to the left. Thus retaining your previous leased addresses and gaining an additional 256 addresses.
GeorgeWGU BS: Business - Information Technology Management
Start Date: 01 October 2012
QFT1,PFIT in progress.
TRANSFERRED/COMPLETED: AGC1,BBC1,LAE1,QBT1,LUT1,QLC1,QMC1,QLT1,IWC1,INC1,INT1,BVC1,CLC1,MGC1, CWV1 BNC1, LIT1,LWC1,QAT1,WFV1,EST1,EGC1,EGT1,IWT1,MKC1,MKT1,RWT1,FNT1,FNC1, BDC1,TPV1 REQUIRED: -
networker050184 Mod Posts: 11,962 ModYes I have done this, but not for that reason. You can put two subnets on the same VLAN and you can use two different DHCP pools.An expert is a man who has made all the mistakes which can be made.
-
mikearama Member Posts: 749@ george... that's actually what my senior admin did with our network. The question, though, wasn't so much practical as theoretical... I just want to know the issues associated with multiple subnets in a vlan.
If I understand it correctly, regardless of the IP, hosts in the same vlan will communicate just fine. The issue is when trying to get to another vlan.
As rj suggested, the router's int will need another IP to act as a gateway for the second subnet... I'd prolly go with a sub-int. George... any idea if a helper address would work using a sub-int, and not a secondary address?
edit: that's what I was looking for, networker. So no problem forwarding dhcp requests and getting replies back on the second subnet?There are only 10 kinds of people... those who understand binary, and those that don't.
CCIE Studies: Written passed: Jan 21/12 Lab Prep: Hours reading: 385. Hours labbing: 110
Taking a time-out to add the CCVP. Capitalizing on a current IPT pilot project. -
georgemc Member Posts: 429mikearama wrote:If I understand it correctly, regardless of the IP, hosts in the same vlan will communicate just fine. The issue is when trying to get to another vlan.mikearama wrote:As rj suggested, the router's int will need another IP to act as a gateway for the second subnet... I'd prolly go with a sub-int. George... any idea if a helper address would work using a sub-int, and not a secondary address?mikearama wrote:edit: that's what I was looking for, networker. So no problem forwarding dhcp requests and getting replies back on the second subnet?
Things have changed a bit since I last played with this. It used to be that it wouldn't work. Now you can use the "IP DHCP SMART-RELAY" command to have the router step through each IP network on the interface when forwarding DHCP requests. Without the smart relay agent configured, all request are forwarded using the primary IP address on the interface. I paraphrased this from the "Authorized Self-Study Guide Building Scalable Cisco Internetworks (BSCI), Third Edition", pg. 445-446
The way I'm reading this, addresses wont be assigned from the second subnet until all addresses are allocated from the first subnet.WGU BS: Business - Information Technology Management
Start Date: 01 October 2012
QFT1,PFIT in progress.
TRANSFERRED/COMPLETED: AGC1,BBC1,LAE1,QBT1,LUT1,QLC1,QMC1,QLT1,IWC1,INC1,INT1,BVC1,CLC1,MGC1, CWV1 BNC1, LIT1,LWC1,QAT1,WFV1,EST1,EGC1,EGT1,IWT1,MKC1,MKT1,RWT1,FNT1,FNC1, BDC1,TPV1 REQUIRED: -
rjbarlow Member Posts: 411mikearama wrote:As rj suggested, the router's int will need another IP to act as a gateway for the second subnet... I'd prolly go with a sub-int. George... any idea if a helper address would work using a sub-int, and not a secondary address?
If You must to do this work for a native 802.1q VLAN, than You have to do that on the physical interface. I don't know if I explained well what I wanted to say.
If You create a new sub-interface maybe it works, but seems to me a forcing.