TCPIP Addressing

TCP/IP Addressing

An IP address is a 32-bit unique identifier for a node or host connection on an IP network. This 32-bit binary number is represented as four decimal values, each representing 8 bits, in the range 0 to 255 (known as octets) separated by decimal points; this is known as dotted decimal notation. For example, 140.179.220.200 and 10001100.10110011.11011100.11001000 are the same address; one is represented as a decimal number, the other as a binary number, as demonstrated in the following table.

Table 3-1. IP Address in Decimal and Binary Form

Decimal

140

179

220

200

Binary

10001100

10110011

11011100

11001000

IP addresses have two parts the network and the node. The Class of the Internet network address and the subnet mask determine which part belongs to the network address and which part belongs to the node address. It was during the early days of the Internet that the size of the network (active hosts) determined what Class of address space to use. With the advent of classless interdomain routing (CIDR) and variable length subnet masks (VLSM), these Classes were further broken down into more manageable sizes.

Technical Note: CIDR and VLSM

CIDR, also called supernetting, is an IP addressing scheme replacing the older system based on classes A, B, and C. CIDR addresses reduce the size of routing tables and make more IP addresses available within network organizations. With CIDR, a single IP address can be used to designate many unique IP addresses. A CIDR IP address looks like a normal IP address except that it ends with a slash followed by a number, called the IP prefix. For example:

172.200.0.0/16

The IP prefix specifies how many addresses are covered by the CIDR address, with lower numbers covering more addresses. An IP prefix of /12, for example, can be used to address 4096 former Class C addresses.

CIDR uses VLSM. VLSM was created to enable greater flexibility in routed IP networks, allowing for the accelerating expansion of the Internet.

Variable length subnet masking is a means of allocating IP addressing resources to subnets according to their individual need rather than some general network-wide rule. Therefore the network/host division can occur at any bit boundary in the address. Because the normal class distinctions are ignored, the new system is called classless routing, with the original system being called classful routing. Classless routing came into use in the mid-1990s due to the inefficiencies of the classful system.

CIDR and VLSM network addresses are used throughout the public Internet, although they also are used elsewhere, particularly in large private networks.

There are five different address classes. You can determine the class of an IP address by examining the first four bits of the IP address. The classes are as follows:

  • Class A addresses begin with 0xxx, or 1 to 126 decimal.

  • Class B addresses begin with 10xx, or 128 to 191 decimal.

  • Class C addresses begin with 110x, or 192 to 223 decimal.

  • Class D addresses begin with 1110, or 224 to 239 decimal.

  • Class E addresses begin with 1111, or 240 to 254 decimal.

Addresses beginning with 01111111, or 127 decimal, are reserved for loopback and for internal testing on a local machine. Class D addresses are reserved for multicasting. Class E addresses are reserved for future use. They should not be used for host addresses.

NOTE

Multicasting refers to sending a message to a select group of users, broadcasting refers to sending a message to every user connected to the network (carrying the broadcast), and unicasting refers to sending a message to a single user on a network.

Technical Note: Loopback Address

The IP address 127.0.0.1 is a loopback address and will point back to the sending machine. For example, a user can ping 127.0.0.1 and should see a 100 percent success rate (0 percent failure).

For an interactive example, Microsoft Windows users can open an MS-DOS prompt and enter the following command: ping 127.0.0.1 at the C:> prompt; so that the display looks like this: C:\>ping 127.0.0.1

You should then see the following on your screen:

 Pinging 127.0.0.1 with 32 bytes of data: Reply from 127.0.0.1: bytes=32 time<10ms TTL=128 Reply from 127.0.0.1: bytes=32 time<10ms TTL=128 Reply from 127.0.0.1: bytes=32 time<10ms TTL=128 Reply from 127.0.0.1: bytes=32 time<10ms TTL=128 Ping statistics for 127.0.0.1:     Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:     Minimum = 0ms, Maximum =  0ms, Average =  0ms C:\> 

