Classful IP Addressing (cont.)

Similar documents
IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

CE363 Data Communications & Networking. Chapter 6 Network Layer: Logical Addressing

Subnetting/Supernetting and Classless Addressing

Tutorial (03) IP addresses & Sub netting

PART IV. Network Layer

Subnet + CIDR. Internet Networking recitation #1. 11: , Internet Networking,

Chapter 19 Network Layer: Logical Addressing 19.1

Internet Addresses (You should read Chapter 4 in Forouzan)

Chapter 5. IPv4 Addresses. TCP/IP Protocol Suite 1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Computer Network Foundation. Chun-Jen (James) Chung. Arizona State University

IP addressing and forwarding Network layer

Internetworking and IP Address

Network layer. Assignment 3

WHITE PAPER. Understanding IP Addressing: Everything You Ever Wanted To Know

CCNA Tutorial Series SUBNETTING

TCP/IP Basis. OSI Model

Table of Contents. Cisco IP Addressing and Subnetting for New Users

Lab IP Addressing Overview

Advanced IP Addressing

IP Addressing. -Internetworking (with TCP/IP) -Classful addressing -Subnetting and Supernetting -Classless addressing

Future Internet Technologies

IP Addressing Introductory material.

IP Addressing A Simplified Tutorial

Internet Protocol Address

IP Addressing. IP Addresses. Introductory material.

ICS 351: Today's plan

8.2 The Internet Protocol

Lab#2: IP Addressing and Subnetting

(Refer Slide Time: 02:17)

CCNA R&S: Introduction to Networks. Chapter 9: Subnetting IP Networks

IP Addressing and Subnetting for New Users

How To Make A Network Address Prefix Smaller

Lab a Basic Subnetting

Module 10 Subnetting Class A, B and C addresses. Solutions to the Lab Exercises a, b, c and d

TCP/IP works on 3 types of services (cont.): TCP/IP protocols are divided into three categories:

IP Subnetting and Addressing

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

2. What is the maximum value of each octet in an IP address? A. 28 B. 255 C. 256 D. None of the above

We Are HERE! Subne\ng

Network layer: Overview. Network layer functions IP Routing and forwarding

Introduction. Internet Address Depletion and CIDR. Introduction. Introduction


Savera Tanwir. Internet Protocol

Internet Protocol (IP) IP - Network Layer. IP Routing. Advantages of Connectionless. CSCE 515: Computer Network Programming IP routing

Source net: Destination net: Subnet mask: Subnet mask: Router Hub

Scaling the Network: Subnetting and Other Protocols. Networking CS 3470, Section 1

Networking Basics for Automation Engineers

Variable length subnetting

VLSM and CIDR Malin Bornhager Halmstad University

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

256 4 = 4,294,967,296 ten billion = 18,446,744,073,709,551,616 ten quintillion. IP Addressing. IPv4 Address Classes

No need to operate a DHCP server. If a server s IP address changes, clients will lose the ability to access it!

CS 43: Computer Networks IP. Kevin Webb Swarthmore College November 5, 2013

Chapter 4 Network Layer

Understanding IP Addressing: Everything You Ever Wanted To Know

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

Expert Reference Series of White Papers. Basics of IP Address Subnetting

SUBNETS, CIDR, AND CLASSLESS ADDRESSING

Computer Networks By Bahaa Q. Al-Mussawi Subnetting Basics Reduced network traffic Optimized network performance Simplified management

How to Create Subnets To create subnetworks, you take bits from the host portion of the IP address and reserve them to define the subnet address.

Subnetting and Network Management Omer F. Rana. Networks and Data Communications 1

Computer Networks. Introduc)on to Naming, Addressing, and Rou)ng. Week 09. College of Information Science and Engineering Ritsumeikan University

Topics. Subnetting. The Basics of Subnetting Subnet Mask Computing subnets and hosts Subnet Routing Creating a Subnet Example of Subnetting 1/37

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Guide to TCP/IP, Third Edition. Chapter 2: IP Addressing and Related Topics

Question Question Question EdTech 552: Lab 3 Answer Sheet

Computer Networks. Lecture 3: IP Protocol. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

TCP/IP Addressing and Subnetting. an excerpt from: A Technical Introduction to TCP/IP Internals. Presentation Copyright 1995 TGV Software, Inc.

IP address format: Dotted decimal notation:

1. How many unique network IDs are there in class A addresses? # of unique hosts?

APPENDIX B. Routers route based on the network number. The router that delivers the data packet to the correct destination host uses the host ID.

CompTIA Exam N CompTIA Network+ certification Version: 5.1 [ Total Questions: 1146 ]

Lecture 10. Subnetting & Supernetting. Supernetting. Subnetting. Outline. medium org: N x class C? Class B? Variable Length Subnet Mask (VLSM)

Internet Protocols. Addressing & Services. Updated:

Network and Host Addresses , Cisco Systems, Inc. All rights reserved. INTRO v1.0a 6-4

Introduction to IP v6

CIDR: Classless Interdomain Routing

CONFIGURING TCP/IP ADDRESSING AND SECURITY

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

IP Subnetting. Subnetting

Module 4, Assignment 3-2

Type of addressing in IPv4

Module 2: Assigning IP Addresses in a Multiple Subnet Network

IP Addressing and Subnetting. 2002, Cisco Systems, Inc. All rights reserved.

Answers to Sample Questions on Network Layer

Internetworking and Internet-1. Global Addresses

Internet Protocol version 4 Part I

Expert Reference Series of White Papers. Binary and IP Address Basics of Subnetting

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Subnetting IPv4 and IPv6

CS 348: Computer Networks. - IP addressing; 21 st Aug Instructor: Sridhar Iyer IIT Bombay

2. IP Networks, IP Hosts and IP Ports

Objectives. Upon completing this chapter, you will be able to

Slide 1 Introduction cnds@napier 1 Lecture 6 (Network Layer)

Lecture Computer Networks

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Section #6: Addressing

3201 Computer Networks 2014/2015 Handout: Subnetting Question

Zarząd (7 osób) F inanse (13 osób) M arketing (7 osób) S przedaż (16 osób) K adry (15 osób)

Transcription:

Classful IP Addressing (cont.) 1 Address Prefix aka Net ID defines the network Address Suffix aka Host ID defines the node In Classful addressing, prefix is of fixed length (1, 2, or 3 bytes)!

Classful IP Addressing (cont.) 2 Advantages of Classful Addressing given an address, prefix can be found immediately no extra information is needed!!! Disadvantages of Classful Addressing lack of a class to support medium-sized organizations class C which supports 254 hosts - too small class B which supports 65534 hosts - too large premature depletion of class A & B addresses in the early days of the Internet, IP addresses were freely assigned to those who asked for them, without concerns about eventual depletion two existing mechanisms for overcoming the limitations of classful addressing: (1) subnetting if an organization gets assigned a big block of IP addresses how to distribute these internally, among multiple LAN (2) supernetting how an organization can combine several class C blocks to create a larger range of addresses

Subnetting 3 Example [ Why is subnetting useful?! ] Class B network before subnetting: each packet flooded through entire network. 2-level routing hierarchy: (1) deliver to the network (2) deliver to the host Class B network after subnetting: packets routed only to appropriate network segment. 3-level routing hierarchy: (1) deliver to the network (2) deliver to the subnetwork (3) deliver to the host

Subnetting (cont.) 4 Subnetted Network network divided into several smaller subnetworks each having its own (sub)network address internally, each subnetwork is recognized by its subnetwork address; to the rest of the Internet all subnetworks still appear as a single network Organization of Address Space in a Subnetted Network a number of HostID bits are borrowed (used) for subnet identification with m borrowed bits, 2 m subnets can be created number of hosts in each subnet: 2 Hostid - m hostid is divided into 2 parts: 1) subnet number: m bits 2) host number on that subnet: (HostID m) bits

Subnetting (cont.) 5 Example [ Subnetting example ] 00000000 00000001 11111110 Assume we want to split this network into 2 equal size segments.

Subnetting (cont.) 6 Example [ Subnetting example (cont.) ] 00000000 00000001 01111111 10000000 10000001 11111110

