🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

JTO Ph-II DNIT IP Addressing : VLSM & CIDR Chapter 1 : IP addressing , VLSM & CIDR 1.1 LEARNING OBJECTIVES The objectives of this chapter is to understand i) Concept of I...

JTO Ph-II DNIT IP Addressing : VLSM & CIDR Chapter 1 : IP addressing , VLSM & CIDR 1.1 LEARNING OBJECTIVES The objectives of this chapter is to understand i) Concept of IP Address ii) Special IPv4 Address iii) Class A, B, and C IP addresses iv) Private & Public IP Address v) Concept of subnetting vi) Types of subnetting - FLSM & VLSM vii) Classless Inter-Domain Routing (CIDR) & Supernetting viii) Representation of IPv4 address in CIRD notation 1.2 INTRODUCTION Internet is a dramatically different network than when it was first established in the early 1980s. One of the most important topics in any discussion of TCP/IP is IP addressing. An IP address is a numeric identifier assigned to each machine on an IP network. It designates the specific location of a device on the network. An IP address is a software address, not a hardware address—the latter is hard-coded on a network interface card (NIC) and used for finding hosts on a local network. IP addressing was designed to allow hosts on one network to communicate with a host on a different network regardless of the type of LANs the hosts are participating in. 1.3CONCEPT OF IP ADDRESS IP is the primary layer 3 protocol in the Internet suite. In addition to internetwork routing, IP provides error reporting and fragmentation and reassembly of information units called datagrams for transmission over networks with different maximum data unit sizes. IP represents the heart of the Internet protocol suite. IP addresses are globally unique, 32-bit numbers. Globally unique addresses permit IP networks anywhere in the world to communicate with each other. An IP address is divided into three parts. The first part designates the network address, the second part designates the subnet address, and the third part designates the host address. In generalized format two parts - network bits & host bits. Every IPv4 address is always coupled with 32 bit subnet mask value by explicit or implicit representation which is used to define the network & host bit boundary of IP address. JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 2 of 131 For Restricted Circulation JTO Ph-II DNIT IP Addressing : VLSM & CIDR 32 bits Network Bits Subnet Bits (Optional) Host Bits Figure 1: Three Parts IPv4 Address The IP version 4 (IPv4), defines a 32-bit address which means that there are only 2^32 (4,294,967,296) IPv4 addresses available. This might seem like a large number of addresses, but the finite number of IP addresses will eventually be exhausted. 1.4 DOTTED-DECIMAL NOTATION To make Internet addresses easier for human users to read and write, IP addresses are often expressed as four decimal numbers, each separated by a dot. This format is called "dotted- decimal notation.” Dotted-decimal notation divides the 32-bit Internet address into four 8-bit (byte) fields and specifies the value of each field independently as a decimal number with the fields separated by dots. Figure 1: Notation of IP Address 1.5 SPECIAL ADDRESSES  Network Address Network address is used to uniquely to identify networks. It represents collection of devices (Network) that has the same network bits in their IP address. The host bits of network address contains all 0‟s. Routers maintain these network addresses in their routing table for taking routing decisions. Broadcast Address Broadcast address refers to special address that is used to target all systems on a specific subnet/ network instead of single hosts. In other words broadcast address allows information to be sent to all machines on a given subnet rather than to a specific machine. Broadcast address contains all 1‟s in the host bit places. JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 3 of 131 For Restricted Circulation JTO Ph-II DNIT IP Addressing : VLSM & CIDR Loop back IP Address The IP address range 127.0.0.0 – 127.255.255.255 is reserved for loopback. Loopback IP address is managed entirely by and within the operating system. These addresses enable the Server and Client processes on a single system to communicate with each other. The loopback address allows for a reliable method of testing the functionality of an Ethernet card and its drivers and software without a physical network. APIPA - Automatic Private IP Addressing It is a feature in operating systems which enables devices to self-configure an IP address and subnet mask automatically when their DHCP (Dynamic Host Configuration Protocol) server isn‟t reachable. The IP address range for APIPA is (169.254.0.1 to 169.254.255.254) 0.0.0.0 Address In the context of servers, 0.0.0.0 address can mean "all IPv4 addresses on the local machine" In the context of network 0.0.0.0/8 refers to current network In the context of routing tables, a network destination of 0.0.0.0 is used with a network mask of 0 to depict the default route as a destination subnet. 255.255.255.255 Address Reserved for the "limited broadcast" destination address 1.6 CLASSFUL NETWORKS In order to provide the flexibility required to support different size networks, earlier the designers decided that the IP address space (0.0.0.0 to 255.255.255.255) 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. Class A networks are intended mainly for use with a few very large networks, because they provide only 8 bits for the network address field. Class B networks allocate 16 bits, and Class C networks allocate 24 bits for the network address field. Class C networks only provide 8 bits for the host field, however, so the number of hosts per network may be a limiting factor. In all three cases, the leftmost bit(s) indicate the network class. Figure.3 below shows the address formats for Class A, B, and C IP networks. Class D addresses are used for multicast purpose where as class E addresses are reserved for research purpose. One of the fundamental features of classful IP addressing is that each address contains a self-encoding key that identifies the dividing point between the network-prefix and the host- number. JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 4 of 131 For Restricted Circulation JTO Ph-II DNIT IP Addressing : VLSM & CIDR Figure 3 : Classes of IP Address 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 (2^7 -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 (2^24-2) hosts per network. The host calculation requires that 2 subtracted because the all-0s ("this network") and all- 1s ("broadcast") host-numbers may not be assigned to individual hosts. 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 (2^14 ) /16 networks can be defined with up to 65534 (2^16 -2) hosts per network. 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 (2^21)/24 networks can be defined with up to 254 (2^8-2) hosts per network. The following table gives an overview of this Classful addressing scheme, now obsolete system. JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 5 of 131 For Restricted Circulation JTO Ph-II DNIT IP Addressing : VLSM & CIDR Leading Number Number of Number Total Bits of addresses Start Class of Host Number of End Address identifying Network per Address bits (H) Networks class Bits (N) network 126 16,777,214 Class A 0 8 24 7 24 0.0.0.0 127.255.255.255 (2 )-2 (2 ) -2 16,384 65,534 Class B 10 16 16 14 16 128.0.0.0 191.255.255.255 (2 ) (2 )-2 2,097,152 254 Class C 110 24 8 21 8 192.0.0.0 223.255.255.255 (2 ) (2 )-2 Class D not not 1110 not defined not defined 224.0.0.0 239.255.255.255 (multicast) defined defined Class E not not 1111 not defined not defined 240.0.0.0 255.255.255.255 (reserved) defined defined Table 1. Overview of this Classful addressing scheme The classful A, B, and C octet boundaries were easy to understand and implement, but they did not foster the efficient allocation of a finite address space. A /24, which supports 254 hosts, is too small while a /16, which supports 65,534 hosts, is too large. In the past, the Internet has assigned sites with several hundred hosts a single /16 address instead of a couple of /24s addresses. Classful network design served its purpose in the startup stage of the Internet, but it lacked scalability in the face of the rapid expansion of the network in the 1990s. The class system of the address space was replaced with Classless Inter-Domain Routing (CIDR) in 1993. CIDR is based on variable-length subnet masking (VLSM) to allow allocation and routing based on arbitrary-length prefixes. 1.7 PRIVATE IP ADDRESS AND PUBLIC IP ADDRESS  Private IP Address and Public IP Address are used to uniquely identify a machine over a Network. Private IP addresses are used within local network which are invalid and non routable in Internet. Public IP address is mostly used outside the local network. Public IP address is provided by ISP, Internet Service Provider. The following table.2 lists the major differences and characteristics of Private & Public IP addresses. JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 6 of 131 For Restricted Circulation JTO Ph-II DNIT IP Addressing : VLSM & CIDR Key Private IP Address Public IP Address Scope Private IP address scope is local to Public IP address scope is global. present network. Locally unique within Globally unique across Internet. a private network Communication Private IP Address is used to Public IP Address is used to communicate within the network. communicate outside the network, Internet. Provider Local Network administrator assigns ISP, Internet Registries/ Internet Service private IP addresses. There is no Provider control the public IP address owner for private IP addresses. allocation Cost Private IP Addresses are free of cost. Public IP Address comes with a cost. Anybody can use private IP addresses Allotted owners alone can use their without any restrictions. public IP addresses. Range Private IP Address range: Except private IP Addresses, and special IP address, rest IP addresses are public. Class A: 10.0.0.0 – 10.255.255.255, Class B: 172.16.0.0 – 172.31.255.255, Class C: 192.168.0.0 – 192.168.255.255 Table 2. Differences between Private IP Address and Public IP Address. 1.8 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. IP Subnetting is a process of dividing a large IP network in smaller IP networks.  Advantages of Subnetting: Manageable Networks: We can partition a network as group of devices based on their interactions or purpose of those devices. Enhanced security: Access policies can be enforced. Each group/ subnet can be managed efficiently by controlling them what services they can access. Improved routing efficiency: Routing can be normalized by proper planning of subnets and supernets which improves network convergence. JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 7 of 131 For Restricted Circulation JTO Ph-II DNIT IP Addressing : VLSM & CIDR Improved bandwidth: Reduces the size of the broadcast domain & broadcast messages helping network devices not to waste their resources in listening to unnecessary broadcast messages. Customized network planning: An organization will be assigned with an IP network and the organization can then divide it into subnets to assign a distinct subnetwork number for each of its internal networks. This allows the organization to deploy additional subnets without needing to obtain a new network number from the Internet. Subnetting designates high-order bits from the host as part of the network prefix. This method divides a network into smaller subnets. The default number of network bits will be increased and host bits will be reduced. Subnet mask When subnetting is done the default prefix length/ network bits will be increased and known as extended-network-prefix. The default count of network bits as standardized in Classful addressing is altered. Subnet mask is used to define the boundary between network bits and host bits. Subnet mask is a string of 1‟s followed by string of 0‟s of 32 bits in length. Figure 2: Default Subnet mask of Classful IP Address The 1‟s available in subnet mask identifies network bits and 0‟s identify the host bits defining the boundary of network and host bits in a given 32bit IP address. 1.9 TYPES OF SUBNETTING There are two types of Subnetting FLSM and VLSM. In FLSM, all subnets have equal number of host addresses and use same Subnet mask. In VLSM, subnets have flexible number of host addresses and use different subnet mask. a) Fixed Length Subnet Masking (FLSM) FLSM Subnetting divides a network into smaller subnets of equal size. All these subnets can accommodate equal number of hosts. Wastage of IP address space will be more if this type of subnetting is used. In this case all subnets use same the same subnet mask. JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 8 of 131 For Restricted Circulation JTO Ph-II DNIT IP Addressing : VLSM & CIDR b) Variable Length Subnet Masking (VLSM) In production environment, we may need to have subnets of different sizes. If we do subnetting based on FLSM, the subnets will be made considering the maximum subnet size, which would waste IP addresses. VLSM comes to the rescue. VLSMs can use subnet masks with different lengths which avoids IP address wastage considerably. Figure 3: Diagram showing FLSM & VLSM Subnets 1.10 SUPERNETTING - CLASSLESS INTER-DOMAIN ROUTING (CIDR) By 1990‟s, the exponential growth of the Internet was beginning to raise serious concerns among members of the IETF about the ability of the Internet's routing system to scale and support future growth. These problems were related to: The rapid growth in the size of the global Internet's routing tables. The eventual exhaustion of the 32-bit IPv4 address space. Projected Internet growth figures made it clear that the first two problems were likely to become critical. The response to these immediate challenges was the development of the concept of Supernetting or Classless Inter-Domain Routing (CIDR). CIDR eliminates the traditional concept of Class A, Class B, and Class C network addresses and replaces them with the generalized concept of a "network-prefix." In the CIDR model, each piece of routing information is advertised with a bit mask (or prefix-length). The prefix-length is a way of specifying the number of leftmost contiguous bits in the network- portion of each routing table entry. For example, a network with 20 bits of network-number and 12-bits of host-number would be advertised with a 20-bit prefix length (a /20). The IP address advertised with the /20 prefix could be a former Class A, Class B, or Class C. Routers use the network-prefix, rather than the first 3 bits of the IP address, to JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 9 of 131 For Restricted Circulation JTO Ph-II DNIT IP Addressing : VLSM & CIDR determine the dividing point between the network number and the host number. As a result, CIDR supports the deployment of arbitrarily sized networks rather than the standard 8-bit, 16- bit, or 24-bit network numbers associated with classful addressing.  REPRESENTATION OF IPV4 NETWORK IN CIDR NOTATION Figure 4: Diagram representing SNM to CIDR prefix conversion Example: Network 102.168.1.128 with subnet mask 255.255.255.128 can be represented in CIDR notation as 102.168.1.128/25. Procedure: 1. Write the subnet mask as binary: 255.255.255.128  1111 1111. 1111 1111. 1111 1111. 1000 000 2. Count the number of 1’s from the binary subnet mask above 25 ( 25 network bits)  „/25‟ network prefix 3. Write the CIDR notation by mentioning the prefix after network address CIDR representation  102.168.1.128 /25 102.168.1.128 EQUIVALENT TO 102.168.1.128 /25 255.255.255.128  Benefits of CIDR/ Supernetting: CIDR enables the efficient allocation of the IPv4 address space. CIDR supports route aggregation where a single routing table entry can represent the address space of thousands of traditional classful routes. JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 10 of 131 For Restricted Circulation JTO Ph-II DNIT IP Addressing : VLSM & CIDR Figure 5: Route summarization by CIDR/ Supernetting CIDR allows a single routing table entry to specify how to route traffic to many individual network addresses by reducing the routing table size and helps control the amount of routing information in the Internet's backbone routers Supernetting reduces route flapping and eases the local administrative burden of updating external routing information. 1.11 CONCLUSION An IP address is an address used in order to uniquely identify a device on an IP network. The address is made up of 32 binary bits, which can be divisible into a network portion and host portion with the help of a subnet mask. The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to decimal and separated by a period (dot). JTO Ph-II Week 2 Version 3.0 Aug 2021 Page 11 of 131 For Restricted Circulation

Use Quizgecko on...
Browser
Browser