Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


September 01, 1999

IP Addressing Basics


RSS
Subscribe to Windows IT Pro | See More IP Addressing Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    Routing, NT, & RIP

IP version 4 (IPv4) addresses are 32 bits long, as Figure A shows. IPv4 addresses typically occur as a sequence of four numbers that represent the decimal value of each of the address bytes. Because periods separate the values in IPv4 addresses, the IPv4 address notation is called dotted decimal.

IP addresses are hierarchical for routing purposes (as are the addresses of all Open Systems Interconnection—OSI—network layer protocols) and divided into two subfields. The Network Identifier (NET_ID) subfield identifies the IP subnetwork and facilitates high-level routing between networks in much the same way country codes, city codes, and area codes facilitate routing in telephone networks. The Host Identifier (HOST_ID) subfield identifies the specific host within a subnetwork.

To accommodate different-size networks, IP defines several classful addresses. Classes A, B, and C apply to host addressing; the only difference between the three classes is the length of the NET_ID subfield.

Class A addresses have a 7-bit NET_ID and a 24-bit HOST_ID. Class A addresses apply to very large networks and can address up to 16,777,216 (224) hosts per network. The first segment of a Class A address is a number between 1 and 126; however, very few networks are this large. IBM's network has a Class A address.

Class B addresses have a 14-bit NET_ID and a 16-bit HOST_ID. Class B addresses apply to moderate-size networks and can address up to 65,536 (216) hosts per network. The first segment of a Class B address is a number between 128 and 191. The Class B address space has been under threat of depletion for some time, and getting a new Class B address is difficult. (To learn more about the IP address-depletion problem and the coming change in IP addressing from IPv4 to IPv6, see Tao Zhou, "The Next Generation IP in Action," June 1998.) America Online's (AOL's) network has a Class B address.

Class C addresses have a 21-bit NET_ID and an 8-bit HOST_ID. These addresses apply to small networks and can address only up to 256 (28) hosts per network. The first segment of a Class C address is a number between 192 and 223. Currently, most networks receive Class C (or sub-Class C) address assignments; one example includes Saint Michael's College in Colchester, Vermont.

The remaining two address classes apply to special functions only. Class D addresses, which begin with a value between 224 and 239, are for IP multicasting (i.e., broadcasting one packet to multiple hosts). Class E addresses begin with a value between 240 and 255 and are for experimental use.

Several NET_ID and HOST_ID values either are reserved or have special meaning. A HOST_ID of 0 is a dummy value reserved as a placeholder when referring to an entire subnetwork; the address 192.168.99.0 refers to a Class C address with a NET_ID of 192.168.99. A HOST_ID consisting solely of ones (usually written 255 but also sometimes depicted as -1) is the broadcast address and refers to all hosts on a network. The NET_ID value 127 is for loopback testing, and the address 127.0.0.1 refers to the localhost.

Request for Comments (RFC) 1918 reserves several NET_IDs for private network addresses, and routers won't pass packets over the Internet to these network addresses. The reserved NET_IDs are the Class A address 10.0.0.0 (formerly assigned to ARPAnet), the 16 Class B addresses from 172.16.0.0 to 172.31.0.0, and the 256 Class C addresses from 192.168.0.0 to 192.168.255.0. Organizations with private network addresses frequently use the addresses on a network sitting behind a firewall or router that performs Network Address Translation (NAT). NAT converts a host's private address to a public IP address for Internet use. One advantage to using NAT is that an organization need not change host addresses if the organization changes service providers and receives another public IP address.

An additional addressing tool is the subnet mask. The subnet mask indicates the portion of the address that identifies the network (or subnetwork) for routing purposes. The subnet mask appears in dotted decimal, and the total number of ones that a subnet mask contains identifies the significant NET_ID bits (for fans of Boolean logic, the subnet mask and the entire 32-bit IP address are ANDed together to obtain the relevant NET_ID bits). Table A shows the subnet mask and number of significant address bits for the NET_ID in classful IP addresses. Depending on the context and literature, subnet masks appear in dotted decimal form or simply as a number representing the number of significant address bits for the NET_ID. Thus, 192.168.99.17 255.255.255.0 and 192.168.99.17/24 both refer to a Class C NET_ID of 192.168.99.

Subnet masks can also subdivide a large address space or combine multiple small address spaces. A network might subdivide its address space to define multiple logical networks by segmenting the HOST_ID subfield into a Subnetwork Identifier (SUBNET_ID) and (smaller) HOST_ID. For example, an organization with an assigned Class B address space of 191.160.0.0 might segment the address into a 16-bit NET_ID, 4-bit SUBNET_ID, and 12-bit HOST_ID. The subnet mask for routing to the NET_ID on the Internet would be 255.255.0.0 (or 16 bits), and the mask for routing to individual subnets within the larger Class B address space would be 255.255.240.0 (or 20 bits). Alternatively, an organization with the assigned four Class C addresses of 223.168.128.0, 223.168.129.0, 223.168.130.0, and 223.168.131.0 might use the subnet mask 255.255.252.0 (or 22 bits) for routing to this domain. Using subnet masks in routing tables to consolidate addresses using NET_IDs that aren't one, two, or three bytes in length is termed Classless Inter-Domain Routing (CIDR).

End of Article



Reader Comments
I am currently studying for CCNA1 and am very greatful for the knowledge shared in this article.It is very valuable information and helps my understanding of IP addressing and subneting.

Semiti Koroi November 26, 2003


Why addresses from 127.0.0.2 to 127.255.255.254 refers to localhost too?

Lyubomir Selveliev December 09, 2003


The address 127.0.0.1 refer to the loop back address and the address 127.0.0.1 to 127.255.255.254 refer to the the class a address and might be use as a subnet and/or broadcast address.
This is a guess and if any body have a correct answer then please do mail me.

Ketan December 23, 2003


This is awesome guys, keep up the good work!! Nerds like me enjoy articles such as these.

Andrew Westacock January 07, 2004


127.0.0.1 is a loopback IP but only because Microsoft put it in the hosts file.

Your pc can access any device by name, if its ip and name are added to this file.


Heres what the file looks like.

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost

Birt Underwood April 01, 2004


this really is helpful for someone trying to learn networks and telecommunications! but can in individual have more than one Ip address?can someone use another persons Up address without them being there?? what impact does physical location within a network have on Ip address usage have? and how does an IP address relate to a website URL?

bronagh April 18, 2004


Great article. Waiting for more.

Gigi Becali April 23, 2004


Thank you. This will help me loads with my Networking module.

Stacy May 02, 2004


This is a great article, very helpful. The article is written in such a way that IP addressing finally makes sense to me. THANKS !!!

Randy Kessler May 03, 2004


Does APIPA have anything to do with private networks if a dhcp is found and the 169.254 range is an operational ip address? Does APIPA function as a private network ip address?

Thomas May 13, 2004


 See More Comments  1   2   3   4   5   6   7 

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...


Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement