ECE 4110 – Internetwork Programming Subnetting, Supernetting, and Classless Addressing.

Slides:



Advertisements
Similar presentations
Chapter 5 IPv4 Addresses TCP/IP Protocol Suite
Advertisements

TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_b Subnetting,Supernetting, CIDR IPv6 Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
Chapter 19 Network Layer: Logical Addressing Stephen Kim.
Network Layer: Logical Addressing. 4-1 IPv4 ADDRESSES An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device.
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
Chapter 18. IP: Internet Protocol Addresses
A supernetwork.
Understanding IP Addressing Chuck Semeria Presented by Benyuan Liu for Internet Routing Seminar Sep 19, 2000.
CSE5803 Advanced Internet Protocols and Applications (7) Introduction The IP addressing scheme discussed in Chapter 2 are classful and can be summarised.
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
TDC365 Spring 2001John Kristoff - DePaul University1 Interconnection Technologies Routing I.
Chapter 21 IP Addressing “If we all did the things we are capable of doing, we would literally astound ourselves” - Thomas Alva Edison,
CS 6401 Efficient Addressing Outline Addressing Subnetting Supernetting.
IP Addresses: Classful Addressing An IP address is a 32-bit address.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 19 Network Layer Logical Addressing © 2012 by McGraw-Hill Education. This is proprietary material.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 5 Subnetting/Supernetting and Classless Addressing.
21-IP addressing Dr. John P. Abraham Professor UTPA.
Types of Addresses in IPv4 Network Range
Subnet & Classless Address Extensions Linda Wu (CMPT )
1 Internet Addresses (You should read Chapter 4 in Forouzan) IP Address is 32 Bits Long Conceptually the address is the pair ( NETID, HOSTID ) Addresses.
1 Kyung Hee University Part 4 : Network Layer. 2 Kyung Hee University Role and Position of Network Layer o Network layer in the Internet model is responsible.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 4: Addressing in an Enterprise Network Introducing Routing and Switching in the.
IP ADDRESSES. C ONTENTS Objectives Introduction IP Versions IPv4 Addressing Classful Addressing Class A Class B Class C Other Classes Dotted Decimal Notation.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Addressing in an Enterprise Network Introducing Routing and Switching in the.
IP Addresses & Classes Presented By: M.Usman Khan Ghauri Nauman Aslam.
CSISCSIS Dr. ClincyLecture1 SUPERNETTING Although class A and B addresses are dwindling – there are plenty of class C addresses The problem with C addresses.
 An Internet address is made of four bytes (32 bits) that define the host connection to a network.  It is uniquely and universally defines the connection.
TCP/IPTCP/IP Dr. ClincyLecture1 Chapter 5: Addressing (Part 2 of 3) Agenda Special Addresses Classful - Subnetting Classful - Supernetting.
Variable-Length Subnet Masking (VLSM)
Chapter 6 VLSM and CIDR.
Topic of Presentation IPv6 Presented by: Mahwish Chaudhary Roll No 08TL01.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Addressing in an Enterprise Network Introducing Routing and Switching in the.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 4: Addressing in an Enterprise Network Introducing Routing and Switching in the.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
21-IP addressing Dr. John P. Abraham Professor UTPA.
Chapter 4 Objectives Upon completion you will be able to: Classful Internet Addressing Understand IPv4 addresses and classes Identify the class of an.
1 Kyung Hee University Prof. Choong Seon HONG Subnetting/ Supernetting and Classless Addressing.
Chapter 5 IPv4 Address.
21-IP addressing Dr. John P. Abraham Professor UTPA.
CS470 Computer Networking Protocols
IP ADDRESSING Lecture 2: IP addressing Networks and Communication Department 1.
21-IP addressing Dr. John P. Abraham Professor UTPA.
1 Variable Length Subnet Masks ( VLSM ) “ Classful Route” Means if a route to a network starting with is received, it is a class A => mask length.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Subnetting.
Introduction to Internetworking. 2 The IP Addressing Scheme (IPv4) (psu.edu) Dotted Decimal Notation: A notation more convenient for humans.
TCP/IP Protocol Suite 1 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes Identify.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IP – Subnetting and CIDR
Chapters 4 & 5 Addressing Part 2 of 2
IP Addresses: Classful Addressing
Subnetting and Supernetting
4.3 Network Layer Logical Addressing
IP Addresses: Classful Addressing IP Addresses. CONTENTS INTRODUCTION CLASSFUL ADDRESSING Different Network Classes Subnetting Classless Addressing Supernetting.
Chapter-5 TCP/IP Suite.
PART IV Network Layer.
4 Network Layer Part I Computer Networks Tutun Juhana
CS4470 Computer Networking Protocols
Objective: Classful Internet Addressing
Subnetting.
An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet.
IP Addresses: Classful Addressing
Chapter 5 Addressing Dr. Clincy Lecture.
Subnetting/Supernetting and Classless Addressing
Dr. John P. Abraham Professor UTPA
Dr. John P. Abraham Professor UTRGV
Dr. John P. Abraham Professor UTRGV
Dr. John P. Abraham Professor UTPA
Introduction to Network
Presentation transcript:

