LOGO

IP Addressing Fundamentals - Geek School: Learning Windows 7

March 12, 2013
IP Addressing Fundamentals - Geek School: Learning Windows 7

Understanding IP Addressing and Network Communication

This installment of Geek School will focus on the fundamentals of IP addressing. We will explore how this system functions and delve into more complex concepts.

Specifically, we’ll examine how a computer ascertains whether another device it’s attempting to connect with resides on the same network.

Finally, we will provide a concise overview of two crucial name resolution protocols: LLMNR and DNS.

Previous Articles in the Geek School Series

For those new to the series, be certain to review the preceding articles covering Windows 7 administration.

  • Introducing How-To Geek School: An initial overview of the series’ objectives.
  • Upgrades and Migrations: Guidance on system upgrades and data migration processes.
  • Configuring Devices: Instructions for setting up and configuring various hardware components.
  • Managing Disks: Techniques for disk partitioning, formatting, and maintenance.
  • Managing Applications: Methods for installing, updating, and removing software applications.
  • Managing Internet Explorer: Tips for optimizing and troubleshooting the Internet Explorer web browser.

Keep checking back throughout the week for further articles in this comprehensive series.

The principles discussed here are foundational to understanding network connectivity and troubleshooting common issues.

Understanding IP Addresses

Just as a postal address is essential for delivering mail, computers utilize addresses to send messages to one another across networks. These addresses are known as IP addresses, and a typical example appears as follows:

192.168.0.1

These are IPv4 (Internet Protocol version 4) addresses. Like many technical concepts, they represent a simplified view of the underlying processes within a computer. An IPv4 address is fundamentally a 32-bit value, comprised of a sequence of 32 binary digits – ones and zeros.

Binary Representation of IP Addresses

A computer interprets the familiar decimal IP address as a string of binary code. For instance, the address 192.168.0.1 would be represented internally as:

11000000 10101000 00000000 00000001

It’s important to remember that each decimal portion, or octet, of an IP address can have a maximum value of 255. This limit stems from the fact that 255 is the highest number expressible using 8 bits.

Converting Decimal to Binary

To convert an IP address into its binary equivalent, a systematic approach can be employed. A table, similar to the one below, can be constructed to facilitate this process. The conversion is performed on each octet individually.

  • Begin with an octet from the IP address, such as 192.
  • Starting from the leftmost column of the table, determine if the value in the header can be subtracted from your decimal number.
  • If the header value is less than or equal to your number, mark the corresponding column with a '1'. Subtract the header value from your remaining number.
  • If the header value exceeds your remaining number, mark the column with a '0' and proceed to the next column.

Illustrative Example: Converting 192.168.0.1

Let's demonstrate the conversion process using the example IP address 192.168.0.1.

128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0
1 0 1 0 1 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1

For the first octet, 192, we marked the 128s column with a '1', leaving 64. Since 64 is equal to the value in the next column, we also marked that with a '1', resulting in a remainder of 0. Consequently, all subsequent columns in that row were marked with '0'.

Moving to the second octet, 168, we marked the 128s column with a '1', leaving 40. As 64 is greater than 40, we marked the 64s column with a '0'. Continuing, 32 is less than 40, so we marked it with a '1', leaving 8. The 16s column received a '0', while the 8s column was marked with a '1', resulting in a final remainder of 0.

The third octet, being 0, necessitated marking all columns with '0', as no value could be subtracted from it.

Finally, the last octet, 1, allowed only the 1s column to be marked with a '1', with all other columns receiving '0'.

Subnet Masks

It's important to acknowledge that subnet masking can become quite intricate. Therefore, the focus of this discussion will be limited to classful subnet masks for clarity.

Every IP address is fundamentally composed of two distinct parts: a network address and a host address. The subnet mask serves as the mechanism utilized by a computer to differentiate between these two components within an IP address.

A typical subnet mask appears in a format similar to this:

255.255.255.0

When represented in binary, this translates to:

11111111.11111111.11111111.00000000

Within a subnet mask, the '1' bits signify the network portion, while the '0' bits denote the host portion. Observing the binary representation above, it’s evident that the initial three octets of the IP address define the network to which a device is connected, and the final octet identifies the host address.

Computers determine if a device resides on the same network as itself by performing a bitwise AND operation, utilizing the IP address and subnet mask. Consider the following scenario:

  • computerOne intends to transmit a message to computerTwo.
  • computerOne is assigned an IP address of 192.168.0.1, paired with a subnet mask of 255.255.255.0.
  • computerTwo possesses an IP address of 192.168.0.2, also with a subnet mask of 255.255.255.0.

computerOne will initially compute the bitwise AND of its own IP address and subnet mask.

It’s crucial to remember that in a bitwise AND operation, a '1' result is produced only when both corresponding bits are '1'; otherwise, the outcome is '0'.

11000000 10101000 00000000 00000001

11111111 11111111 11111111 00000000

11000000 10101000 00000000 00000000

Subsequently, computerOne will execute the bitwise AND operation for computerTwo’s IP address and subnet mask.

11000000 10101000 00000000 00000010

11111111 11111111 11111111 00000000

11000000 10101000 00000000 00000000

