programming4us
programming4us
DESKTOP

Windows 7 : Networking with TCP/IP (part 1) - Understanding IPv4 & Using Private IPv4 Addresses and Networking Protocols

2/27/2011 10:26:01 AM
Although Windows 7 has the capability of using several networking protocols, the primary protocols used are TCP and IP. Windows 7 uses the TCP/IP protocol for networking among peer-to-peer networks, domain-controlled networks, and the Internet. TCP/IP is a vital protocol set for using your operating system fully.

Windows 7 contains a new TCP/IP stack, referred to as a dual stack, that works with IP version 4 (IPv4) and IP version 6 (IPv6). IPv4 uses a limited 32-bit address space, defined by four octets and a subnet mask composed of four octets. IPv6 uses a 128-bit addressing scheme, allowing for the needed IP growth of the Internet.

1. Understanding IPv4

IP addresses used with IPv4 can be divided into two parts: the network ID and the host ID. The network ID identifies the network on which a computer or device is located and the host ID identifies the computer or device.

An example of an IPv4 address is 192.168.1.1, which shows the four distinct sets of numbers divided by a period, or dot. Each section separated by a dot is referred to as an octet, which correlates to an eight-bit number in binary form.

The second set of numbers associated with an IPv4 address is the subnet mask. The subnet mask identifies which parts of the IP address belong to the network ID and which parts belong to the host ID.

Subnet masks use four distinct octets separated by a period, or dot, just like the IP address. Subnet masking correlates to the network ID and the actual host ID of the computer by giving binary values of either a 1, for a bit that belongs to the network ID, or 0, for a bit that belongs to the host ID. An example of a subnet mask is 255.0.0.0, which is read in binary as 11111111.00000000.00000000.00000000. Thus, the first 8 bits of the IP address belong to the network ID and the final 24 bits belong to the host ID.

When you use standard subnet masks, you are said to be using a classful network. Classful networks are defined in three different classes: Class A, Class B, and Class C. Table 1 shows examples of the different classful networks. Table 2 shows network ID examples, and Table 3 gives some examples of subnet forms translated into binary to help you understand the differences in their formats and to differentiate the network ID portion of the subnet from the host ID portion of the subnet.

Table 1. IPv4 subnet example
Subnet classExampleMaximum nodes
Class A255.0.0.016,777,214
Class B255.255.0.065,534
Class C255.255.255.0254

Table 2. IPv4 network example
Network IDSubnet maskHost IP rangeBroadcast address
10.0.0.0255.0.0.010.0.0.1–10.255.255.25410.255.255.255
169.254.0.0255.255.0.0169.254.0.1–169.254.255.254169.254.255.255
192.168.1.0255.255.255.0192.168.1.1–192.168.1.254192.168.1.255

Table 3. IPv4 subnet to binary form example
Decimal subnet formBinary subnet form
255.0.0.011111111.00000000.00000000.00000000
255.255.0.011111111.11111111.00000000.00000000
255.255.255.011111111.11111111.11111111.00000000

For every network, two host addresses are reserved: the network address and the broadcast address. The network address is used to identify the unique network. The broadcast address is used to broadcast a message to all hosts on a network. On a classful network, address 0 is reserved to indicate the network number, and address 255 is reserved for the broadcast address.

Class A networks use the first octet in the range of 1–126. The remaining three octets define unique host IDs. Each Class A network may contain up to 16,777,214 nodes.

Class B networks use the first two octets in the range of 128–191. The remaining two octets define the unique host IDs. Each Class B network may contain up to 65,534 nodes.

Class C networks use the first three octets in the range of 192–223. The remaining octet is for unique host IDs. Each Class C network may contain up to 254 hosts.

NOTE

Out of these IP address ranges, you may note that some ranges are missing. The 127 network is reserved for local loopback. Your computer typically uses the address 127.0.0.1 to send messages to itself. The network addresses from 224 to 239 are used for multicast IPv4 addresses.

When you are working with IPv4, data is sent in discrete packets of information with a header and a payload. IPv4 headers are variable in size, between 20 and 60 bytes, in 4-byte increments. Each bit range is broken into different sections, which correspond to the range of a related field in a packet. Bit ranges consist of 0–3, 4–7, 8–15, 16–18, and 19–31. These correspond to the values 0, 32, 64, 96, 128, 160, and 160/192+ for data. See Table 4 for examples of the ranges and their use. The IP payload is of variable size as well, ranging from 8 bytes to 65,515 bytes (with sizing primarily depending on network protocols and other options). Although most people will never use this information on a regular basis, it is very useful for understanding how to troubleshoot network problems.