network mask is used here Subnetting (cont.) 7 Subnet Mask 32-bit binary number, used by inside routers in a subnetted network helps extract the subnet address when AND-ed with an IP address from the block # of 1-s in subnet mask > # of 1-s in default mask subnetwork mask is used here

Subnetting (cont.) 8 Example [ subnet mask ] What is the subnetwork address if the destination address is 141.14.72.24 and the subnet mask is 255.255.192.0? Solution: Address 1 10001101 00001110 01001000 00011000 Subnet Mask 11111111 11111111 11000000 00000000 Subnet 10001101 00001110 01000000 00000000 The subnetwork address is 141.14.64.0.

Subnetting (cont.) 9 Subnet Design Considerations (how to chose n?) How many subnets does the organization need today & how many it will need in the future? (should be < 2 n ) How many hosts are there on the organization s largest subnet today; how many there will be in the future? (should be <2 m ) n m Subnet Design Procedure (1) take the maximum number of subnets required and round up to the nearest higher power of two e.g., if a organization needs 9 subnets, the network administr. will have to round up to 2 4 =16 if 9 subnets are required today, but 8 more will have to be added in two years, it might be wise to allow for more growth and select 2 5 (32) as the max number of subnets (2) make sure that there are enough host addresses for the organization s largest subnet if the largest subnet needs to support 50 host addresses today, 2 5 (32) will not provide enough host address space so the network administrator will have to round up to 2 6 (64)

Subnetting (cont.) 10 Example [ subnetting ] A customer has been given the site IP address 128.100.0.0 (a Class B address) for his company. He requires 3 separate networks with the maximum possible number of host connections on each network. How should he subnet his network? Solution: The first two octets 128.100 are fixed since the given address is a Class B address. Therefore we have the last two octets to play with. Possibility 1 Let us just use the first 2 bits for a subnet IDs: Octet 1 Octet 2 Octet 3 Octet 4 10000000 01100100 00000000 00000000 128. 100. 0. 0 The possible combinations for these two bits are: 00 = 0 -> 128.100.0.0 01 = 64 -> 128.100.64.0 10 = 128 -> 128.100.128.0 11 = 192 -> 128.100.192.0

Subnetting (cont.) 11 However all 1 s and all 0 s cannot be used as subnet IDs! (RFC 950 rules out '11' and '00' as useable subnet IDs, since these combined with all 1-s and all 0-s hostid are special addresses.) Hence, we would be left with only two subnets instead of the 3 we required. Possibility 2 Let us use an extra bit in octet 3 for subnet IDs. Octet 1 Octet 2 Octet 3 Octet 4 10000000 01100100 00000000 00000000 128. 100. 0. 0 The possible combinations for these three bits are: 000 = 0 -> 128.100.0.0 001 = 32 -> 128.100.32.0 010 = 64 -> 128.100.64.0 011 = 96 -> 128.100.96.0 100 = 128 -> 128.100.128.0 101 = 160 -> 128.100.160.0 110 = 192 -> 128.100.192.0 111 = 224 -> 128.100.224.0

Subnetting (cont.) 12 As before all 1's and all 0's are not permitted for subnets, therefore we are left with 6 possible subnets (2 3-2): 001 = 32 -> 128.100.32.0 010 = 64 -> 128.100.64.0 011 = 96 -> 128.100.96.0 100 = 128 -> 128.100.128.0 101 = 160 -> 128.100.160.0 110 = 192 -> 128.100.192.0 This leaves the rest of the bits (from power 13 downwards) in octet 3 and all the bits in octet 4 to construct the individual host addresses. An example of a host address in subnet 128.100.192.0 would be: 128.100.194.23. On first inspection it would appear that address 128.100.194.23 has nothing to do with the subnet 128.100.192.0. However, by looking a little more closely at the final two octets of the host address, we can see that this host is indeed a part of the given subnet. Octet 1 Octet 2 Octet 3 Octet 4 10000000 01100100 11100000 00000000 128. 100. 192. 0 10000000 01100100 11100010 00010111 128. 100. 194. 23 Subnet 6 Host on Subnet 6

