We help IT Professionals succeed at work.


nstefanov asked
I have a network of 500+ hosts.  I need ssome suggestions on what class IP network to use. Is it reasonable to use a class B network and have all hosts in the same broadcast network?  Please show some real addressing examples.
I don't really want to spend any moneyon routers and want all hosts to see each other.  Please advise.  Thanks.

Watch Question

I wouldnt buy routers but maybe a couple smart switches and use vlans to segment the networks.
Me personally I would use a C class network.
I would put maybe 75 clients on each so you would need 7 networks

192.168.5.X - 192.168.11.X


Thanks for your reply.  So if use VLAN's the hosts on the different networks would still be able to contadt each other?  Say would be able to contact, and is there a particular switch you would recommend?

Lets say I have one smart switch (one capable of doing vlans) with 24 ports.
You can make say port 1 be 192.168.1.X
Port 2 can be 192.168.2.X and so on.  Now how many vlans you can assign and to how many ports will vary based on the model and manuf but thats the jist of it.  Yes they will all be able to talk to each other because the switch knows which ports are which network and if knows which networks it can talk to then your fine.
Now the issue you run into is if you have 24 ports and assign 24 vlans (1 to each port and if the model supports that many) your starting to make the switch have to work hard segmenting all that traffic on all those ports.
For the network you suggested 1 switch should be ok as long as it has a good switching throughput or you could run a couple of smart switches and only a few vlans on each to lessen the load on each.
I would personally buy a couple so you can support future growth.  If you know this isnt going to be an issue then one may suit you.
I like Dell's power connect series.  They have lots of models to choose from go give them a visit.
Of course the top dog is also a cisco but if you dont know hot to program it then your in for a world of hurt trying to get it operating.

Also make sure you get a layer 3 smart switch. This will do the functions I mentioned above  


Thanks again.  I also want to confirm that if my rounter to get out to the itnernet has address then the computers on the network would still see it without having a router to route from to 192.168.2..0.  


As long as the switch is a layer 3 switch then yes it has its own routing engine which knows how to find other subnets.  If its a layer 2 switch you will need a router to route between the subnets
Bernie SalvaggioIT Manager
You could also use Class B subnets so you don't need to have so many vlans. Two /23 Class B subnets would do it, giving you 1020 usable addresses.

Less work on the vlan side. Also, to address your question about router IP's, in a Layer 3 switch you'd set the default route to be the IP of your main router (which would be in its own vlan.) Then, you'd set the IP of each vlan (on the switch) to be, for example, or Then you set the gateway on the computer to be that .1 address depending on which subnet they're in.

Thanks Salvagbf

I havent worked too extensively with vlans but after you set the subnet for the vlans to say be 172.16.2.X when you configure the vlan you should be able to enter in a parameter for the default gateway?  I would hope you dont have to manually set this on each client machine?
Also how does this now interact with DHCP?


Ok that looks good but how would each computer know which subnet to use (can we setup DHCP on the switch and and based on port memebership assign different DHCP scopes)?  Thanks.


I cant help on the dhcp question as I would like to know the answer myself but the computers that are connected to say port 1 well port one is vlan 1 for example.
vlan 1 is subnet 192.168.5.X
You set the vlan up so the compuetrs connected to this port have a default gateway of
The clients then send the data outside of the subnet to the default gateway the switch then knows about the other vlans and like I said if its a layer 3 switch it will kow how to send it to the other vlans on the same switch.

Lets say port 2 is 192.168.10.X