As demonstrated, the results of these bitwise operations are identical. This indicates that both devices are located on the same network.

IP Address Classes

As anticipated, a subnet mask with a greater number of network bits (represented by 1s) inherently limits the number of available host bits (represented by 0s). The allocation of networks and hosts is categorized into three distinct classes.

Class Breakdown

These classes define the ranges of IP addresses and the corresponding subnet masks, dictating the number of networks and hosts possible within each.

  • Class A: IP addresses range from 1-126.0.0.0, utilizing a subnet mask of 255.0.0.0. This allows for 126 networks and a substantial 16,777,214 hosts.
  • Class B: Addresses fall between 128-191.0.0.0, with a subnet mask of 255.255.0.0. This configuration supports 16,384 networks and 65,534 hosts.
  • Class C: The range is 192-223.0.0.0, employing a subnet mask of 255.255.255.0. This provides a large number of networks – 2,097,152 – but limits hosts to 254.

Reserved IP Ranges

The 127.x.x.x range is intentionally excluded from standard assignment. This entire block is designated for the loopback address, which always refers to the local machine.

Additionally, the 169.254.0.x range is reserved for Automatic Private IP Addressing (APIPA), a topic we will explore in a subsequent discussion.

Private IP Address Ranges

Historically, each device connected to the internet possessed a unique IP address. However, as the available IP address space dwindled, Network Address Translation (NAT) was introduced to create a layer of abstraction between internal networks and the public internet.

The Internet Assigned Numbers Authority (IANA) reserved specific address ranges from each class for private use:

  • Class A: 10.0.0.1 – 10.255.255.254
  • Class B: 172.16.0.1 – 172.31.255.254
  • Class C: 192.168.0.1 – 192.168.255.254

Instead of assigning a unique public IP to every device, Internet Service Providers (ISPs) now typically provide a single public IP address to a NAT Router. This router then assigns private IP addresses to devices within the network, maintaining a NAT table to manage connections to the internet.

It’s important to note that the public IP address of your NAT Router is often assigned dynamically through DHCP and may change based on your ISP’s policies.

Name Resolution

Humans find it significantly simpler to recall user-friendly names, such as FileServer1, rather than numeric IP addresses like 89.53.234.2. In smaller network environments, where more sophisticated name resolution systems like DNS are absent, a computer attempting to connect to FileServer1 can initiate a multicast message.

This message is essentially a request sent to every device on the network, inquiring as to the identity of FileServer1. This particular name resolution technique is known as LLMNR (Link-local Multicast Name Resolution).

While LLMNR functions effectively for home or small office networks, its scalability is limited. Broadcasting to a large number of clients would be excessively time-consuming, and broadcasts generally do not pass through routers.

DNS (Domain Name System)

A prevalent solution to address scalability concerns is the implementation of DNS. The Domain Name System operates as a network's directory, translating easily remembered machine names into their corresponding IP addresses through a vast database.

When a connection to FileServer1 is attempted, the computer queries a designated DNS Server for the IP address associated with that name. The DNS Server then provides the IP address, enabling the computer to establish a connection. This same name resolution method is utilized on the world’s largest network – the internet.

Modifying Your Network Configuration

Initiate the process by right-clicking the network settings icon. From the resulting context menu, choose the "Open Network and Sharing Center" option.

Subsequently, on the left-hand side of the window, click the hyperlink labeled "Change adapter settings."

geek-school-learning-windows-7-ip-addressing-fundamentals-1.jpg

Next, right-click on your active network adapter. Select "Properties" from the displayed context menu.

geek-school-learning-windows-7-ip-addressing-fundamentals-2.jpg

Within the properties window, locate and select "Internet Protocol Version 4." Then, click the "Properties" button.

geek-school-learning-windows-7-ip-addressing-fundamentals-3.jpg

This section allows for the configuration of a static IP address. Select the radio button corresponding to “Use the following IP address” to enable this feature.

Utilizing the previously obtained information, populate the fields for IP address and subnet mask. The default gateway typically corresponds to the IP address assigned to your router.

geek-school-learning-windows-7-ip-addressing-fundamentals-4.jpg

Toward the bottom of the dialog box, you will find settings for your DNS server address.

In a home network environment, a dedicated DNS server is often absent; however, your router may maintain a small DNS cache and forward requests to your Internet Service Provider.

geek-school-learning-windows-7-ip-addressing-fundamentals-5.jpg

Alternatively, consider utilizing Google's public DNS server, which is accessible at 8.8.8.8.

geek-school-learning-windows-7-ip-addressing-fundamentals-6.jpg

Remember to save your changes after configuring these settings.

Assignment Review

No assigned homework is given for this session. However, given the extensive material covered, a review of the concepts is highly recommended.

For those seeking further exploration, researching CIDR (Classless Interdomain Routing) presents an opportunity to delve into an advanced networking topic.

Further Assistance

Should any questions arise, feel free to reach out via Twitter at @taybgibb. Alternatively, you are welcome to post any inquiries as comments.

Engagement and clarification are encouraged to solidify understanding of the presented information.

#Windows 7#IP addressing#networking#Geek School#tutorial#fundamentals