ECE 4110 – Internetwork Programming Subnetting, Supernetting, and Classless Addressing

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 2 IP Addresses IP address is 32 bits long. Conceptually the address is the pair (NETID, HOSTID). IP domain name and addresses managed: Formerly, by IANA (Internet Assigned Numbers Authority) Now by ICANN (Internet Corporation for Assigned Names and Numbers)

3 Classful Addressing (revisited)

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 4 Classful Addressing (cont’d) Historically, a class A address was assigned to networks with > 2 16 (65,536) hosts. Class B to networks with 2 8 (256) to 2 16 hosts. Class C to networks with < 2 18 hosts. Class E was reserved for future use.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 5 Classful Addressing (cont’d) Scaling issues: Eventual exhaustion of the IPv4 address space. Ability to route traffic between ever increasing number of networks that comprise the internet. IPv4 uses 32 bit address 2 32  4.3 billion addresses, and six billion lives on earth at present. CIDR (Classless Inter-Domain Routing) slowed down address exhaustion.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 6 Classful Addressing (cont’d) Class A all 0s network number is used to represent the “default” route ( ). A routing table entry that means any destination not matching any other table entry should be sent to the default route. Class A all 1s network number is loopback. Packet never leaves the machine. Used for testing the protocol stack or accesing processes on the same machine. Another block (netid 10) in Class A address space is reserved for private use = 125 class A networks.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 7 Classful Addressing (cont’d) 16 class B blocks are reserved for private addresses = 16,368 class B blocks. 256 Class C blocks are used for private addresses = 2,096,896 class C networks.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 8 Classful Addressing (cont’d) Most of class E is wasted. Nobody wants class C. In the beginning: IP addresses were assigned based on request, not need. 32-bit address was thought to be plenty. Classful addressing is easy to understand and implement, but not efficient. Class C blocks are too small, class B blocks are too large.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 9 Subnetting Makes the subnet structure of a network invisible outside the organization’s private network. External Internet does not need to know internal subnet structure. To reach any host, external routers only need to know the path to the “gateway” router for the entire subnetwork. Subnetting reduces the size of routing tables.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 10 Subnetting (cont’d) At boot time, a machine gets its own IP address (E.g., stored on disk). Host also needs to know how many bits are used for subnet ID and how many for host ID. This is the subnet mask. Subnet mask is 32 bit value containing “one bits” for the network ID and subnet ID, “zero valued bits” for host ID.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 11 Subnetting (cont’d) When a host is given its own IP address and its subnetwork mask it can then figure out: Am I class A, B, or C address? Look at higher order bits. Where is the boundary between the network ID and the subnet ID? Defined by class definition. Where is the boundary between the subnet ID and the host ID? Host ID is 0s in mask.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 12 Subnetting (cont’d) All 0’s host number is used to identify the base network (or subnetwork). All 1’s host number represents broadcast address for the network (or subnetwork). It is also possible to deploy network numbers from the private address space for internal connectivity (RFC 1918). A Network Address Translator (NAT) must be used to provide external internet access.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 13 A Network with Two Levels of Hierarchy (not subnetted)

14 A Network with Three Levels of Hierarchy (subnetted)

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 15 Addresses in a Network with and without Subnetting “Site+Subnet id” is called extended network prefix.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 16 Analogy from the Telephone Network

17 Default Mask vs Subnet Mask

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 18 Finding the Subnet Address: Straight Method The subnetwork address is

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 19 Finding the Subnet Address: Short-Cut Method

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 20 Comparison of a Default Mask and a Subnet Mask The number of subnets must be a power of 2.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 21 Example A company is granted the site address (class C). The company needs six subnets. Design the subnets.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 22 Example (Sol’n) The number of 1s in the default mask is 24 (class C). 6 is not a power of 2. The next number that is a power of 2 is 8. We need 3 more 1s in the subnet mask. The total number of 1s in the subnet mask is 27 (24 + 3). Subnet mask: , or

