Understanding IP Addressing Networking

IP moves data between computer systems in the form of a series of one or more packets, often making up a TCP or UDP datagram, and each datagram is delivered to the IP destination system and to the port number (on that system) that is contained in the encapsulated TCP or UDP header. This destination socket, or port and address combination, is a standard 48-bit number (a 32-bit IP address and a 16-bit port number) that contains enough information to identify the receiving network, the host for which the datagram is intended on that network, and the application running on that host.

Overview of Ethernet Addresses

TCP/IP is independent of the underlying network hardware. If you are running on an Ethernet-based network, be careful not to confuse the Ethernet hardware address and the IP address required by TCP/IP.

Each Ethernet network card (and any other NIC, for that matter) has its own unique hardware address, known as the media access control (MAC) address. This hardware address is predefined and preprogrammed on the NIC by the manufacturer of the board as a unique 48-bit number.

The first three bytes of this address are called the Organizationally Unique Identifier (OUI) and are assigned by the Institute of Electrical and Electronics Engineers (IEEE). Manufacturers purchase OUIs and then vary the last three bytes of the MAC address for each interface they produce, making each address unique provided no other manufacturer makes unauthorized use of the OUI and related address space. Remember that the Ethernet address is predetermined and is hard-coded onto the NIC. IP addresses, however, are very different.

Overview of IP Addresses

TCP/IP requires that each interface on a TCP/IP network have its own unique IP address. There are two addressing schemes for TCP/IP: IPv4 and IPv6.

IPv4

An IPv4 address is a 32-bit number, usually represented as a four-part decimal number with each of the four parts separated by a period or decimal point. You may also hear this method of representation called dotted decimal or dotted quad decimal. In the IPv4 address, each individual byte, or octet as it is sometimes called, can have a value in the range of 0 through 255.

The way these addresses are used varies according to the class of the network, so all you can say with certainty is that the 32-bit IPv4 address is divided in some way to create an identifier for the network, which all hosts on that network share, and an identifier for each host, which is unique among all hosts on that network. In general, though, the higher-order bits of the address make up the network part of the address and the rest constitutes the host part of the address. In addition, the host part of the address can be divided further to allow for a subnetwork address.

Some host addresses are reserved for special use. For example, in all network addresses, host numbers of all 0s and all 1s are reserved. An IPv4 host address with all host bits set to 0 in binary identifies the network itself, so 10.0.0.0 refers to network 10. An IP address with all host bits set to 1 in binary is known as a broadcast address. The broadcast address for network 172.16 is 172.16.255.255. A datagram sent to this address is automatically sent to every individual host on the 172.16 network.

American Registry for Internet Numbers (ARIN) assigns and regulates IP addresses on the Internet; you can get one directly from ARIN, or you can ask your Internet service provider (ISP) to secure an IP address on your behalf. Another strategy is to obtain your address from ARIN and only use it internally until you are ready to connect to the Internet.

IPv4 Address Classifications

In an IPv4 address, the default number of bits used to identify the network and the host vary according to the network class of the address. While other methods, such as Classless Inter- Domain Routing, are currently more popular for specifying address space boundaries for entities of various sizes, the following classes of IP addresses originally offered a default set of boundaries for varying sizes of address space and still provide a fallback mechanism for end and intermediate devices in the absence of ample subnetting information:

  • Class A was designed for very large networks only. The default network portion for Class A networks is the first 8 bits, leaving 24 bits for host identification. The high-order bit is always binary 0, which leaves 7 bits available for IANA to define 127 networks. The remaining 24 bits of the address allow each Class A network to hold as many as 16,777,214 hosts. Examples of Class A networks include General Electric, IBM, Hewlett-Packard, Apple, Xerox, Compaq, Columbia University, MIT, and the private network 10.0.0.0. All possible Class A networks are in use; no more are available.
  • Class B was designed for medium-sized networks. The default network portion for Class B networks is the first 16 bits, leaving 16 bits for host identification. The 2 high-order bits are always binary 10, and the remaining 14 bits are used for IANA to define 16,384 networks, each with as many as 65,534 hosts attached. Examples of Class B networks include Microsoft, Exxon, and the 16 private networks ranging from 172.16.0.0 to 172.31.0.0, inclusive. Class B networks are generally regarded as unavailable, but address conservation techniques have made some of these addresses become available from time to time over the years.
  • Class C was designed for smaller networks. The default network portion for Class C networks is the first 24 bits, leaving 8 bits for host identification. The 3 high-order bits are always binary 110, and the remaining 21 bits are used by IANA to define 2,097,152 networks, but each network can have a maximum of only 254 hosts. Examples of Class C networks are the 256 private networks ranging from 192.168.0.0 to 192.168.255.0. Class C networks are still available.
  • Class D is the multicast address range and cannot be used for networks. There is no network/ host structure to these addresses. They are taken as a complete address and used as destination addresses only, just like broadcast addresses. The 4 high-order bits are always 1110, and the remaining 28 bits allow access to more than 268 million possible addresses.
  • Class E is reserved for experimental purposes. The first 4 bits in the address are always 1111.

The IP Address Structure

IP Address Structure

Because the bits used to identify the class are combined with the bits that define the network address, we can draw the following conclusions from the size of the first octet, or byte, of the address:

  • A value of 126 or less indicates a Class A address. The first octet is the network number; the next three, the host ID.
  • A value of exactly 127, while technically in the Class A range, is reserved as a software loopback test address. If you send an echo request to 127.0.0.1, the ping doesn’t actually generate any network traffic. It does, however, test that TCP/IP is installed correctly. Using this number as a special test address has the unfortunate effect of wasting almost 17 million possible IP addresses, a case of early-70s short-sightedness, much like the theory that 64KB of RAM should be enough for PCs.
  • A value of 128 through 191 is a Class B address. The first two octets are the network number, and the last two are the host address.
  • A value of 192 through 223 is a Class C address. The first three octets are the network address, and the last octet is the host address.
  • A value of 224 through 239 is a Class D multicast address. Again, there are no network or host portions to multicast addresses.
  • A value greater than 239 indicates a reserved Class E address.

IPv6

IPv6 was originally designed because the number of available unregistered IPv4 addresses was running low. Because IPv6 uses a 128-bit addressing scheme, it has more than 79 octillion (that’s 79,000,000,000,000,000,000,000,000,000 to you and me) times as many available addresses as IPv4. Also, instead of representing the binary digits as decimal digits, IPv6 uses eight sets of four hexadecimal digits, like so:

3FFE:0B00:0800:0002:0000:0000:0000:000C

In addition, you can abbreviate these very long addresses by dropping leading 0s (zeros) (like the 0 before the B in “0B00”). You can also drop any single grouping of zero octets (as in the number above) between numbers as long as you replace them with a double colon (::) and they are complete octets (you can’t drop the three 0s in the second octet to make it just “B” instead of “0B00,” for example). If you apply this rule (known as the zero compression rule) to the above address, it would make the example address look like so:
3FFE:0B00:0800:0002::000C

As with IPv4, there are several addresses that are reserved for special uses. For example, the IPv6 address ::/0 is the default address for a host that has yet to be assigned an address (like 0.0.0.0 in IPv4). The address ::1/128 is reserved for the local loopback (like 127.0.0.1 in IPv4). IPv6 also includes provisions for the old IPv4 hosts so they can be migrated to the new addressing scheme. This is accomplished by using the address ::xxx.xxx.xxx.xxx, where the last four sets of digits refer to the old IPv4 address.

The way a host is configured is one very unique aspect of the IPv6 addressing scheme. Instead of an IP address, subnet mask, and default gateway, each station is required to have three different addresses. First of all, the host has an address from each upstream supplier, a local address, and a link-local address. The local address is a number like ::1/128 that defines the local host. The link-local address is the address for the local subnet.

Finally, IPv6 has some other unique addressing concepts, like autoconfiguration (similar to DHCP, but extended further) and neighbor discovery, whereby the IPv6 host discovers its network surroundings.

Understanding Subnets

The IP addressing scheme provides a flexible solution to the task of addressing thousands of networks, but it is not without problems. The original designers did not envision the Internet growing as large as it has; at that time, a 32-bit address seemed so large that they quickly divided it into different classes of networks to facilitate routing rather than reserving more bits to manage the growth in network addresses. To solve this problem, and to create a large number of new network addresses, another way of dividing the 32-bit address was developed, called subnetting.

An IP subnet modifies the IP address by using host ID bits as additional network address bits. In other words, the dividing line between the network address and the host ID is moved to the right, thus creating additional networks but reducing the number of hosts that can belong to each network.

When IP networks are subnetted, they can be routed independently, which allows a much better use of address space and available bandwidth. To subnet an IP network, you define a bit mask, known as a subnet mask, in which a bit pattern of consecutive is followed by consecutive 0s is ANDed with the IP address to produce a network address with all 0s in the host ID.

Working out subnet masks is one of the most complex tasks in network administration and is not for the faint of heart. If your network consists of a single segment (in other words, there are no routers on your network), you will not have to use this type of subnetting, but if you have two or more segments (or subnets), you will have to make some sort of provision for distributing IP addresses appropriately. Using a subnet mask is the way to do just that.

The subnet mask is similar in structure to an IP address in that it has four parts, or octets, but it works a bit like a template that, when superimposed on top of the IP address, indicates which bits in the IP address identify the network and which bits identify the host. In binary, if a bit is on (set to 1) in the mask, the corresponding bit in the address is interpreted as a network bit. If a bit is off (reset to 0) in the mask, the corresponding bit in the address is part of the host ID. The 32-bit value may then be converted to dotted decimal notation for human consumption.Sometimes, you will use only one subnet mask to subnet your network. Variable Length Subnet Masking (VLSM) is the practice of using more appropriate varied subnet masks with the same classful network for the different subnet sizes. A classful network is one subnetted to the default boundaries of network and host bits, based on the class of IP address.

A subnet is only known and understood locally; to the rest of the Internet, the address is still interpreted as a classful IP address (and maybe even as a group of classful addresses) if an entity has administrative control over a contiguous block of such addresses.

Routers then use the subnet mask to extract the network portion of the address so that they can compare the computed network address with the routing table entry corresponding to the mask used and send the data packets along the proper route on the network.

default-subnet Masks for standard Ip address classes

Because pretty much all the Class A and Class B networks are taken, you are most likely to encounter subnet-related issues when working with a Class C network or with any private address space. In the next section, you’ll get a detailed look at how to subnet a Class C network.

Subnetting a Class C Network

How do you find out the values that you can use for a Class C network subnet mask? Remember from a previous discussion that InterNIC defines the leftmost three octets in a Class C address, leaving you with the rightmost octet for your own host and subnetting use. If your network consists of a single segment, you have the following subnet mask:

11111111 11111111 11111111 00000000

When expressed as a decimal number, this is

255.255.255.0

Because all of your addresses must match these leftmost 24 bits, you can do what you’d like with the last 8 bits, given a couple of exceptions that we’ll look at in a moment. You might decide to divide your network into two equally sized segments, with, for example, the numbers 0 through 127 as the first subnet (00000000 through 01111111 in binary) and the numbers 128 through 255 as the second subnet (10000000 through 11111111 in binary). Notice how the numbers within each subnet can vary only in the last seven places. So, placing 1s in the mask where the bits should be identical for all hosts in a subnet, the subnet mask becomes

255.255.255.128

In binary this is

11111111.11111111.11111111.10000000

