Forum Moderators: phranque

Message Too Old, No Replies

IP Addresses Reserved for Private Networks

         

brotherhood of LAN

12:51 pm on Dec 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm using one of those "IP to country" lists, and was testing it using "127.0.0.1", it appears the list doesn't take into account private networks.

After having a look for the reserved IP ranges I got this from [faqs.org...]

3. Private Address Space

The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private internets:

10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

I'm wondering, is 127.0.0.* the special case, or are there more ranges of reserved IP's not mentioned in the above article, does anyone know?

TIA, I'm scanning through the RFC's, trying to make sure that when someone does enter an IP, it returns something of use :)

coopster

1:01 pm on Dec 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Reserved IP addresses
A component of an IP address with a value all bits 0 or all bits 1 has a special
meaning:
  • All bits 0: An address with all bits zero in the host number portion is
    interpreted as this host (IP address with <host address>=0). All bits zero
    in the network number portion is this network (IP address with <network
    address>=0). When a host wants to communicate over a network, but
    does not yet know the network IP address, it may send packets with
    <network address>=0. Other hosts on the network interpret the address as
    meaning this network. Their replies contain the fully qualified network
    address, which the sender records for future use.
  • All bits 1: An address with all bits one is interpreted as all networks or all
    hosts. For example, the following means all hosts on network 128.2 (class
    B address):
    128.2.255.255
    This is called a directed broadcast address because it contains both a
    valid <network address> and a broadcast <host address>.
  • Loopback: The class A network 127.0.0.0 is defined as the loopback
    network. Addresses from that network are assigned to interfaces that
    process data within the local system. These loopback interfaces do not
    access a physical network.

Reference: IBM Redbook
TCP/IP Tutorial and Technical Overview
GG24-3376-06
ISBN 0738421650

brotherhood of LAN

1:28 pm on Dec 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks coop, cheers for typing that out!

Just a little clarification if poss:

>All bits 0 (or all bits 1): An address with all bits zero in the host number portion is

Does thsi just refer to the first octet, the first 2 or any octet?

I'm guessing host number portion is the first octet, or the first 2 ;)

Thanks for the snippet though, AFAIR the HTTP protocol RFC mentions a segment about all bits being 1 or 0, I'll have a gander at that also.

coopster

1:32 pm on Dec 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



After a quick bit of review:

Obsolete: RFC1700, Replaced by an On-line Database according to RFC3232

I found that RFC3232 stated the original database was maintained by IANA. That database is still maintained by IANA. I believe this is the best source for your request:

Special-Use Addresses [iana.org]
Protocol Numbers and Assignment Services [iana.org]

Not that I don't trust IBM, I just like to get my standards from the authority
;)

brotherhood of LAN

1:43 pm on Dec 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks, I like the authorities too, the real ones not the google ones ;)

I'll read through those. Come to think of it, if the "ip to country" tool doesn't return a country for a certain IP, I'll just output the IP as "private".

Will read up on it nonetheless, doing an Open Uni course covering this stuff next year so it'll be good to suss it our for myself once and for all.

coopster

2:21 pm on Dec 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I wouldn't mind being enlightened by your summaries :)

brotherhood of LAN

2:32 pm on Dec 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



lol is that sarcasm :P

My summary will be what you told me, in my own words when I figure it out for myself, I guess ;)

coopster

4:17 pm on Dec 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Absolutely not sarcasm! I joke around quite a bit, but, for future reference, sarcasm would be stated tongue-in-cheek with a smiley --> ;) <--

In this case, however, I am quite serious! It sounds as though you are going to be putting some time and energy into research that interests me and I'd love to glean what I can from your efforts. It's work that I (and others on this site) would extend humble gratitude if you shared -- granting you have the time. Thanks BOL -- coopster

bakedjake

8:01 pm on Dec 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



BoL - That IANA document on special use addresses is the best you'll get, and all you should need, with one exception:

0.0.0.0

This address functions much like 127.0.0.1 in that it is an address mapped to the local machine. The difference is that a connection to 0.0.0.0 usually runs through the primary interface on the machine as a loopback, whereas 127.0.0.1 runs through the actual "loopback" interface.

The difference is really only relevant to UNIX machines, but it is an important difference, especially when testing network services.