This output shows that a ping of 32 bytes took less than 10 milliseconds to return from the interface; in this case, the interface is identified by the loopback address (127.0.0.1).

It can be determined by Class which part of the IP address belongs to the network (N) and which part belongs to the node (n).

  • Class A NNNNNNNN.nnnnnnnn.nnnnnnn.nnnnnnn

  • Class B NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn

  • Class C NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn

In the example, 140.179.220.200 is a Class B address, so by default the Network part of the address (also known as the network address) is defined by the first two octets (140.179.x.x) and the node part is defined by the last two octets (x.x.220.200).

In order to specify the network address for a given IP address, the node section is set to all 0s. In the example, 140.179.0.0 specifies the network address for 140.179.220.200. When the node section is set to all 1s, it specifies a broadcast that is sent to all hosts on the network. 140.179.255.255 specifies the example broadcast address.

There are three IP network addresses reserved for private networks, defined in RFC 1918. The addresses are as follows:

  • 10.0.0.0/8

  • 172.16.0.0/12

  • 192.168.0.0/16

These address ranges can be used by anyone setting up internal IP networks, such as a lab, a home LAN, or an enterprise LAN behind a Network Address Translation (NAT) server, proxy server, or a router. It is always safe to use these because routers on the Internet will never forward packets coming from these addresses.

Class A Addresses (/8 Prefix)

Each Class A network address has an 8-bit network-prefix with the highest order bit set to 0 and a seven-bit network number, followed by a 24-bit host-number. Today, it is no longer considered "modern" to refer to a Class A network. Class A networks are now referred to as "/8s" (pronounced "slash eight" or just "eights") because they have an 8-bit network-prefix.

A maximum of 126 (27 -2) /8 networks can be defined. The calculation requires that the 2 is subtracted because the /8 network 0.0.0.0 is reserved for use as the default route and the /8 network 127.0.0.0 (also written 127/8 or 127.0.0.0/8) has been reserved for the "loopback" function. Each /8 supports a maximum of 16,777,214 (224 -2) hosts per network. The host calculation requires that 2 is subtracted because the all-0s ("this network") and all-1s ("broadcast") host-numbers may not be assigned to individual hosts.

Because the /8 address block contains 231 (2,147,483,648) individual addresses and the IPv4 address space contains a maximum of 232 (4,294,967,296) addresses, the /8 address space is 50 percent of the total IPv4 unicast address space.

Class B Addresses (/16 Prefix)

Each Class B network address has a 16-bit network-prefix with the two highest order bits set to 1-0 and a 14-bit network number, followed by a 16-bit host-number. Class B networks are now referred to as "/16s" because they have a 16-bit network-prefix.

A maximum of 16,384 (214) /16 networks can be defined with up to 65,534 (216 -2) hosts per network. Because the entire /16 address block contains 230 (1,073,741,824) addresses, it represents 25 percent of the total IPv4 unicast address space.

Class C Addresses (/24 Prefix)

Each Class C network address has a 24-bit network-prefix with the three highest order bits set to 1-1-0 and a 21-bit network number, followed by an 8-bit host-number. Class C networks are now referred to as "/24s" because they have a 24-bit network-prefix.

A maximum of 2,097,152 (221) /24 networks can be defined with up to 254 (28 -2) hosts per network. Because the entire /24 address block contains 229 (536,870,912) addresses, it represents 12.5 percent (or 1/8th) of the total IPv4 unicast address space.

Class D and Class E Addresses

Class D and Class E network address space are unique and not managed like Class A, B, and C address space.

Class D networks have addresses from 224.0.0.0 to 239.255.255.255. Class D network addresses are used for multicast protocols.

Class E networks have addresses from 240.0.0.0 to 255.255.255.255. Class E networks are reserved for future use.



Network Sales and Services Handbook
Network Sales and Services Handbook (Cisco Press Networking Technology)
ISBN: 1587050900
EAN: 2147483647
Year: 2005
Pages: 269

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