IP addressing and subnetting fundamentals

Our IP addressing and subnetting crash course provides an overview of IP addressing-related topics network engineers need to know, including IPv4 and IPv6, subnetting, DHCP, and calculating subnet masks. For more in-depth information, visit our links to tips, expert advice and cheat sheets.

Our IP addressing and subnetting crash course provides an overview of the fundamentals network engineers need to

know. Learn the basics of IPv4 and IPv6, subnetting, DHCP, and calculating subnet masks. For more in-depth information, visit our links to tips, expert advice and cheat sheets.

In this guide:

What is an IP address?
What's the difference between "classful" and "classless"?
How does DHCP hand out IP addresses?
How does binary apply to IP addressing?
What is a subnet?
What is a subnet mask?
How do you calculate a subnet mask?

 

   What is an IP address? 

In the most widely installed level of the Internet Protocol (IP) today, an IP address is a 32-bit number that identifies each sender or receiver of information that is sent in packets across the Internet. An IP address has two parts: the identifier of a particular network on the Internet and an identifier of the particular device (which can be a server or a workstation) within that network. Each device must know its own IP address and the IP address of the device with which it needs to communicate (source and destination). To communicate on the Internet, every organization must have at least one valid Internet IP address. This unique network number is included in any packet sent out of the network onto the Internet. In addition to the network address or number, information is needed about which specific machine or host in a network is sending or receiving a message. So the IP address needs both the unique network number and a host number (which is unique within the network). Read the full definition of IP address is on Whatis.com.

 

 

  What's the difference between "classful" and "classless"? 

Classless Internet addressing

Learn how classless IP addressing works and is used in networking in this excerpt from Routing First-Step by William Parkhurst.

When the concept of IP addressing was first thought up, it was decided that IP addresses would be put into classes, defining local address and default subnet mask according to network size. Today, these default subnet masks aren't much used except as a point of reference or on some certification tests.

The term "classful" means that the IP address or software is assuming that IP addresses fall into these classes and uses the default subnet. If a routing protocol is classful, it has trouble with the IP addresses that don't use the default subnet masks. On the other hand, a "classless" routing protocol doesn't assume that IP addresses have their default subnet masks. Today, you should assume that all network devices are classless unless you find out otherwise. (From "IP addressing and subnetting: What network administrators need to know" by contributor David Davis.)

 

  How does DHCP hand out IP addresses? 

DHCP (Dynamic Host Configuration Protocol) is a communications protocol that lets network administrators centrally manage and automate the assignment of Internet Protocol (IP) addresses in an organization's network. Using the Internet Protocol, each machine that can connect to the local IP network and the Internet needs a unique IP address, which is assigned when an Internet connection is created for a specific computer. Without DHCP, the IP address must be entered manually at each computer in an organization and a new IP address must be entered each time a computer moves to a new location on a different network. DHCP lets a network administrator supervise and distribute IP addresses from a central point and automatically sends a new IP address when a computer is plugged into a different place in the network. (Learn more about how DHCP hands out IP addresses on Whatis.com.)

 

 

  How does binary apply to IP addressing 

More IP addressing and subnetting resources
Learn the importance of IP address management.

Find out how VoIP, IPv6 and other factors are driving IP address management.

Assigning an IP address ending in .0 or .255 explains the network theory behind IP addressing.

Check out our comprehensive guide to IP network design.

The three critical pieces of information that the network administrator or DHCP server provides to network devices (computer, server, router, switch, etc.) are the IP address, the subnet mask and the default gateway. The network device immediately converts this information into binary and calculates the network ID. Before we can calculate the network ID, we first have to convert from decimal to binary, a numbering system that uses only the digits 1 and 0, as opposed to the decimal number system, which uses the digits 0 through 9. Binary is the numbering system that network devices use to process all data. Without binary, computers and networks would not function. All data sent across a network is in binary. (From "IP addressing and subnetting: What network administrators need to know" by contributor David Davis.)

 

 

  What is a subnet? 

IP addressing and subnetting questions? Ask the expert.

Our networking fundamentals expert Chris Partsenidis can answer your questions about IP addressing, subnetting, and other networking fundamentals.

Ask Chris a question.

Read his explanation of how IP addresses and subnet masks are calculated.

A subnet (short for "subnetwork") is an identifiably separate part of an organization's network. Typically, a subnet may represent all the machines at one geographic location, in one building, or on the same local area network (LAN). Subnetting divides the standard host number into two parts, the subnet number and the host number on that subnet. (Read the full definition of subnetting on Whatis.com.)

 

 

  What is a subnet mask? 

A subnet mask is what tells your computer (or other network device) what portion of the IP address is used to represent your network and what part is used to represent hosts (other computers) on your network. For example, if you have an IP address of 1.1.1.1 and a subnet mask of 255.255.255.0, the 255s mask off the first three 1s. The logical "AND" calculation reveals that the network ID for this network is 1.1.1.0. Where the 0 is located, you could fill in hosts numbered 1 to 254. For example, the first useable host on your network is 1.1.1.1 and the last useable host is 1.1.1.254. Of special note when looking at the number of hosts in a network is this: The first IP address in a network is the network address and the last IP address is always the broadcast address. (From "IP addressing and subnetting: What network administrators need to know" by David Davis.)

 

  How do you calculate a subnet mask? 

Test your IP addressing and subnetting skills with our quiz
Mimi Shaw explains how to calculate subnet masks -- and provides cheat sheets -- in her tip, How to subnet: Subnetting calculations and shortcuts.

After you read the tip, test your subnetting and IP addressing skills with our interactive quiz.

A common real-world question when laying out your network is: "What subnet mask do I need for my network?" You can answer this question using the host's formula. The host's formula will tell you how many hosts will be allowed on a network that has a certain subnet mask. The host's formula is 2n - 2. The "n" in the host's formula represents the number of 0s in the subnet mask, if the subnet mask were converted to binary.

The subnet's formula will help you make sure you have the right subnet mask for your number of subnets. Just because you determine that you have the right number of hosts for your LAN using the host's formula doesn't mean that you will have enough subnets (networks) for your network. The subnet's formula is 2n, where n is the number of 1s added to the subnet mask, from whatever the subnet mask was.

Read more from David Davis on calculating subnet masks in these tips:

This was first published in April 2007

Dig deeper on IP Networking

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchSDN

SearchEnterpriseWAN

SearchUnifiedCommunications

SearchMobileComputing

SearchDataCenter

SearchITChannel

Close