Table 4. IPv4 packet information
+Bits 0–34–78–1516–1819–31
0VersionHeader lengthType of serviceTotal length
32Identification

FlagsFragment offset
64Time to Live (TTL)
ProtocolHeader checksum
96Source address information



128Destination address information



160Optional information



160/192+Data transmitted




2. Using Private IPv4 Addresses and Networking Protocols

Some IP addresses designated for Class A, B, and C networks are defined as public and others are defined as private. Public IP addresses are assigned by ISPs. ISPs obtain their IP addresses from a regional Internet registry. When you connect directly to the Internet through dial-up or by connecting an ISP’s cable/DSL modem directly to your computer, your computer uses a public IP address assigned by your ISP. Not every computer that connects to the Internet needs its own IP address, however. If it did, the IPv4 addressing scheme would have run out of new addresses a long time ago. This is where private IP addresses come into the picture.

When you set up a network, you assign the computers on the network private IP addresses. Private IP addresses are defined as follows:

  • Class A private IP addresses include the addresses from 10.0.0.0 through 10.255.255.255.

  • Class B private IP addresses include the addresses from 172.16.0.0 through 172.31.255.255.

  • Class C private IP addresses include the addresses from 192.168.0.0 through 192.168.255.255.

Because private IP addresses are not routable to the Internet, your network can use the same private IP addresses that other people are using with their networks. When a computer is connected to a network that in turn connects to an ISP, your broadband router is the device that is assigned a public IP address. Your broadband router uses some tricks to allow computers with private addresses to access the Internet, despite the fact that private addresses are not routable to the Internet. Generally speaking, the router’s public IP address is the address by which all the computers on your network will be identified when they are accessing resources on the Internet.

On a network, private IP addresses are assigned in one of three ways:

Static IP address

A fixed IP address that you manually assign to a computer or device.

Dynamic IP address

An IP address automatically assigned to a computer or device by DHCP.

Automatic private IP address

An IP address automatically assigned to a computer by the operating system when a DHCP server cannot be contacted. Sometimes referred to as link-local addresses.

On a home or small-office network, you can use the DHCP service capability of your Ethernet router to assign IP addresses. Refer to the user manual of your router to find the correct procedure to configure the DHCP service to assign IP addresses automatically to computers and devices connecting to your network. Once you’ve configured the DHCP service, you may need to configure the network adapters of computers and devices to use DHCP, although it is typically the default IP addressing scheme.

Other  
  •  Windows 7 : Mapping Your Networking Infrastructure (part 2) - Viewing the Network Map & Viewing and Managing Your Network Connections
  •  Windows 7 : Mapping Your Networking Infrastructure (part 1) - Using the Network and Sharing Center
  •  Windows 7 : Understanding Home and Small-Business Networks
  •  Troubleshooting Windows 7 Programs and Features
  •  Windows 7 : Getting Help and Giving Others Assistance
  •  Windows 7 : Recovering After a Crash or Other Problem (part 3)
  •  Windows 7 : Recovering After a Crash or Other Problem (part 2) - Restoring Previous Versions of Files & Recovering Files from Backup
  •  Windows 7 : Recovering After a Crash or Other Problem (part 1) - Recovering Using Restore Points
  •  Windows Server 2008 : Installing and Configuring FTP Services (part 2) - Configuring the FTP 7.5 Features and Properties
  •  Windows Server 2008 : Installing and Configuring FTP Services (part 1) - Installing the FTP Server & Creating a Secure FTP 7.5 Site Using SSL
  •  
     
    Video tutorials
    - How To Install Windows 8

    - How To Install Windows Server 2012

    - How To Install Windows Server 2012 On VirtualBox

    - How To Disable Windows 8 Metro UI

    - How To Install Windows Store Apps From Windows 8 Classic Desktop

    - How To Disable Windows Update in Windows 8

    - How To Disable Windows 8 Metro UI

    - How To Add Widgets To Windows 8 Lock Screen

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
    programming4us programming4us
    Video
    programming4us
     
     
    programming4us