cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2346
Views
0
Helpful
8
Replies

one Vlan with two IP subnets

knaik99
Level 1
Level 1

Hi,

In LAN network,if I am using vlan 200 for PC users i.e. data and customer told me to configure two IP subnets for PC users and users will get IP from DHCP server so what is solution if users should get IP from primary subnets and once primary get exhausted then secondary will work

please tell me solution--

my suggestions--

1.shall i make two vlan 200 and 201 and vlan 201 's IP subnets counted as secondary

please share command line also

 

8 Replies 8

Deepak Kumar
VIP Alumni
VIP Alumni

There are two main solutions for you:

1. Create two subnets as 1st DHCP server scope will be from IP range 192.168.0.0-127 with the same subnet mask /24 and 2nd DHCP server scope will be like 192.168.0.128-254 with same subnet mask as /24.

2. Create two different VLAN but you need two different Subnets in your network as VLAN 200 - 192.168.0.0/24 & VLAN 201 - 192.168.1.0/24

 

As I am understanding that as per your question the first option is more sutable for you.

 

 

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Hello
Can you clarify, you wish to have two subnets and you wish for resilient dhcp for both of these, or you wish to have 1 subnet with dhcp resiliency


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

if I Create two different VLAN with two different Subnets in your network as VLAN 200 - 192.168.0.0/24 & VLAN 201 - 192.168.1.0/24 then

Hello
If you design your network correctly to accommodate all the users/devices in your vlans then you should never exhaust your dhcp allocation, Unless that is you are unfortunate your dhcp servers are subjected to a exhaustion attack, but this can be negated by applying some L2 security such as dhcp snooping.

Unitizing the dhcp lease timings for the various devices /hosts on your network you should be able to manage your scopes accordingly.

Example:

Printers, servers, conferencing devices etc. = large lease times (days)
WiFI users devices =  short lease times (2hrs)
Wired office users  = lease times (12 hrs)

As for resiliency having two dhcp servers would be most beneficial, then you could create the same scopes on both servers and activate half of each scope on each server and have the other half suspended  as such if you have server failure you can just activate the suspended scope on the other server and you still have a functioning dhcp service

Lastly as for the vlans you mentioned you would just create two L2/l3 vlans for for subnets

 

Int vlan 200
ip address  192.16.0.254 255.255.255.0

 

Int vlan 201
ip address  192.16.1.254 255.255.255.0

 

Vlan 200 -201
exit


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello,

 

if you use your IOS router or switch as DHCP server, you can actually configure one scope with multiple subnets (as long as you configure secondary IP addresses on the corresponding interface). So if the first scope is full, your clients will get an IP address from the secondary subnet. Below is an example:

 

ip dhcp excluded-address 192.168.10.1
ip dhcp excluded-address 192.168.20.1
!
ip dhcp pool LAN
 network 192.168.10.0 255.255.255.0
 network 192.168.20.0 255.255.255.0 secondary
  override default-router 192.168.10.1 192.168.20.1
 default-router 192.168.10.1

!

interface GigabitEthernet0/0

ip address 192.168.10.1 255.255.255.0

ip address 192.168.20.1 255.255.255.0 secondary

Hello

 


@Georg Pauwen wrote:

So if the first scope is full, your clients will get an IP address from the secondary subnet. Below is an example:


FYI -Not by default this should not occur,if the server isnt locally applied - It will forward on the primary interface and wont even attempt to use the secondary ip address, Youll need to append smart-relay to accomadte the secondary addressing for dhcp.

ip dhcp smart-relay


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Not sure what you mean. I tested this, and if the first scope is full, the next PC is getting its address from the secondary pool.

I am talking about a Cisco IOS DHCP server...

Hello
Probably will with locally configured dhcp server(s), I was referring to dhcp broadcast , being relayed (helper address)
Having secondary addressing on a L3 interface relaying to a dhcp server wont failover to the secondary ip address unless smart relay is appended.
As the OP doesn’t state the dhcp is local or not, then it was worth mentioning the smart-relay function.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card