Home > Networking Tips > Network Engineering > IP addressing and subnetting: What network administrators need to know
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

NETWORK ENGINEERING

IP addressing and subnetting: What network administrators need to know


David Davis
10.09.2006
Rating: -4.65- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Most network administrators have learned about IP addressing and subnetting at one time or another. However, just like a foreign language, if you don't use it, you will quickly forget it.

In this article, I provide an overview of what network administrators need to know about IP addressing and subnetting. I believe this overview will be beneficial to the seasoned administrator who hasn't worked with IP in a while, as well as to novice network administrators who need to know what they should learn without having to spend a long time doing it.

1. What do you need to know about addresses?

You probably know what an IP address is: a number that identifies that device on the network. But what else do you need to know? IP addresses are made up of 32 bits (IPv4 addresses, that is). We normally think of an IP address as something like 1.1.1.1, but really this can be translated into eight binary bits (see Binary-to-Decimal Conversion for more information). Each set of binary bits can represent only the numbers zero through 255. That is why your IP addresses can range only from 0.0.0.0 to 255.255.255.255.

More on this topic
Subnets and IP addressing defined

What's driving IP address management?

Login Script: Perform functions based on Subnet
By the way, the IP address 255.255.255.255 is called the "all ones" network because in binary it is represented by 32 numeral ones (1s). The all ones address is used to send a packet to all devices on all networks (as long as it isn't stopped by a router first).

Traditionally, IP addresses were broken up into classes, but those classes aren't used much any more unless you are taking a certification exam. We will learn more about classes below.

Most importantly, IP addresses must be unique on your network. If two devices have the exact same IP address, you have an IP address conflict. When that happens, either device or both devices will not work on the network. Commonly, DHCP is used to dynamically allocate IP addresses in hopes of preventing address duplication and easing the administrative burden of static IP addressing.

2. 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. If you did the logical "AND" (the calculation your computer does -- see Binary-to-Decimal Conversion for more information), you would find out 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 host on your network is 1.1.1.1 and the last host is 1.1.1.254.

IP addressing and subnetting series

What network administrators need to know

Calculate a subnet mask using the host's formula

Calculate a subnet mask using the subnet's formula

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. That's why I couldn't use IP address 1.1.1.0 and IP address 1.1.1.255. These are special, reserved addresses, but some computers will allow you to use the network address as a real computer address.

"Subnetting" is breaking up a single network into smaller networks. To do this, you add more bits (more numbers) to the subnet mask. Traditionally, we are used to seeing subnet masks that look like 255.0.0.0, 255.255.0.0, or 255.255.255.0. However, a subnet mask might also look like 255.255.128.0 or 255.255.255.224. In both of these cases, it is obvious that the network has been subnetted to break a single network into smaller networks.

3. What is the difference between "classful" and "classless" IP addressing?

When the concept of IP addressing was first thought up, it was decided that IP addresses would be put into classes. These classes are:

ClassIP address rangeDefault subnet mask
A 1.0.0.0 to 127.255.255.255 255.0.0.0
B 128.0.0.0 to 191.255.255.255 255.255.0.0
C 192.0.0.0 to 223.255.255.255 255.255.255.0

Today, these default subnet masks aren't much used except as a point of reference and trivia. For example, if I said that your IP address was 192.168.1.1 but didn't tell you the subnet mask, it would be safe to assume that your subnet mask is 255.255.255.0 because that IP address falls into the Class C range. This is also important when you take some certification tests.

In real life, an IP address today could have any legal subnet mask. For example, you may have an IP address of 1.1.1.1 with a subnet mask of 255.255.255.240. Or you may have an IP address of 192.192.192.192 with a subnet mask of 255.0.0.0. Sometimes, people will say things like "I need an entire Class C block of addresses." This just means that they want 254 contiguous and usable IP addresses.

The term "classful" means that the IP address or software is assuming that IP addresses fall into these classes and uses the default subnet mask shown. If a routing protocol, like RIP, 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, like RIP version 2, doesn't assume that IP addresses have their default subnet masks. Today, you should assume that all network devices are classless unless you find that they are not (like routing protocols RIP or IGRP, or a very old computer operating system).

4. What is a default gateway?

Contrary to popular belief, a default gateway is not a required piece of IP address configuration on any computer. However, if you want to access devices outside of your local network (such as devices on the Internet), a default gateway is required.

A default gateway is where a computer sends requests to IP addresses that are not on its local network. How does the computer know what is and what is not on its local network? As discussed above, the subnet mask is what the computer uses to know what is and what is not on its local network. Say, for example, your IP address is 1.1.1.1 and your subnet mask is 255.255.255.0, and you make a Web request to 1.1.2.1. Because of your subnet mask, your local area network is the 1.1.1.0 network. Meaning anything that is 1.1.1.1 through 254 is on your local network. Because you are requesting 1.1.2.1, which is not on your local network, that packet would be sent to your default gateway.

5. What are private IP addresses?

The private IP address space is defined by RFC1918. In this RFC, it says that no public (take that as "no Internet") devices will use or recognize the following IP addresses:

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

Your IP address may be the same on your PC as someone else's if you have a private IP address. These ranges of IP addresses are available for anyone to use on their own internal (private) network. There is no need to keep them unique. I can have IP address 192.168.1.1 on my home network and so can everyone else in the world! When I go to make a request to the Internet, however, that private IP address must be converted into a public IP address or else the Internet router I make the request to will just throw my request away (because I have a private IP address). Network Address Translation (NAT) is what performs this public-to-private translation (see RFC1631 and RFC2663 for more information on NAT).

Private IP addresses are there to reduce the need for more public IP addresses. An unintentional consequence is that they provide a tiny bit of security.

So, if I am trying to FTP to your computer on the Internet and you tell me that your IP address is 192.168.3.3, I will tell you "No, I need your public IP address, not your private IP address."

  • Continue reading the next part of this series, where we begin our discussion of calculating the subnet mask.

    About the author:
    David Davis (CCIE #9369, CWNA, MCSE, CISSP, Linux+, CEH) has been in the IT industry for 15 years. Currently, he manages a group of systems/network administrators for a privately owned retail company and authors IT-related material in his spare time. He has written more than 50 articles, eight practice tests and three video courses and has co-authored one book. His Web site is HappyRouter.com.

    Rate this Tip
    To rate tips, you must be a member of SearchNetworking.com.
    Register now to start rating these tips. Log in if you are already a member.


    Submit a Tip




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


    RELATED CONTENT
    Network Engineering
    Limit network energy consumption with computer cooling technologies
    Understanding remote scripting: Managing Windows networks using scripts, Part 9
    Network mapping in Vista for Windows XP
    Recovering domain controllers after a server disk failure
    Recovering from a server disk failure: The shortcomings of NTBCKUP
    Enabling Windows Vista's Network Mapping feature on domain networks
    Prevent unauthorized USB devices with software restriction policies, third-party apps
    How to subnet: Subnetting calculations and shortcuts
    Using Windows Vista group policy to prevent unauthorized USB device use
    ISDN implementation: Part 3 -- Cisco router ISDN configuration

    IP Addressing
    IPv4 or IPv6 -- Myths and Realities
    What is a logical network? How do you improve one?
    Why are IPv6's IP addresses in hexadecimal formatting?
    Prevent IP address conflicts on your wireless network by managing DHCP scopes
    Get IPv6 skills now rather than later
    How can I check connectivity and ping between sites?
    Can I connect to my wireless network and wired LAN simultaneously?
    How to subnet: Subnetting calculations and shortcuts
    How do IP addresses work on Layer 2 switches?
    What is the procedure for assigning network addresses?

    LANs (Local Area Networks)
    Losing the war to lock down networks might help enterprises innovate
    Prevent unauthorized USB devices with software restriction policies, third-party apps
    Can users on my LAN view my computer from other machines?
    LAN network design considerations
    Configuring VLANs
    Can my router configure devices into a LAN environment?
    What is interVLAN routing?
    Cleaning up: Managing Windows networks using scripts, part 2
    Network administration guide
    Managing Windows networks using scripts -- The basics

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    32-bit IP addressing  (SearchNetworking.com)
    fixed-length subnet mask  (SearchNetworking.com)
    GARP (Generic Attribute Registration Protocol)  (SearchNetworking.com)
    route aggregation  (SearchNetworking.com)
    route summarization  (SearchNetworking.com)
    routing table  (SearchNetworking.com)
    subnet  (SearchNetworking.com)
    subnet mask  (SearchNetworking.com)
    variable-length subnet mask  (SearchNetworking.com)
    wildcard mask  (SearchNetworking.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

  • HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersNetworking Product Trials
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts