Home > Articles > Security > Network Security

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

IP Addresses

IP identifies each network interface by a unique IP number. An IPv4 address is a 32-bit numeric value, divided into 4 individual 8-bit bytes, ranging from 0 through 255. In dotted-decimal notation, each of the 4 bytes making up the 32-bit value is represented as one of the quads in the IP address. For example, the IP address is used as the local host address in the figures throughout this book.

IP addresses are divided into two fields: a network address and a host address within that network. Historically, there were five primary network classes, labeled A through E. Each class is defined by a particular sequence of leading bits in the network part of the IP address. The first 3 classes, A through C, are used for individual host addresses. Class A uses one byte as the network field; Class B uses two bytes; Class C uses 3 bytes; Classes D and E have specialized uses.

Network Address Classes and CIDR

The concept of the Class A, B, and C network address families is widely used, and useful, today. Formally, however, the concept of address classes has been replaced with the concept of Classless Inter-Domain Routing (CIDR). The idea is that the size of the network field in the IP address can be an arbitrary number of bits long. The network field is referred to as a network prefix, or the number of contiguous bits used to identify the network. The remaining bits are used to identify hosts in that network. The goal of CIDR is to allow much finer-grained address block allocation, and to simplify and reduce the size of routing tables. In practice, both addressing models are in use, but the IP address allocation authorities use CIDR, and routers must support it.

Address classes lend themselves well to examples in a book, because the network and host fields fall on byte boundaries.

n Class A network addresses use the high 8 bits of the IP address, the most significant bit being 0, allowing for 128 networks, each containing more than 16 million host addresses. (There are actually 126 networks rather than 128, because network 0 and network 127 are special, non-routable networks.) Usable Class A addresses range from to Figure 1.2 shows this visually.

Figure 1.2. Class A address.

  • Class B network addresses use the high 16 bits of the IP address, the two most significant bits being 10, allowing for more than 16 thousand networks, each containing over 65 thousand host addresses. Class B addresses range from to Figure 1.3 shows this visually.

  • Figure 1.3. Class B Address.

  • Class C network addresses use the upper 24 bits of the IP address, the three most significant bits being 110, allowing for 2 million networks, each containing 254 host addresses (host addresses 0 and 255 having special meaning). Class C networks range from to Figure 1.4 shows this visually.

  • Figure 1.4. Class C Address.

  • Class D multicast IP addresses, the four most significant bits being 1110, are set aside for use as destination addresses when participating in a multicast network broadcast, where many hosts can use a single address to refer to many other hosts. Class D addresses range from to

  • Class E reserved IP addresses, the four most significant bits being 1111, are set aside for future and experimental use and are not assigned publicly. They range from to

  • Classless, unallocated, reserved IP addresses follow. They range from to

Special IP Addresses

There are three major special cases of IP addresses:

n Network address 0—As noted under Class A addresses, network address 0 is not used as part of a routable address. When used as a source address, its only legal use is during initialization when a host is attempting to have its IP address dynamically assigned by a server. When used as a destination, only address has meaning, and then only to the local machine as referring to itself, or as a convention to refer to a default route.

n Loopback network address 127—As noted under Class A addresses, network address 127 is not used as part of a routable address. Loopback addresses refer to a private network interface supported by the operating system. The interface is used as the addressing mechanism for local network-based services. In other words, local network clients use it to address local servers. Loopback traffic remains entirely within the operating system. It is never passed to a physical network interface. Typically, is the only loopback address used, referring to the local host.

n Broadcast addresses are special addresses applying to all hosts on a network. There are two major categories of broadcast addresses. Limited broadcasts are not routed but are delivered to all hosts connected to the same physical network segment. All the bits in both the network and host fields of the IP address are set to one, as Network-directed broadcasts are routed, being delivered to all hosts on a specified network. The IP address's network field specifies a network. The host field is usually all ones, as in Alternatively, you might sometimes see the address specified as the network address, as in

Subnetting—the Local Version of CIDR

Subnetting is a local extension to the network address part of the local IP addresses. A local network mask is defined that treats some of the most significant host address bits as if they were part of the network address. These additional network address bits serve to define multiple networks locally. Remote sites are not aware of local subnets. They see the address range as normal Class A, B, or C addresses.

For example, let's take the Class C private address block, Within this address block, defines the address as a Class C network address, containing up to 254 hosts. The network mask for this network is, exactly matching the first 24 bits, the network prefix, of the network. (Remember that, the highest address, is the broadcast address for this network. Of the 256 addresses, 254 are available. The lowest address is the network address.)

This network can be subnetted into two local networks by defining the first 25 bits, rather than the first 24 bits, as the network prefix. The most significant bit of the host address field is now treated as part of the network address field. The host field now contains 7 bits rather than 8. The network mask becomes Two subnetworks are defined:, addressing hosts from 1 to 126, and, addressing hosts from 129 to 254. Each subnet loses 2 host addresses because each subnet uses the lowest host address, 0 or 128, as the network address, and the highest host address, 127 or 255, as the broadcast address (see Table 1.1).

Table 1.1 Class C Network Subnetted into Two Subnets

Subnetworks and can be assigned to two separate internal network interface cards. From the Internet's point of view, the site consists of a single network of up to 254 hosts. Internally, the site consists of two independent networks, each containing up to 126 hosts.

Subnetting allows for the creation of multiple internal networks, each containing different classes of client or server machines, each with its own, independent routing. Different firewall policies can be applied to the two networks.

Host Names and IP Addresses

People like to use words to name things, such as giving computers names like mycomputer.mydomain.myisp.net. Technically, it's not the computer that's being named, but the network interface in the computer. If the computer has multiple network cards, each card will typically have a different name and address, and most likely be on a different network in a different subdomain.

Host name elements are separated by dots. In the case of mycomputer.mydomain.myisp.net, the leftmost element, mycomputer, is the host name. The .mydomain, .myisp, and .net are elements of the domains this network card is a member of. Network domains are hierarchical trees. The most common top level domains are .com, .edu, .org, and .net. These top level domains are intended for commercial sites, educational sites, organizations, and networks, respectively.

What is a domain? It's a naming convention. The hierarchical domain tree represents the hierarchical nature of the global Domain Name Service (DNS) database. DNS maps between the symbolic names people give to computers and networks and the numeric addresses the IP layer uses to uniquely identify network interfaces.

DNS maps in both directions—IP address to name and name to IP address. When you click on a URL in your web browser, the DNS database is consulted to find the unique IP address associated with that host name. The IP address is passed to the IP layer to use as the destination address in the packet.

IP Addresses and Ethernet Addresses

Whereas the IP layer identifies network hosts by their 32-bit IP address, the subnet or link layer identifies the Ethernet card by its unique 48-bit Ethernet address, or MAC address, which the manufacturer burns into the card. IP addresses are passed between the endpoint hosts to identify themselves. Ethernet addresses are passed between adjacent hosts and routers.

Ordinarily, the Ethernet address could be ignored in a firewall discussion. The Layer 2 hardware Ethernet address is not visible to the Layer 3 IP level or Layer 4 transport level. iptables has the extended ability to access and filter on the MAC address. There are specialized uses for this firewall functionality, but it's important to remember that Ethernet addresses do not pass end-to-end across the network. Ethernet addresses are passed between adjacent network interfaces, or hosts and routers. They are not passed through a router unchanged.

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020