A client on this port needs to send to 192.168.5.X(port 1).  The client doesnt know how to route it so it sends it to the default gateway (which is
The switch then knows hey 192.168.5.X is on port 1 I know how to get there and sends the packet to that port and destination.

Make sense?


Yep thanks ryansoto: that makes perfect sense.  Now just not sure how to assign different DHCP scopes to those VLANS.....

Me either and hopefully salavg can provide some help.  I think each switch is different on how it handles dhcp also.  
My guess is this though

lets say you go with class C and set these vlans up

You would obviously need to create a scope for each vlan subnet.
My guess is you would need to only configure a few scope options such as router (you may not need to set this option depending on the vlan -  the switch manual should address this)which would be or something like that.  DNS servers and that should do it.
The vlan setup you will need to set the default gateway for the clients; for that vlan.
When the dhcp reuest from a client came the packet would pass through the switch fine.  The client would send the broadcast the switch knows which vlan it came from and tags it.  DHCP server would assign from the right scope back to the client.
Client would get the right ip from the right scope and subnet.  Default gateway would not be the main router but the vlan 'main port' (if the client was on this vlan)
As long as you set the vlan up right you should be fine.  Just how you do dhcp will depend on the switch I believe.
Bernie SalvaggioIT Manager

I'm coming from the Cisco world, so my answers are going to be in that light. The following Cisco article describes these things well.


There is an 'ip default-gateway' command, but it's only used when routing isn't enabled on the switch. What we do instead is create static default route to your actual router. The following code creates a single vlan and a default route to your router.

Switch# vlan database
Switch(vlan)# vlan 10
Switch(vlan)# exit
Switch# conf t
Switch(config)# int vlan 10
Switch(config-if)# description Our first vlan
Switch(config-if)# ip address
Switch(config-if)# exit
Switch(config)# ip routing
Switch(config)# ip route (or whatever the ip for your router is)
Switch# copy run start

You also need to configure a place on the switch for the default router to live. The easiest way to do this is make a vlan who's subnet matches the ip/subnet for your router, assign the vlan an IP, and plug your router into a port assigned to that vlan.

If you do a 'sh ip route' you should see all your vlans as 'directly connected' and then a static route for the default route we set before. Keep in mind, no routes will show until something is actually plugged in and running on that vlan. So your static route won't show until there's a device with that ip plugged into a port on that vlan.

Since DHCP packets don't cross routers, you can either set up multiple DHCP servers, dual-home the DHCP server by putting multiple NIC's in it and giving it an IP on each vlan and plug each NIC into switch ports on that vlan, or make a trunk port that contains the mult vlans and assign a second IP on the NIC in the DHCP server to match the second subnet.
Bernie SalvaggioIT Manager

You set switch ports to be members of a specific vlan. So lets say you wanted fast etherenet ports 1-20 on a Cisco switch to be members of vlan 10...

Switch# conf t
Switch(config)# int range f0/1-20
Switch(config-if)# switchport access vlan 10

Then, if you have a DHCP server plugged into one of those ports, when a comp does a DHCP request (that's also in one of those ports,) it'll find the server.

What is you have one dhcp server that you want to serve all the ports you would need to tell each vlan to look at vlan 10 ?
Bernie SalvaggioIT Manager

I'm not sure I understand your question, but let me take back something I said earlier.

You can have a single DHCP server, on a single subnet, and run a command on the vlan on the switch (Cisco again mind you) that you need to forward DHCP requests from.

SO, let's say your DHCP server is on vlan 10 with half your computers, and the other half are on vlan 20. You'd log in to your switch..

Switch# conf t
Switch(config)# int vlan 20
Switch(config-if)# ip helper-address

Where is the address of your DHCP server. So anytime the switch gets a DHCP packet on vlan 20 it'll forward it to that IP address. Consequently this command will forward all the following UDP protocols to this machine.

69 - TFTP
67 - BOOTP Client
68 - BOOTP Server
37 - Time Protocol
53 - DNS
137 - NetBios
138 - NetBios Datagram

If there are any of those UDP protocols you don't want to forward, you can just do a

no ip forward-protocol udp 37

Or whatever # matches what you don't want to forward. So if you don't want to forward DNS requests, because you're pointing to specific DNS servers and your router handles getting those requests to the proper subnet, you can do that with a port 53.


How about actually enabling dhcp on the switch with different scopes ver vlan?


I mean per vlan
Bernie SalvaggioIT Manager

Sounds like a new question ;-)


Configuring and maintaining DHCP is much easier on a Windows box than from the command line on a Cisco switch imho.


Sure thanks :) , i was just thinking it may be easier to do it right on the switch instead of having a multihomed dhcp server....

What network equipment have you got ?

Switches ?  Make Model
Routers ?


Looking at buying everything new so probably go with Cisco....
if you use a cisco L3 switch, you can split the lan into vlan's

On the cisco switch you will have virtual vlan interfaces that will be the GW for each vlan

interface vlan1
     ip address 192.168.1.X
     ip helper IP_SERVER
interface vlan2
     ip address 192.168.2.X
     ip helper IP_SERVER

The ip helper command will tell the switch to forward all dhcp requests to your server.
On the server you will then create multiple dhcp entries to hand out blocks of ip's for each vlan.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.