IPv4 TCP/IP Addressing
IPv4 TCP/IP Addressing
When you talk about networking, you have to use addressing to identify a host on the network. All hosts use physical addresses known as Media Access Control (MAC) addresses. Most network interfaces have their MAC addresses
CHAPTER 5: Configuring Windows Networking
burned onto a chip and cannot be changed. These addresses are 48-bits and are expressed in hexadecimal format with colons or dashes:
00-C0-9F-8E-82-00 Much like a host address, you cannot have two hosts with the same MAC
address on the same physical network. The Address Resolution Protocol (ARP) translates from logical addresses to the MAC addresses, which can be viewed with the arp.exe command from a command prompt.
The traditional version of the IP protocol is version 4—IPv4. Each connec- tion on a TCP/IP network is assigned a unique IP address. An IPv4 address is
a logical address that is managed and organized by a network administrator. The format of the IP address is four 8-bit numbers (octets) divided by periods (.). Each number can be 0 to 255. For example, a TCP/IP address could be 131.107.3.1 or 2.0.0.1.
IP addresses are manually assigned and configured (static IP addresses) or dynamically assigned and configured by a Dynamic Host Configuration Protocol (DHCP) server (dynamic IP addresses). Because the IP address is used to identify the computer, no two connections can use the same IP address; otherwise, one or both of the computers would not be able to com- municate, which usually results in a message stating “IP address conflict.”
The TCP/IP address is broken down into a network number and a host num- ber. The network number identifies the entire network and the host number identifies the computer or connection on the specified network.
Usually when defining the TCP/IP for a network connection, IT managers also specify a subnet mask. A subnet mask is used to define which address bits describe the network number and which address bits describe the host address. Similar to the IP address, the format of the subnet mask is four 8-bit numbers (octet) divided by periods (.). Each number can be 0 to 255. For example, a subnet mask could be 255.0.0.0, 255.255.255.0, or 255.255.240.0.
For example, if you have an address of 15.2.3.6 and you define a subnet mask of 255.255.255.0, 15.2.3.0 defines the network address where every computer on that network must begin with 15.2.3. Then each computer must have a unique host number, making the entire address unique. Because the first three octets are defined as the network ID, the last octet defines the host ID. Therefore, one host (and only one host) has a host ID of 0.0.0.6 located on the 15.2.3.0 network.
In simple IPv4 networks, the subnet mask defines full octets as part of the net- work ID and host ID. Table 5.1 lists the characteristics of each IP address class.
Introduction to TCP/IP
TABLE 5.1 IP Address Classes
Class First Octet
Default Subnet
Number of
Number of Hosts
Mask
Networks
per Network
The loopback address (127.0.0.1) is a special designated IP address (127.0.0.1) that is designated for the software loopback interface of a machine and is used to test IP software. In addition, if you access localhost, you are accessing the loopback address of 127.0.01.
Unfortunately, using classes to define networks allows for a lot of wasted addresses. To make use of these wasted addresses, classless addresses, or Classless Inter-Domain Routing (CIDR), was developed to not use the specific Class A, B, and C. Because CIDR does not use assign a Class A network address to a corporation or some other organization, it does not waste 16 million addresses. Instead, what would normally be a Class A address can be divided and given to multiple companies and organizations.
Because there are no classes that have a default subnet mask, CIDR subnetting uses a different notation that defines how many bits are masked. For example, if you had a subnet mask of 255.255.255.0, you use a CIDR notation of /24. The 24 is because the first 24 bits are masked (11111111.11111111.11111111.00000000). Therefore, an address is designated as
192.168.1.1/24 If an individual network is connected to another network and users must com-
municate with any computers on the other network, they must also define the default gateway, which specifies the local address of the router. If the default gateway is not specified, users are not able to communicate with computers on other networks. If the LAN is connected to more than two networks, users must specify only one gateway, because when a data packet is sent, the gate- way first determines if the data packet needs to go to a local computer or onto another network. If the data packet is meant to be sent to a computer on another network, the gateway forwards the data packet to the router. The router then determines the best direction that the data packet must go to reach its destination.
If you are connected to the Internet, you need a default gateway. Because the default gateway address is an address of a host, it also is four 8-bit numbers
CHAPTER 5: Configuring Windows Networking
(octet) divided by periods (.). Each number can be 0 to 255. Because it must
be connected on the same network as the host, it must also have the same net- work address as the host address.
Because TCP/IP addresses are scarce for the Internet (based on the IPv4 and its 32-bit addresses), a series of addresses have been reserved to be used by the private networks. These addresses can be used by many organizations because these addresses are not seen from outside of the local network. The private IPv4 addresses are as follows:
. 10.x.x.x (1 Class A address range) . 172.16.x.x to 172.31.x.x (16 Class B address ranges) . 192.168.0.x to 192.168.255.x (256 Class C address ranges)
To allow for these addresses to connect to the Internet, you use a router that supports Network Address Translation (NAT), also known as “IP Masquerading,” which translates between the internal private addresses and the public Internet addresses.