Subnet & Classless Address Extensions Linda Wu (CMPT 471 2003-3)

Slides:



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

Chapter 18. IP: Internet Protocol Addresses
1 IP: Internet Protocol Addresses. 2 Internet Protocol (IP) Only protocol at Layer 3 Fundamental in suite Defines –Internet addressing –Internet packet.
TCP/IP Protocol Suite 1 Chapter 5 Objectives Upon completion you will be able to: IP Addresses: Classless Addressing Understand the concept of classless.
COS 420 DAY 7. Agenda Assignment 2 posted Due Feb 13 (next class) Individual Projects Assigned Due March 20 & 23 Classless And Subnet Address Extensions.
Oct 28, 2004CS573: Network Protocols and Standards1 IP: Routing and Subnetting Network Protocols and Standards Autumn
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #1 Subnet + CIDR.
1 Internet Networking Spring 2004 Tutorial 1 Subnetting and CIDR Proxy ARP.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
1 Internet Networking Spring 2006 Tutorial 1 Subnetting and CIDR.
Oct 26, 2004CS573: Network Protocols and Standards1 IP: Routing and Subnetting Network Protocols and Standards Autumn
Slides of the course was made by TAs of this and previous semesters 1 Internet Networking Spring 2002 Tutorial 1 Subnets, Proxy ARP.
TCP/IP Protocol Suite 1 Chapter 5 Objectives Upon completion you will be able to: IP Addresses: Classless Addressing Understand the concept of classless.
Slides of the course was made by TAs of this and previous semesters 1 Internet Networking Spring 2003 Tutorial 1 Subnets, Proxy ARP.
Lecture Slide Rizwan Rehman, CCS. Classless and Subnet Address Extensions (CIDR) Topics: –There are problems with the IP addressing scheme we’ve studied.
1 Subnetting and Supernetting Oleh: Abdul Kholiq,S.Kom
NETE0510 Presented by Dr.Apichan Kanjanavapastit
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.
ECE 4110 – Internetwork Programming Subnetting, Supernetting, and Classless Addressing.
Classless and Subnet Address Extensions (CIDR)
Classless and Subnet Address Extensions (CIDR)
CSC 600 Internetworking with TCP/IP Unit 4: Internet Addresses (Ch. 4, 5, 6, 10) Dr. Cheer-Sun Yang Spring 2001.
CSISCSIS Dr. ClincyLecture1 SUPERNETTING Although class A and B addresses are dwindling – there are plenty of class C addresses The problem with C addresses.
TCP/IPTCP/IP Dr. ClincyLecture1 Chapter 5: Addressing (Part 2 of 3) Agenda Special Addresses Classful - Subnetting Classful - Supernetting.
Fragmentation Fragmentation and reassembly are done by the IP layer Fragmentation and reassembly are done by the IP layer Identification (16 bits) Identification.
1 Kyung Hee University Chapter 5 IP addresses Classless Addressing.
Copyright © Lopamudra Roychoudhuri
Chapter 18 IP: Internet Protocol Addresses
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.
CS4500CS4500 Dr. ClincyLecture1 Lecture #2 Chapter 5: Addressing (Part 2 of 3)
Chapter 4 IP Addressing : Classful Addressing
Universal Identifier UNIVERSAL IDENTIFIER Universal network = globally accepted method for identifying each computer. Host identifier = host is identify.
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.
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
IP Addressing. A 32-bit logical naming convention A dotted-decimal notation is used: – –Each number represents 8 bits. Number is Part.
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
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.
Internet Networking recitation #1
Chapter-5 TCP/IP Suite.
4 Network Layer Part I Computer Networks Tutun Juhana
CS4470 Computer Networking Protocols
Subnetting.
Chapter 5 Addressing Dr. Clincy Lecture.
Subnetting/Supernetting and Classless Addressing
Chapters 4 & 5 Addressing Will go over Exam 2
Dr. John P. Abraham Professor UTPA
Data Communications and Networking
Supernetting Recall: subnetting allows an organization to share a single IP network address among multiple physical networks Supernetting (a.k.a. classless.
Dr. John P. Abraham Professor UTRGV
Chapter 5 IP addresses Classless Addressing
Classless and Subnet Address Extensions (CIDR)
Dr. John P. Abraham Professor UTPA
Introduction to Network
Presentation transcript:

Subnet & Classless Address Extensions Linda Wu (CMPT )

Notes-4 CMPT 471  Content  Motivation  Transparent routers  Proxy ARP  Subnet addressing  Classless addressing Reference: chapter 10

Notes-4 CMPT 471  Motivation  Problem: network growth will exhaust IPv4 address space eventually  Solution: minimize the number of addresses used Avoid assigning netid whenever possible Share one netid among multiple networks: transparent router, proxy ARP, subnet addressing Arbitrary assignment: classless addressing

Notes-4 CMPT 471  Transparent Routers  A special router T, called transparent router, connects WAN and LAN  Other hosts and routers on the WAN do not know T’s existence  The LAN does not have its own netid; the hosts in the LAN are assigned unused addresses in the WAN  T sends packets from the WAN to the appropriate host in the LAN  T accepts packets from the LAN and routes them across WAN to the destination

Notes-4 CMPT 471  Transparent Routers (cont.)  Advantages One netid is shared by multiple networks: fewer network addresses are required Support load balancing  Disadvantages Only work with WAN that has a large address space Do not provide all the same services as conventional routers

Notes-4 CMPT 471  Proxy ARP  ARP Address Resolution Protocol Maps IP addresses to physical addresses  Proxy an application that closes a straight path between 2 networks and prevents the crackers from obtaining internal addresses and details of a private network ABC R DE Main network Hidden network Router running proxy ARP

Notes-4 CMPT 471  Proxy ARP (cont.)  How proxy ARP works? Main network and hidden network: share the same netid A router, R, connects these 2 networks R knows which hosts lie on which physical networks, and maintains the illusion that only one network exists A in the main network sends packets to E in the hidden network  A broadcasts ARP request for E’s physical addr.  R responses ARP request by sending back its own physical addr.  A sends the packet destined for E to R  R forwards the packet destined for E over the hidden network

Notes-4 CMPT 471  Proxy ARP (cont.)  Advantages One netid is shared by multiple networks Proxy ARP can be added to a single router without disturbing other hosts or routers on the network  Disadvantages The network must use ARP for address resolution Cannot be generalized to more complex network topology Rely on managers to maintain tables of machines and addresses manually

Notes-4 CMPT 471  Subnet Addressing  Subnet addressing, subnetting  A network is divided into several smaller subnets  Each subnet has its own subnet address  Subnets appear as a single network to the rest of the internet  The router attached to the subnets knows the network is physically divided into subnets

Notes-4 CMPT 471  Subnet Addressing (cont.)  Subnetting Example To the rest of the internet R1 R2 netid: Class B Subnet: Subnet: Subnet:

Notes-4 CMPT 471  Subnet Addressing (cont.)  Subnetting address netidhostid Without subnetting netidsubnetidhostid With subnetting (405) Area codeExchangeConnection Hierarchy in telephone number Hierarchy addressing: netid subnetid hostid

Notes-4 CMPT 471  Subnet Addressing (cont.)  Mask a 32-bit binary number that gives the network address when bitwise ANDed with an IP address e.g. IP address: (class B) Mask: IP & mask = (network address) Bitwise AND mask IP address Network address

Notes-4 CMPT 471  Subnet Addressing (cont.)  Default masks Masks for class A, B, C addresses 1s: preserve the netid 0s: set the hostid to 0 Number of 1s is predetermined: 8/16/24 ClassBinary maskDotted-decimal mask A B C

Notes-4 CMPT 471  Subnet Addressing (cont.)  Subnet mask Change some of the leftmost 0s in the default mask to 1s to make a subnet mask Preserve netid and subnetid, set hostid to 0 Contiguous subnet mask (recommended) Noncontiguous subnet mask Subnet mask: Default mask:

Notes-4 CMPT 471  Subnet Addressing (cont.) Bitwise AND Subnet mask IP address Network address 72   (64)

Notes-4 CMPT 471  Subnet Addressing (cont.)  Subnet design example A company is granted network address (class C). It needs 6 subnets. Design the subnet. # of 1s in the default mask = 24 (class C) 6 subnets < 2 3 : need 3 more 1s in the subnet mask Total # of 1s in the subnet mask: = 27 Total # of 0s in the subnet mask: 8 – 3 = 5 (hostid bits) Mask is: , or, # of hosts per subnet: 2 5 = 32

Notes-4 CMPT 471  Subnet Addressing (cont.) Subnet address ranges 1 st : ~ nd : ~ rd : ~ th : ~ th : ~ th : ~ th : ~ th : ~

Notes-4 CMPT 471  Subnet Addressing (cont.)  Fixed-length subnetting All 1s or all 0s subnet is not recommended All 1s and all 0s host addresses are reserved  Variable-length subnetting No single subnetid partition works for all organizations An organization may select subnetid partition on a per-network basis; all hosts and routers attached to the network must follow the partition Subnet bits# of subnetsHosts per subnet (class B) 01 (2 0 )65534 (2 16 – 2) 22 (2 2 -2)16382 (2 14 – 2) 8254 (2 8 -2)

Notes-4 CMPT 471  Subnet Addressing (cont.)  Variable-length subnetting example A class C site has 5 subnets with host numbers: 60, 60, 60, 30, 30 2 bits in subnetid? No, only 4 subnets. 3 bits in subnetid? No, at most 32 hosts per subnets. 62 hosts 30 hosts 62 hosts 30 hosts First mask (26 1s) Second mask (27 1s) router

Notes-4 CMPT 471  Subnet Addressing (cont.)  Subnet broadcasting Subnet broadcast address  hostid is all 1s  3-tuple form: {netid, subnetid, -1}, “-1” means “all 1s”. {netid, -1, -1}  Means “deliver packet to all hosts with network address netid, even if they are in separate physical subnets”  Operationally, such broadcasting make sense only if routers that interconnect the subnets agree to propagate the packets to all subnets

Notes-4 CMPT 471  Classless Addressing  Also called supernetting  Combine several address blocks to create a larger address range: supernet  Instead of using a single netid for multiple subnets, it allows a network’s addresses to span multiple netids E.g., an organization that needs 1000 addresses can be granted 4 class C blocks instead of 1 class B block X.Y.32.0 ~ X.Y X.Y.33.0 ~ X.Y X.Y.34.0 ~ X.Y X.Y.35.0 ~ X.Y

Notes-4 CMPT 471  Classless Addressing (cont.)  Address block assigning Choose address blocks randomly  The routers outside of the supernet treat each block separately  Each router has N entries in its routing table, N = # of blocks; therefore, increase the size of the routing table tremendously

Notes-4 CMPT 471  Classless Addressing (cont.) Choose address blocks based on a set of rules so that each router has only one entry in the routing table: required by CIDR (Classless Inter-Domain Routing)  # of blocks is a power of 2 (1, 2, 4, 8 …)  The size of each block is a power of 2  The blocks are contiguous in the address space (no gaps between the blocks)  The size of supernet = (# of blocks) * (size of each block): a power of 2  The first address can be evenly divisible by supernet size

Notes-4 CMPT 471  Classless Addressing (cont.)  Blocks defining in different addressing schemes Block: [first address, last address] Classful address  one block, default mask is always known  the first address only can define the block Subnetting  the first address in the subblock (subnet) and subnet mask define the subblock Supernetting  the first address of the supernet and supernet mask define the superblock  IP address & supernet mask = first address (network address)

Notes-4 CMPT 471  Classless Addressing (cont.)  Supernet mask The reverse of a subnet mask Has less 1s than the default mask for this class Subnet mask Divide 1 network into 8 subnets Default mask (class C) Supernet mask Combine 8 networks into 1 supernet Subnetting Supernetting

Notes-4 CMPT 471  Classless Addressing (cont.)  Supernet mask examples A supernet is made out of 16 class C blocks, what is its supernet mask? B lock #: 16 = 2 4 Change the last 4 1s in the default mask (class C) to 0s to get the supernet mask:

Notes-4 CMPT 471  Classless Addressing (cont.) A supernet with mask includes an address , what is the address range?  F irst address AND = ( )  Mask , 1s: 21, 0s: 11  Last address: ( )

Notes-4 CMPT 471  Classless Addressing (cont.)  Slash notation (CIDR notation): A.B.C.D/n For identifying a CIDR block A.B.C.D: an IP address n: # of bits that are shared in every address in the block, i.e., # of 1s in the mask Prefix: common part of the address range (similar to netid), prefix length = n Suffix: varying part of the address range (similar to hostid), suffix length = 32 - n

Notes-4 CMPT 471  Classless Addressing (cont.)  Relationship between mask and prefix length /nMask/nMask / / / / (class B) / / (class C) / (class A)/ Class A: a.b.c.d/8 Class B: a.b.c.d/16 Class C: a.b.c.d/24

Notes-4 CMPT 471  Classless Addressing (cont.)  Subnetting with classless addressing Increase supernet prefix length (n) to define the subnet prefix length Example: an organization is granted the block /26. It needs to have 4 subnets. What is the subnet address and address range for each subnet?  Prefix length = 26, suffix length = 6  # of addresses in the block: 2 6 = 64  4 subnets  16 addresses per subnet  4 subnets  subnet prefix /28 (2 more 1s in the mask)

Notes-4 CMPT 471  Classless Addressing (cont.) Subnet address ranges  1 st : /28 ~ /28  2 nd : /28 ~ /28  3 rd : /28 ~ /28  4 th : /28 ~ / / / / /28 R3 R1 R2 Site: /26

Notes-4 CMPT 471  Classless Addressing (cont.)  Reserved CIDR blocks Private addresses, unroutable addresses Used with private networks Never assigned to networks in the global Internet Router in the global Internet knows they are reserved addresses, and can detect it if a packet destined to the reserved address accidentally reaches the Internet

Notes-4 CMPT 471  Classless Addressing (cont.)  Reserved CIDR blocks: list PrefixFirst addressLast address 10/ / / /