Subnetting (cont.) 13 Problem with Classful Subnetting What if a block of addresses belongs to an ISP, and some of the customer (sub) networks are in different parts of the Internet outside routers have no way of determining how to optimally route traffic to a remote subnet Impossible to create remote networks of arbitrary size. (Size is always constrained by the class of mother network.)

Classless Addressing 14 Classless Addressing known as CIDR Classless InterDomain Routing (introduced in 1996) addressing removes class privileges to compensate for address depletion with CIDR, ISPs can subdivide their big address space & give blocks of varying sizes to their customers (2, 4, 8, 16, etc.) in classful addressing, all created blocks were of the same size (256 1, 256 2, or 256 3 hosts) CIDR Address Format in classless addressing, the division between netid (prefix) and hostid (sufix) can occur at any arbitrary bit/location slash address format: a.b.c.d/x, where x is # of bits in network portion of address and/or # of 1 s in the network mask (aka prefix length)

Classless Addressing (cont.) 15 What Makes CIDR Work? routers no longer rely on first few bits to determine the size of prefix routers now rely/receive network advertisements containing their slash address format router will now be able to determine when something is destined for the small remote network

Classless Addressing (cont.) 16 Relation to Classful Addressing classful addressing can be seen as a special case of classless addressing a block in classful addressing can be easily changed to a block in class addressing if the following prefixes are used From TCP/IP Protocol Suite by B. Forouzan, 4/e, pp. 141 Example [ classful vs. classless addressing ] Assume an organization was given a class A block as 73.0.0.0 in the past. If the block is not revoked by the authority, the classless architecture assumes that the organization has a block 73.0.0.0/8 in classless addressing.

Classless Addressing (cont.) 17 Blocks in Classless Addresses in classless addressing, we need to know one of the addresses in the block and the prefix length to define/identify the block Example [ classless addressing ] In classless addressing, an address itself cannot define the block the address belongs to. For example, the address 230.8.24.56 can belong to many blocks of addresses how big is the respective network??? 230.8.24.56 11100110 00001000 00011000 00111000 Potential blocks of addresses: 230.8.24.56 / 16 Block: 230.8.0.0 to 230.8.255.255 230.8.24.56 / 20 Block: 230.8.16.0 to 230.8.31.255 230.8.24.56 / 26 Block: 230.8.24.0 to 230.8.24.63

Classless Addressing (cont.) 18 Example [ network address in classless addressing ] What is the network address if one of its addresses is: 167.199.170.82/27. Solution: Prefix length 27 keep first 27 bits and change the remaining 5 bits to 0s. The last byte is 01010010. By changing last 5 bits to 0s, we get 01000000 = 64. So, network address = 167.199.170.64/27. Example [ network address in classless addressing ] What is the network address if one of its addresses is: 202.78.5.34/22. Solution: Prefix length 22 keep first 22 bits and change the remaining 10 bits to 0s. The last two bytes are 00000101 00100000. By changing last 10 bits to 0s, we get 00000100 00000000 = 4.0 So, network address = 202.78.4.0/22.

Classless Addressing (cont.) 19 CIDR Routing unfortunately, in CIDR addressing, the destination address gives no clue about the respective network address a packet does not carry the destination IP address in the slash notation network address extraction must be done at the same time as table searching: step 1) step 2) apply a mask /n to the destination address - with progressively decreasing value n check if the resultant network address is in the table From TCP/IP Protocol Suite by B. Forouzan, 4/e, pp. 169

Classless Addressing (cont.) 20 Example [ classless routing ] Explain the forwarding process if a packet arrives at R1 with the destination address 180.7.65.140. Steps: 1) Apply mask /26 to destination address. Result: 180.7.65.128. Not valid (not in tables). 2) Apply mask /25 to destination address. Result: 180.7.65.128. Valid (in tables)! Outgoing port: m0.

Classless Addressing (cont.) 21 Example [ subnetting in classless networks ] An organization is granted a block of addresses with the beginning address: 14.24.74.0/24. There are 2 32-24 =256 addresses in this block. The organization needs to have 11 subnets, with 256 host in total, as shown below: 2 subnets, each with 64 addresses need 6-bit long hostids! 2 subnets, each with 32 addresses need 5-bit long hostids! 3 subnets, each with 16 addresses need 4-bit long hostids! 4 subnets, each with 4 addresses need 2-bit long hostids! Design the subnets. Assume all 0-s and all 1-s subnet ID are allowed. 11 - - - - - - 1111 - - - - 111101 - - 111100 - - 111110 - - 111111 - - 1110 - - - - 1101 - - - - 1100 - - - - 100 10 - - - - --101 - - - - - - - - 00 - - - - - - 01 - - - - - -

Classless Addressing (cont.) 22 14.24.74.00/24 = 00001110 00011000 01001010 / 00000000 /24 bits remaining 8 bits 1) With first 2 out of 8 available bits, we can create 4 networks (i.e. 4 blocks of addresses) each with 64 host. We use the first of the two blocks for the first two subnets. Subnet 1: 14.24.74.00/26 = 00001110 00011000 01001010 00000000 Subnet 2: 14.24.74.64/26 = 00001110 00011000 01001010 01000000 unused 1: 14.24.74.128/26 = 00001110 00011000 01001010 10000000 unused 2: 14.24.74.192/26 = 00001110 00011000 01001010 11000000 2) We use the third block of 64 addresses (unused 1) for the next two subnets, each with 32 hosts. Subnet 3: 14.24.74.128/27 = 00001110 00011000 01001010 10000000 Subnet 4: 14.24.74.160/27 = 00001110 00011000 01001010 10100000 3) We split the fourth block of 64 addresses (unused 2) into 4 sub-blocks, each with each with 16 hosts. 6 bits for host IDs 5 bits for host IDs 4 bits for host IDs Subnet 5: 14.24.74.192/28 = 00001110 00011000 01001010 11000000 Subnet 6: 14.24.74.208/28 = 00001110 00011000 01001010 11010000 Subnet 7: 14.24.74.224/28 = 00001110 00011000 01001010 11100000 unused 3: 14.24.74.224/28 = 00001110 00011000 01001010 11110000

Classless Addressing (cont.) 23 4) We use the last available sub-block for the last four subnets, each with 4 addresses. Subnet 8: 14.24.74.240/30 = 00001110 00011000 01001010 11110000 Subnet 9: 14.24.74.244/30 = 00001110 00011000 01001010 11110100 Subnet 10: 14.24.74.248/30 = 00001110 00011000 01001010 11111000 Subnet 11: 14.24.74.252/30 = 00001110 00011000 01001010 11111100 2 bits for host IDs Note: The advantages of classless addressing come at certain price! From: http://www.ietf.org/internet-drafts/draft-ietf-grow-rfc1519bis-02.txt With the change from classful network numbers to classless prefixes, it is not possible to infer the network mask from the initial bit pattern of an IPv4 address. This has implications for how routing information is stored and propagated. Network masks or prefix lengths must be explicitly carried in routing protocols Similarly, routing and forwarding tables in layer-3 network equipment must be organized to store both prefix and prefix length or mask. Equipment which organizes its routing/forwarding information according to legacy class A/B/C network/subnet conventions cannot be expected to work correctly

Obtaining IP Address and Masks 24 Which IP address info should be known to host? each computer attached to the Internet must have the following information its own IP address [host IP address] its subnet mask the IP address of a router the IP address of a DNS server How does host get its IP address? (1) manual configuration: a system administrator manually configures the IP address into the host (typically in a file) Wintel: control-panel->network->configuration-> tcp/ip->properties, or simply type ipconfig UNIX: /etc/rc.config (2) Dynamic Host Configuration Protocol (DHCP): host obtains an IP address automatically, as well as additional information such as the address of its first-hop router and the address of its DNS server

Obtaining IP Address (cont.) 25 How does network get its IP address? to obtain a block of IP addresses network administrator must first contact its ISP Organization 0 200.23.16.0/23 Organization 1 200.23.18.0/23 Organization 2 200.23.20.0/23 Organization 7 200.23.30.0/23 ISP Send me anything with addresses beginning 200.23.16.0/20..... Single network prefix is used to advertise multiple networks route aggregation. Internet How does ISP get a block of IP addresses? apply to Internet Corporation for Assigned Names and Numbers (ICANN) international authority for managing the IP address space (see: http://www.icann.org/general/)