An Internet Protocol (IP) Address Is a Numerical Label That Is
Total Page:16
File Type:pdf, Size:1020Kb
Computer Communication Networks Lecture No. 5 Computer Network Lectures IP address An Internet Protocol (IP) address is a numerical label that is assigned to devices participating in a computer network, that uses the Internet Protocol for communication between its nodes. An IP address serves two principal functions: 1- host or network interface identification 2- location addressing. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there." The designers of TCP/IP defined an IP address as a 32-bit number and this system, known as Internet Protocol Version 4 or IPv4, is still in use today. However, due to the enormous growth of the Internet and the resulting depletion of available addresses, a new addressing system (IPv6), using 128 bits for the address, was developed in 1995. Although IP addresses are stored as binary numbers, they are usually displayed in human-readable notations, such as 208.77.188.166 (for IPv4), and 2001:db8:0:1234:0:567:1:1 (for IPv6). The Internet Protocol also routes data packets between networks; IP addresses specify the locations of the source and destination nodes in the topology of the routing system. For this purpose, some of the bits in an IP address are used to designate a sub network. As the development of private networks raised the threat of IPv4 address exhaustion, RFC 1918 set aside a group of private address spaces that may be used by anyone on private networks. They are often used with network address translators to connect to the global public Internet. The Internet Assigned Numbers Authority (IANA), which manages the IP address space allocations globally, cooperates with five Regional Internet Registries (RIRs) to allocate IP address blocks to Local Internet Registries (Internet service providers) and other entities. IP versions Two versions of the Internet Protocol (IP) are in use: IP Version 4 and IP Version 6. Each version defines an IP address differently. IP version 4 addresses IPv4 uses 32-bit (4-byte) addresses, which limits the address space to 4,294,967,296 (232) possible unique addresses. IPv4 reserves some addresses for special purposes such as private networks (~18 million addresses) or multicast addresses (~270 million addresses). IPv4 addresses are usually represented in dot-decimal notation (four numbers, each ranging from 0 to 255, separated by dots, e.g. 208.77.188.166). Each part represents 8 bits of the address, and is therefore called an octet. In less common cases of technical writing, IPv4 addresses may be presented in hexadecimal, octal, or binary representations. In most representations each octet is converted individually. IPV4 32 bits address 172. 16. 254. 1 10101100.00010000.11111110.00000001 One byte=8 bits IPv4 sub netting In the early stages of development of the Internet Protocol, network administrators interpreted an IP address in two parts, network number portion and host number portion. The highest order octet (most significant eight bits) in an address was designated the network number and the rest of the bits were called the rest field or host identifier and were used for host numbering within a network. This method soon proved inadequate as additional networks developed that were independent from the existing networks already designated by a network number. In 1981, the Internet addressing specification was revised with the introduction of classful network architecture. Classful network design allowed for a larger number of individual network assignments. The first three bits of the most significant octet of an IP address was defined as the class of the address. Three classes (A, B, and C) were defined for universal uni-cast addressing. Depending on the class derived, the network identification was based on octet boundary segments of the entire address. Each class used successively additional octets in the network identifier, thus reducing the possible number of hosts in the higher order classes (B and C). The following table gives an overview of this now obsolete system. Class First octet Range of Network Host Number of Number of first octet ID ID network host address Binary A 0XXXXXXX 0-127 a b.c.d ퟐퟕ = ퟏퟐퟖ ퟐퟐퟒ − ퟐ = ퟏퟔ, ퟕퟕퟕ, ퟐퟏퟒ B 10XXXXXX 128-191 a . b c.d ퟐퟏퟒ ퟐퟏퟔ − ퟐ = ퟏퟔ, ퟑퟖퟒ = ퟔퟓ, ퟓퟑퟒ C 110XXXXX 192-223 a.b.c d ퟐퟐퟏ ퟐퟖ − ퟐ = ퟐퟓퟒ = ퟐ, ퟎퟗퟕ, ퟏퟓퟏ IPv4 private addresses Early network design, when global end-to-end connectivity was envisioned for communications with all Internet hosts, intended that IP addresses be uniquely assigned to a particular computer or device. However, it was found that this was not always necessary as private networks developed and public address space needed to be conserved (IPv4 address exhaustion). Computers not connected to the Internet, such as factory machines that communicate only with each other via TCP/IP, need not have globally-unique IP addresses. Three ranges of IPv4 addresses for private networks, one range for each class (A, B, C), were reserved in RFC 1918. These addresses are not routed on the Internet and thus their use need not be coordinated with an IP address registry. Today, when needed, such private networks typically connect to the Internet through network address translation (NAT). IANA-reserved private IPv4 network ranges Start End No. of addresses 24-bit Block (/8 prefix, 1 x A) 10.0.0.0 10.255.255.255 16,777,216 20-bit Block (/12 prefix, 16 x B) 172.16.0.0 172.31.255.255 1,048,576 16-bit Block (/16 prefix, 256 x C) 192.168.0.0 192.168.255.255 65,536 Any user may use any of the reserved blocks. Typically, a network administrator will divide a block into subnets; for example, many home routers automatically use a default address range of 192.168.0.0 - 192.168.0.255 (192.168.0.0/24). Sub network A sub-network, or subnet, is a logically visible, distinctly addressed part of a single Internet Protocol network. The process of sub-netting is the division of a computer network into groups of computers that have a common, designated IP address routing prefix. Network Prefix Host number Network Prefix Sub net number Host number Sub-netting breaks a network into smaller realms that may use existing address space more efficiently, and, when physically separated. The subnets may be arranged logically in a hierarchical architecture, partitioning the organization's network address space into a tree-like routing structure. Routers are used to interchange traffic between sub-networks and constitute logical or physical borders between the subnets. While improving network performance, sub netting increases routing complexity, since each locally connected subnet must be represented by a separate entry in the routing tables of each connected router. However, by careful design of the network, routes to collections of more distant subnets within the branches of a tree-hierarchy can be aggregated by single routes. The process of sub netting involves the separation of the network and subnet portion of an address from the host identifier. This is performed by a bitwise AND operation between the IP address and the subnet prefix or bit mask. The result yields the network address, and the remainder is the host identifier. The following example is based on IPv4 networking. The operation may be visualized in a table using binary address formats. Dot-decimal notation Binary form IP address 192.168.5.130 11000000.10101000.00000101.10000010 Subnet Mask 255.255.255.0 11111111.11111111.11111111.00000000 Network Portion 192.168.5.0 11000000.10101000.00000101.00000000 Host Portion 0.0.0.130 00000000.00000000.00000000.10000010 In IPv4, subnet masks consist of 32 bits, usually a sequence of ones (1) followed by a block of 0s. The last block of zeros (0) designate that part as being the host identifier. This divides a network into smaller subnets. The following diagram modifies the example by moving two bits from the host portion to the subnet number to form a smaller subnet: Dot-decimal notation Binary form IP address 192.168.5.130 11000000.10101000.00000101.10000010 Subnet Mask 255.255.255.192 11111111.11111111.11111111.11000000 Network Portion 192.168.5.128 11000000.10101000.00000101.10000000 Host Portion 0.0.0.2 00000000.00000000.00000000.00000010 .