Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there any rules to specify private ip address

I guess 192.168., 169, 10* are all private ips, but I am not sure. Anyone can point out?

share|improve this question

migrated from stackoverflow.com Nov 12 '11 at 23:31

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 4 down vote accepted

Take a look at RFC5735 for a complete list of reserved networks. You're looking for "Private-Use Networks".

Address Block       Present Use                Reference
------------------------------------------------------------------
10.0.0.0/8          Private-Use Networks       RFC 1918
172.16.0.0/12       Private-Use Networks       RFC 1918
192.168.0.0/16      Private-Use Networks       RFC 1918
share|improve this answer
    
I thought 169.254 should also be –  user705414 Oct 18 '11 at 23:28
    
@user705414, from RFC5735: 169.254.0.0/16 - This is the "link local" block. As described in RFC3927, it is allocated for communication between hosts on a single link. Hosts obtain these addresses by auto-configuration, such as when a DHCP server cannot be found. –  rid Oct 18 '11 at 23:39

Private IPs are IP addresses in the subnets reserved for private addresses:

  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16

All other (non-reserved) IP addresses can (and most likely do) refer to actual computers in the public internet, so they should not be used in private networks.

share|improve this answer
    
Yeah, I guess as a practice one should never use public IP even in private networks. I will edit my answer. –  Gaurav Sinha Oct 19 '11 at 4:48

If you are using it in a network that wont connect to outside, it is fine. Else, you can consider using NAT translations. Use the range provided for private IP addresses, as given in some of the answers.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.