3

Lets say I want to set up a small packet-switching LAN using TCP/IP model with 10 hosts.

If I do not intend to connect my network to the Internet, which implies that this is a private network and I want to assign static IPs:

  • What would be the considerations to choose IP addresses for my hosts?
  • What about subnet mask?

Does this fact that I am not going to connect to the internet give me the ability to choose whatever I want (in the range of 8 bits ofcourse) for the network addresses?

4

Best practice is to use IPs from private IP address range according to the fact that you will not connect your network to the Internet:

  • 10.0.0.0 - 10.255.255.255
  • 172.16.0.0 - 172.31.255.255
  • 192.168.0.0 - 192.168.255.255

For the subnet mask it depends on how big is the network. If you need 10 hosts, then mask would be:

(255.255.255.240) => mask for 14 hosts + network address + broadcast.

enter image description here

Keep in mind that addresses must be from the same network.

For example you can use 192.168.0.1 - 192.168.0.10 with mask 255.255.255.240

It is not a good idea to use public IP addresses in your private LAN, however, it is absolutely possible to do so.

  • 1
    In general for private networks I would advise sticking to /24 (255.255.255.0) unless you have a good reason not to. Much easier to see what is going on that way. – Peter Green Jan 11 '16 at 15:00
  • 1
    Thank you so much for the answer. So I can use public IPs but it is not recommended. In other words as long as I keep my LAN private and do not connect it to the Internet, it is OK to assign any IPs from any ranges (not the reserved ones ofcourse). am I right? – varDumper Jan 11 '16 at 15:04
  • 1
    Yes you are right. But addresses witch you assign must be with same address 'space', witch determines Mask. – DavidM Jan 11 '16 at 15:09
  • What if I want to set up a DHCP server and assign IPs dynamically? Any considerations I have to take? – varDumper Jan 11 '16 at 15:12
  • When you assign static IP, you (as a Admin) must care about IP addresses, witch adresses are assigned and witch are not, of course you must care if address witch you assign to PC are from same space as a network is defined. On DHCP server you define ("pool") range of addresses and DHCP server just take some address and assign it to PC of course with subnet mask. You must set a good IP address range and subnet mask in DHCP settings. – DavidM Jan 11 '16 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.