23 Example (Sol’n)

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 24 Variable Length Subnet Masks (VLSM) IP network is subdivided in unequal pieces. Each subnetwork has its own mask thus “extended-network-prefixes” have different lengths. Allows size of subnets to reflect the number of required host addresses in each subdivision.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 25 VLSM (cont’d) We want to use: Smaller subnets (longer masks) where we have fewer nodes. Larger subnets (shorter masks) where we have more nodes. Routing protocols must carry extended-network- prefix information with each route advertisement. OK to use: OSPF, RIPV2, IS-IS, CISCO’s E–IGRP they are all classless Routers must use a forwarding algorithm based on longest match.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 26 VLSM (cont’d)

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 27 VLSM: Example 1 Destination: = Routing table has entries for: Route #1: / /24 = [ ] Route #2: / /24 = [ ] Route #3: / /16 = [ ] Route #2 has the longest matching prefix.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 28 Sidenote: Private Networks IANA has reserved the following addresses as private networks (RFC – 1918) ( /8 prefix) ( /12 prefix) ( /16 prefix) Private networks are not routable on the Internet. They can be used simultaneously by many organizations.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 29 VLSM: Example 2 An organization has the “private” network prefix /16 and plans to deploy VLSM. Here is their plan: 16 Equal size blocks => 4 bits / …  0 1 … … … 14 15

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 30 VLSM: Example 2 (cont’d) To have 16 equal size blocks 2 4 =16 =>4 bits are needed beyond /16 => 20 extended-network- prefix. Each of these blocks has 2 12 =4096 addresses inside.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 31 VLSM: Example 2 (cont’d) Base Prefix: = /16 Subnet # 0: = /20 Subnet # 1: = /20 Subnet # 2: = /20 Subnet # 3: = /20 Subnet # 4: = /20 …… Subnet # 13: = /20 Subnet # 14: = /20 Subnet # 15: = /20

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 32 VLSM: Example 3 While at this level in the hierarchical addressing plan, let’s look at the resulting host addresses available for Subnet #3. Define the host addresses for Subnet #3 4 ( /20) / … … … … 14 15

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 33 VLSM: Example 3 (cont’d) Subnet #3: = /20 Host #1: = Host #2: = Host #3: = …… Host #4093: = Host #4094: = The broadcast address for Subnet #3 4 is found by setting the host-number field to all 1s. Broadcast : =

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 34 VLSM: Example (Notation) We are working with a /16 base address  Subnet #3 4 is the subnet with value 3  20-bit extended network prefix (a 4-bit field has been added to the /16 base address) Subnet #14 4 -#14 4 is Sub-subnet #14 under Subnet #14. Both subnet and sub-subnet fields are 4 bits. Thus, the extended network prefix is now 24 bits long.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 35 VLSM: Example 4 While still at the same level, let’s look at the 16 subnets we have under Subnet #14 4 ( /20) / … … … … 14 15

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 36 VLSM: Example 4 (cont’d) Subnet # 14: = /20 Subnet # 14-0: = /24 Subnet # 14-1: = /24 Subnet # 14-2: = /24 Subnet # 14-3: = /24 Subnet # 14-4: = /24 …… Subnet # 14-14: = /24 Subnet # 14-15: = /24

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 37 VLSM: Example 5 Still at the same level, let’s look at the host addresses on one of these new sub – subnets, Sub-subnet #14 4 -#3 4 ( /24) / … … … … 14 15

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 38 VLSM: Example 5 (cont’d) Subnet #14 4 -#3 4 : = /24 Host #1: = Host #2: = Host #3: = Host #4: = Host #5: = …… Host #253: = Host #254: = The broadcast address for Subnet # 14 4 –#3 4 is determined by setting all the bits in the host number field to 1: Broadcast: =

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 39 VLSM: Example 6 Let’s go down one more level, and look at sub-subnet #14 4 –#14 4 ( /24) / … … … … 14 15

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 40 VLSM: Example 6 (cont’d) Since 8 = 2 3, 3 more bits are required to identify each of eight subnets. Extended-network-prefix length will be /27. Subnet #14-14: = /24 Subnet # : = /27 Subnet # : = /27 Subnet # : = /27 Subnet # : = /27 Subnet # : = /27 Subnet # : = /27 Subnet # : = /27 Subnet # : = /27

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 41 Going the Other Way: Supernetting Several class C blocks combined to create larger blocks. Two methods: Pick the blocks to be merged randomly. Routers outside the organization treat each block separately. Pick them according to a set of rules: Number of blocks must be a power of 2. Blocks must be contiguous. If number of blocks is N, third byte of the first address must be divisible by N.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 42 Supernetting (cont’d)

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 43 Comparison of Subnet, Sefault, and Supernet Masks

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 44 Supernetting: Example 1 Question: We need to make a supernetwork out of 16 class C blocks. What is the supernet mask? Solution: For 16 blocks, we need to change four 1s to 0s in the default mask. So, the mask is or

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 45 Supernetting: Example 2 A supernet has a first address of and a supernet mask of A router receives three packets with the following destination addresses: Which packet belongs to the supernet?

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 46 Supernetting: Example 2 (sol’n) Apply the supernet mask to see if we can find the beginning address AND  AND  AND  Only the first address belongs to this supernet.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 47 Supernetting: Example 3 A supernet has a first address of and a supernet mask of How many blocks are in this supernet and what is the range of addresses?

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 48 Supernetting: Example 3 (sol’n) Supernet mask has 21 1s. Default mask has 24 1s. (difference of 3 bits)  2 3 or 8 blocks in this supernet. Blocks are to First address is Last address is

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 49 CIDR: Classless InterDomain Routing CIDR removes concept of class A, B, C network addresses. Instead, uses concept of network prefix. CIDR supports arbitrary sized networks. Routers use network prefix instead of first 3 bits of IP address to determine dividing point between network number and host number.

Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 50 CIDR (cont’d) Constraints: Block size must be a power of 2. Beginning address must be divisible by block size. E.g.: If the block contains 4 addresses, the starting address cannot be , because: