Archive for the ‘IPV4’ Category

Resolving with IPV4

Tuesday, April 1st, 2008

The Internet is most publicly known not by IP addresses but by names (e.g., www.wikipedia.org, www.whitehouse.gov, www.freebsd.org, www.berkeley.edu). The routing of IP packets across the Internet is oblivious to such names. This requires translating (or resolving) names to IP address.

The Domain Name System (DNS) provides such a system to convert names to IP address(es) and IP addresses to names. Much like CIDR addressing, the DNS naming is also hierarchical and allows for subdelegation of name spaces to other DNS servers.

Think of this in a similar way to how you find a phone number. You want to call The Acme Bakers but don’t know the number. You ring directory enquiries and they tell you the number you need to dial or can even connect you. Next you might want to call Acme Builder. Again, you only need to know the phone number of directory enquiries, they will almost always have the number you want and connect you. Only if you ask directory enquiries for the number of a company which doesn’t exist will they say they can’t connect you - similar to a DNS error in your web browser.

IP Addresses ending in 0 or 255 in IPV4

Tuesday, April 1st, 2008

It is a common misconception that IP addresses ending in 255 or 0 can never be assigned to hosts on a subnet, but this is purely an artifact of classful addressing.

In classful addressing (now obsolete with the advent of CIDR), there are only 3 possible subnet masks: 255.0.0.0 (Class A), 255.255.0.0 (Class B), 255.255.255.0 (Class C). If we have the subnet 192.168.5.0/255.255.255.0, the network identifier 192.168.5.0 refers to the entire network, so to avoid confusion, it cannot be assigned to a device on the network.

A broadcast address is an IP address that allows information to be sent to all machines on a given subnet rather than a specific machine. Generally, the broadcast address is found by taking the bit complement of the subnet mask and then OR-ing it bitwise with the network identifier. More simply, the broadcast address is the last IP address in the range belonging to the subnet. In our example, the broadcast address would be 192.168.5.255, so to avoid confusion this IP address also cannot be assigned to a host. On a Class A, B, or C subnet, the broadcast address would always end in 255.

However, this does not mean that all IP addresses ending in 255 cannot be used as host IP addresses. For example, if we had a Class B subnet 192.168.0.0/255.255.0.0, this is equivalent to the range 192.168.0.0 - 192.168.255.255. The broadcast address would be 192.168.255.255. However, we can assign 192.168.1.255, 192.168.2.255, etc. (though this can cause confusion). Also, 192.168.0.0 is the network identifier and so cannot be assigned, but 192.168.1.0, 192.168.2.0, etc. can be assigned (though this can also cause confusion).

With the advent of CIDR, broadcast addresses may not necessarily end with 255.

In general, the first and last IP addresses in a subnet are used as the network identifier and broadcast address, respectively. All other IP addresses in the subnet can be assigned to hosts on the subnet.

Allocation in IPV4

Tuesday, April 1st, 2008

Originally, the IP address was divided into two parts:

* Network id – first octet
* Host id – last three octets

This created an upper limit of 256 networks. As the networks began to be allocated, this was soon seen to be inadequate.

To overcome this limit, different classes of network were defined, in a system which later became known as classful networking. Five classes were created (A, B, C, D, & E), three of which (A, B, & C) had different lengths for the network field. The rest of the address field in these three classes was used to identify a host on that network, which meant that each network class had a different maximum number of hosts. Thus there were a few networks with lots of host addresses and numerous networks with only a few addresses. Class D was for multicast addresses and class E was reserved.

Around 1993, these classes were replaced with a Classless Inter-Domain Routing (CIDR) scheme, and the previous scheme was dubbed “classful”, by contrast. CIDR’s primary advantage is to allow re-division of Class A, B & C networks so that smaller (or larger) blocks of addresses may be allocated to entities (such as Internet service providers, or their customers) or local area networks.

The actual assignment of an address is not arbitrary. The fundamental principle of routing is that address encodes information about a device’s location within a network. This implies that an address assigned to one part of a network will not function in another part of the network. A hierarchical structure, created by CIDR and overseen by the Internet Assigned Numbers Authority (IANA) and its Regional Internet Registries (RIRs), manages the assignment of Internet address worldwide. Each RIR maintains a publicly searchable WHOIS database that provides information about IP address assignments; information from these databases plays a central role in numerous tools that attempt to locate IP addresses geographically.

Addressing of IPV4

Tuesday, April 1st, 2008

IPv4 uses 32-bit (4-byte) addresses, which limits the address space to 4,294,967,296 (232) possible unique addresses. However, some are reserved for special purposes such as private networks (~18 million addresses) or multicast addresses (~16 million addresses). This reduces the number of addresses that can be allocated as public Internet addresses. As the number of addresses available are consumed, an IPv4 address shortage appears to be inevitable, however Network Address Translation (NAT) has significantly delayed this inevitability.

This limitation has helped stimulate the push towards IPv6, which is currently in the early stages of deployment and is currently the only contender to replace IPv4.

IPv4

Tuesday, April 1st, 2008

Internet Protocol version 4 (IPv4) is the fourth iteration of the Internet Protocol (IP) and it is the first version of the protocol to be widely deployed. IPv4 is the dominant network layer protocol on the Internet and apart from IPv6 it is the only standard internetwork-layer protocol used on the Internet.

It is described in IETF RFC 791 (September 1981) which made obsolete RFC 760 (January 1980). The United States Department of Defense also standardized it as MIL-STD-1777.

IPv4 is a data-oriented protocol to be used on a packet switched internetwork (e.g., Ethernet). It is a best effort protocol in that it does not guarantee delivery. It does not make any guarantees on the correctness of the data; It may result in duplicated packets and/or packets out-of-order. These aspects are addressed by an upper layer protocol (e.g., TCP, and partly by UDP).