Now let’s get back to the exceptions mentioned earlier. The network number is the first numberin each range, so the first subnet’s network number is X.Y.Z.0 and the second is X.Y.Z.128 (X, Y, and Z are the octets assigned by InterNIC). The default router address is commonly the second number in each range—X.Y.Z.1 and X.Y.Z.129—and the broadcast address is the last address, or X.Y.Z.127 and X.Y.Z.255. You can use all the other addresses within the range asyou see fit on your network.

class-C-network divided into four subnets

Table describes how you can divide a Class C network into eight equally sized subnets with a subnet mask of 255.255.255.224. This gives you 30 IP addresses on each subnet once you have accounted for the network and broadcast addresses. You can continue this trend for subnet masks with fourth-octet values of 240, 248, and 252. A fourth-octet value of 254 is widely regarded as unusable because the only possible values in each subnet have only 0s or 1s in the host portion, which are illegal for assignment to hosts.

class-c-network divided into eight subnets

Classless Inter-Domain Routing (CIDR)

InterNIC no longer gives out addresses under the Class A, B, or C designations. Instead, it uses a method called Classless Inter-Domain Routing (or CIDR, which is usually pronounced “cider”).

CIDR networks are described as “slash x (/x)” networks; the x represents the number of bits in the IP address range that InterNIC controls, more easily seen as the number of bits in the subnet mask set to 1. This allows InterNIC to define networks that fall between the old classifications, which means that you can get a range of addresses much better suited to your needs than in times past. In CIDR terms, a network classified as a Class C network under the old scheme becomes a /24 network because InterNIC controls the leftmost 24 bits and you control the rightmost 8 bits.

Examples of CIDR network types

IP Proxy Servers

A proxy server is one of several solutions to the problems associated with connecting your intranet or corporate network to the Internet. A proxy server is a program that handles traffic to external host systems on behalf of the client software running on the protected network; this means that clients access the Internet through the proxy server. It’s a bit like those one-way mirrors –you can see out, but a potential intruder cannot see in.

A proxy server sits between a user on your network and a server out on the Internet. Instead of communicating with each other directly, each talks to the proxy (in other words, to a “standin”). From the user’s point of view, the proxy server presents the illusion that the user is dealing with a genuine Internet server. To the real server on the Internet, the proxy server gives the illusion that the real server is dealing directly with the user on the internal network. So a proxy server can be both a client and a server; it depends on which way you are facing. The point to remember here is that the user is never in direct contact with the Internet server.

The proxy server does more than just forward requests from your users to the Internet and back. Because it examines and makes decisions about the requests that it processes, it can control what your users can do. Depending on the details of your security policy, client requests can be approved and forwarded, or they can be denied. And rather than requiring that the same restrictions be enforced for all users, many advanced proxy server packages can offer different capabilities to different users.

How a Proxy Server Works

How a Proxy Server Works

Proxy Server Caching

Many proxy servers can cache documents, which is particularly useful if a number of clients request the same document independently. With caching, the client request is filled more quickly and Internet traffic is reduced. The types of caching are as follows:

Active Caching The proxy server uses periods of low activity to go out and retrieve documents that it thinks will be requested by clients in the near future.

Passive Caching The proxy server waits for a client to make a request, retrieves the document, and then decides whether or not to cache the document.

Large companies may have multiple proxy servers, and two caching standards have emerged:

Internet Cache Protocol (ICP) Internet Cache Protocol (ICP) specifies a message format to be used for communications between proxy servers; these messages are used to exchange information about the presence or absence of a specific web page in the proxy server cache. Unfortunately,

ICP is not scalable, and the number of ICP messages exchanged between proxy servers climbs rapidly as the number of proxy servers increases.

Cache Array Routing Protocol (CARP) Cache Array Routing Protocol (CARP) offers a solution to the ICP problem by using multiple proxy servers with a single large cache. CARP removes the need for proxy server–to–proxy server communications and also prevents the information in the cache from becoming redundant over time. CARP is referred to as queryless distributed caching and is supported in Netscape and Microsoft proxy server products.



Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Networking Topics