Addressing

 < Day Day Up > 



Let's now focus on how entities on the Internet are addressed at the Network layer. Internet addresses have two forms. The first is the symbolic form for which most nontechnical users are familiar. An example of this address is www.mysite.com. This form is also called a Fully Qualified Domain Name (FQDN). The second form is numeric, and is represented by a 32-bit unsigned number. This is commonly defined in string notation, such as '192.168.1.1', but is represented as a 32-bit word (made up of the 4 bytes in the dotted string notation). The actual 32-bit value is represented in hexadecimal as 0xc0a80101.

Equivalences exist between the symbolic and numeric forms of Internet addresses. The Domain Name System (DNS) provides a global mapping of FQDNs to numeric addresses. Most, if not all, devices on the Internet have access to a resolver that communicates with a DNS server to resolve symbolic names to their numeric counterparts.

IP Addresses

Internet addresses are also called IP addresses because they are a Network layer construct. IP addresses are constructed in two parts, the first part being the network number and the second being the host number.

Note 

We focus solely on IPv4 (Internet Protocol version 4) here because it is the current standard for Internet communication. A newer version of the IP protocol called IPv6 may someday replace IPv4, but can coexist with IPv4.

There are five classes of Internet addresses, as shown in Figure 1.12. They differ in the number of networks and number of hosts that are possible in each class. For example, Class A provides for a minimal number of networks, but a large number of hosts. Class B provides more networks, but fewer hosts. Conversely, Class C provides for a large number of networks, each with a small number of hosts. Class D provides specifically for multicasting, which represent groups of hosts. Class E is reserved for future use.

click to expand
Figure 1.12: Classes of Internet addresses.

An alternative to strict classes of addresses is known as Classless InterDomain Routing (CIDR). In CIDR IP addressing, rather than applying strict classes to the 32-bit IP address, any number of bits can be assigned to a network, with the remaining bits being assigned to the host portion (rather than the strict 8, 16, or 24). This means that the IP address space is more effectively managed. Let's say that a particular site needs 19 IP addresses. This could be accommodated with the Class C domain, but because 8 bits are assigned to the host portion, 235 IP addresses would be wasted. It's easy to see from this example how much space can be wasted. With CIDR, we simply assign the number of bits necessary for the host; in this case (19 IP addresses), it's 5. With a given IP address, such as 192.11.187.1, we apply the network prefix, resulting in 192.11.187.1/27. This means that the upper 27 bits are used to identify the network, with the remaining 5 bits used to identify the host.

With the growth of technologies such as IP masquerading and Network Address Translation (NAT), ideas of public and private addresses are more commonplace. NAT permits a private network to use private addresses and to then translate them to public addresses when communicating over the WAN. The net effect of this technology is minimizing the use of public addresses and, therefore, providing IPv4 with a longer life. This technology is also called 'IP Sharing,' in which a single public IP address is shared internally by a number of hosts using a number of private IP addresses. The gateway host provides the mapping of requests (translation) to the external world and back.

Subnetting

Within a particular network, classes of addresses can be further refined than what is shown in Figure 1.12. For example, a network of type Class C can support up to 254 hosts. An administrator on that network can utilize the hosts number to define additional networks with fewer numbers of hosts (splitting the bits up between internal networks and internal hosts). Although hosts and other devices are cognizant of the split internally, it is invisible to the external network. This provides for better utilization and separation of subnets within an internal network.

Note 

Although 256 unique hosts can be represented by an 8-bit host identifier, only 254 may be assigned. This is because the zero address is used to represent 'this' address (the current address), and the 255 address represents 'all' addresses (a local broadcast).



 < Day Day Up > 



BSD Sockets Programming from a Multi-Language Perspective
Network Programming for Microsoft Windows , Second Edition (Microsoft Programming Series)
ISBN: 1584502681
EAN: 2147483647
Year: 2003
Pages: 225
Authors: Jim Ohlund

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net