This document provides an overview of IP addressing and networking concepts such as subnetting. It discusses the structure of IP addresses, including the network and host portions. It also describes IP address classes (A, B, C) and how subnet masks are used to define the network and host portions. The document aims to explain basic IP addressing concepts.
This document provides an overview of IP addressing and networking concepts such as subnetting. It discusses the structure of IP addresses, including the network and host portions. It also describes IP address classes (A, B, C) and how subnet masks are used to define the network and host portions. The document aims to explain basic IP addressing concepts.
Introduction • Today, the Internet has entered the public consciousness as the world's largest public data network, doubling in size every nine months. This is reflected in the tremendous popularity of the World Wide Web (WWW), the opportunities that businesses see in reaching customers from virtual storefronts, and the emergence of new types and methods of doing business. It is clear that expanding business and social awareness will continue to increase public demand for access to resources on the Internet • There is a direct relationship between the value of the Internet and the number of sites connected to the Internet. As the Internet grows, the value of each site's connection to the Internet increases because it provides the organization with access to an ever expanding user/customer population An overview of IP (Internet Protocol) address • An IP address is a logical address of a computer which is expressed as a four 8-bit group of bits (a total of 32 bits) separated by periods. Each 8-bit group of bits can be represented by a 4-digit decimal that spans between 0 and 255. For example 196.27.22.42 is a typical IP address of the DNS server of the Ethiopian Telecommunication Corporation (ETC). The total number of distinct addresses one can have from this 32 bit addressing scheme is 232 = 4,294,967,296. Structure of IP address • An IP address is simply a series of 32 binary bits (ones and zeros). It is very difficult for humans to read a binary IP address. For this reason, the 32 bits are grouped into four 8-bit bytes called octets. An IP address in this format is hard for humans to read, write and remember. To make the IP address easier to understand, each octet is presented as its decimal value, separated by a decimal point or period. This is referred to as dotted-decimal notation. • The 32-bit IP address is defined with IP version 4 (IPv4) and is currently the most common form of IP address on the Internet. There are over 4 billion possible IP addresses using a 32- bit addressing scheme. Parts of IP address • The logical 32-bit IP address is hierarchical and is made up of two parts. The first part identifies the network and the second part identifies a host on that network. Both parts are required in an IP address. • As an example, if a host has IP address 192.168.18.57 the first three octets (i.e. 192.168.18) identify the network portion of the address, and the last octet (i.e. 57) identifies the host. • This is known as hierarchical addressing because the network portion indicates the network on which each unique host address is located. Routers only need to know how to reach each network, rather than needing to know the location of each individual host. • Another example of a hierarchical network is the telephone system. With a telephone number, the country code, area code and exchange represent the network address and the remaining digits represent a local phone number. How IP address and Subnet mask Interact • There are two parts to every IP address. How do hosts know which portion is the network and which is the host? This is the job of the subnet mask. • When an IP host is configured, a subnet mask is assigned along with an IP address. Like the IP address, the subnet mask is 32 bits long. The subnet mask signifies which part of the IP address is network and which part is host. • The subnet mask is compared to the IP address from left to right, bit for bit. The 1s in the subnet mask represent the network portion; the 0s represent the host portion. In the example shown, the first three octets are network, and the last octet represents the host. • When a host sends a packet, it compares its subnet mask to its own IP address and the destination IP address. If the network bits match, both the source and destination host are on the same network and the packet can be delivered locally. If they do not match, the sending host forwards the packet to the local router interface to be sent on to the other network. • The subnet masks we see most often with home and small business networking are: 255.0.0.0 (8-bits), 255.255.0.0 (16 bits) and 255.255.255.0 (24 bits). A subnet mask of 255.255.255.0 (decimal) or 11111111.11111111.1111111.00000000 (binary) uses 24 bits to identify the network number which leaves 8 bits to number the hosts on that network. • To calculate the number of hosts that can be on that network, take the number 2 to the power of the number of host bits (28 = 256). From this number, we must subtract 2 (256-2). The reason we subtract 2 is because all 1s within the host portion of an IP address is a broadcast address for that network and cannot be assigned to a specific host. All 0s within the host portion indicates the network ID and again, cannot be assigned to a specific host. • Another way to determine the number of hosts available is to add up the values of the available host bits (128+64+32+16+8+4+2+1 = 255). From this number, subtract 1 (255-1 = 254), because the host bits cannot be all 1s. It is not necessary to subtract 2 because the value of all 0s is 0 and is not included in the addition. Standard IP Address Classes Classful IP Addressing • When IP was first standardized in September 1981, the specification required that each system attached to an IP based internet be assigned a unique, 32-bit Internet address value. Some systems, such as routers which have interfaces to more than one network, must be assigned a unique IP address for each network interface. • The first part of an Internet address identifies the network on which the host resides, while the second part identifies the particular host on the given network. This created the two level addressing hierarchy which is illustrated in the figure below. Primary Address Classes • In order to provide the flexibility required to support different size networks, the designers decided that the IP address space should be divided into three different address classes - Class A, Class B, and Class C. This is often referred to as "classful" addressing because the address space is split into three predefined classes, groupings, or categories. Each class fixes the boundary between the network-prefix and the host number at a different point within the 32-bit address. The formats of the fundamental address classes are illustrated in the figure below. Class A Networks (/8 Prefixes) • 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") since 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. Since 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% of the total IPv4 unicast address space. Class B Networks (/16 Prefixes) • 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" since 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. Since the entire /16 address block contains 230 (1,073,741,824) addresses, it represents 25% of the total IPv4 unicast address space. Class C Networks (/24 Prefixes) • 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" since 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. Since the entire /24 address block contains 229 (536,870,912) addresses, it represents 12.5% (or 1/8th) of the total IPv4 unicast address space. Other Classes • In addition to the three most popular classes, there are two additional classes. Class D addresses have their leading four-bits set to 1- 1-1-0 and are used to support IP Multicasting. Class E addresses have their leading four-bits set to 1-1-1-1 and are reserved for experimental use Dotted-Decimal Notation Subnetting • In 1985, RFC 950 defined a standard procedure to support the subnetting, or division, of a single Class A, B, or C network number into smaller pieces. Subnetting was introduced to overcome some of the problems that parts of the Internet were beginning to experience with the classful two-level addressing hierarchy: • - Internet routing tables were beginning to grow. • - Local administrators had to request another network number from the Internet before a new network could be installed at their site. • Both of these problems were attacked by adding another level of hierarchy to the IP addressing structure. Instead of the classful two-level hierarchy, subnetting supports a three-level hierarchy. The figure below illustrates the basic idea of sub netting which is to divide the standard classful host-number field into two parts - the subnet-number and the host number on that subnet. Subnet Design Considerations • The deployment of an addressing plan requires careful thought on the part of the network administrator. There are two key questions that must be answered before any design should be undertaken: • 1) How many total subnets does the organization need today and in the future? • 2) How many hosts are there on the organization's largest subnet today and in the future? Private Address Space • There are two types of IP addresses: - public and private. The private address space is used to communicate in a local (Intranet) network where the computers are not visible to the global network (the Internet). Whereas public IP addresses are visible to the Internet. Private IP addresses can be used in any network as long as they are unique in the specific Intranet. • These blocks of private IP addresses that are reserved by the Internet Assigned Numbers Authority (IANA) for private networks are shown in table below. Starting Address Ending Address Remark
1 10.0.0.0 10.255.255.255 We can have 224 private IP
addresses
2 172.16.0.0 172.31.255.255 We can have 220 private IP
addresses
3 192.168.0.0 192.168.255.255 We can have 216 private IP
addresses Some protocols used with IP Address Resolution Protocol • In order for devices to communicate, the sending devices need both, the IP addresses and the MAC addresses, of the destination devices. When they try to communicate with devices whose IP addresses they know, they must determine the MAC addresses. The TCP/IP suite has a protocol, called ARP that can automatically obtain the MAC address. ARP enables a computer to find the MAC address of the computer that is associated with an IP address • Suppose you are on system 128.6.4.194 and you want to connect to system 128.6.4.7. Your system will first verify that 128.6.4.7 is on the same network, so it can talk directly via Ethernet. Then it will look up 128.6.4.7 in its ARP table (A table mapping IP addresses to MAC addresses), to see if it already knows the Ethernet address. If so, it will stick on an Ethernet header, and send the packet. But suppose this system is not in the ARP table. There is no way to send the packet, because you need the Ethernet address. So it uses the ARP protocol to send an ARP request. Dynamic Host Configuration protocol (DHCP) • DHCP is a mechanism to assign unique IP addresses to DHCP clients automatically. Under DHCP, a computer is designated as the DHCP server. All of the other computers on the network - at least, those that need an IP address - will be DHCP clients (computers that already have a permanently set IP address don't need to participate). The network administrator needs to initially configure the DHCP server. Part of that configuration process involves assigning the DHCP server a block of IP address numbers that it can dispense to nodes that need IP addresses. • When a new node comes onto the network - assuming it is capable of being a DHCP client - it will broadcast a request for an IP address. Simply put, the DHCP server will respond by checking its table of address assignments, selecting the next available address, and sending a response back to the requesting node. • The actual process is more complex than that, as the requesting client must first find a DHCP server. Also, the protocol is constructed so that a client may negotiate with more than one DHCP server. The Future IP (IPv6) • Motivation: • • Limited address space - at the current growth of the Internet, all the possible network prefixes will soon be assigned. • • Need for Quality of service (QoS) guarantees for emerging real-time applications. Characteristics of IPv6 • IP retains many of the design features of the existing IPv4. • The new features of IP v6 can be grouped into 5 main categories: • Address size: 128-bit addresses instead of 32 bits. • Header format: almost every field in the header has been changed. Extension Headers: IPv6 encodes info into separate headers, instead of using a single header. • QoS offerings: includes a mechanism which allows for differentiated quality of service for applications. • Extensible protocol: IPv6 does not specify all possible protocol features. Instead, it allows a sender to add additional information to a datagram. This makes IPv6 more flexible and new features can be added to the protocol as needed. IPv6 Address Format • The dotted decimal format used in IPv4 would be too cumbersome for a 128-bit address. • To help reduce the number of characters used to write an address, the Colon Hexadecimal Notation is used. • Each group of 16 bits is written in hexadecimal with a colon separating groups. E.g. 69DC:8864:FFFF:FFFF:0:1280:8C0A:FFFF • Zero compression can be used to further reduce the size of the address. i.e. a sequence of zeros is replaced with two colons: