Introduction to Internetworking

Similar documents
ECE 4450:427/527 - Computer Networks Spring 2017

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

IPv4 addressing, NAT. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

Network Layer: Control/data plane, addressing, routers

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

ECE 158A: Lecture 7. Fall 2015

CS4450. Computer Networks: Architecture and Protocols. Lecture 13 THE Internet Protocol. Spring 2018 Rachit Agarwal

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Internetworking Part 2

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

Lecture 3: Packet Forwarding

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

Network layer: Overview. Network Layer Functions

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi).

Department of Computer and IT Engineering University of Kurdistan. Network Layer. By: Dr. Alireza Abdollahpouri

COMP/ELEC 429/556 Introduction to Computer Networks

Communications Software. CSE 123b. CSE 123b. Spring Lecture 2: Internet architecture and. Internetworking. Stefan Savage

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Lecture 8. Network Layer (cont d) Network Layer 1-1

CIS 551 / TCOM 401 Computer and Network Security. Spring 2006 Lecture 16

Vorlesung Kommunikationsnetze

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12

Goal of Today s Lecture. EE 122: Designing IP. The Internet Hourglass. Our Story So Far (Context) Our Story So Far (Context), Con t

Network Layer: Internet Protocol

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ECE 461 Internetworking Fall Quiz 1

internet technologies and standards

CS 348 Computer Networks. IP and Routing. Indian Institute of Technology, Bombay

Internet Protocol (IP)

Computer Networks Prof. Ashok K. Agrawala

CSC 401 Data and Computer Communications Networks

CH. 3 IP FORWARDING AND ROUTING

Network Layer. IP Protocol Stack: Key AbstracHons. Best- Effort Global Packet Delivery. Circuit Switching (e.g., Phone Network)

COMP211 Chapter 4 Network Layer: The Data Plane

Where we are in the Course

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat no true in practice. administrative autonomy

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

19: Networking. Networking Hardware. Mark Handley

IP Packet Switching. Goals of Todayʼs Lecture. Simple Network: Nodes and a Link. Connectivity Links and nodes Circuit switching Packet switching

Network Protocols - Revision

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

ET4254 Communications and Networking 1

CSE/EE 461 The Network Layer. Application Presentation Session Transport Network Data Link Physical

Internet Addresses Reading: Chapter 4. 2/11/14 CS125-myaddressing

2/22/2008. Outline Computer Networking Lecture 9 IP Protocol. Hop-by-Hop Packet Forwarding in the Internet. Internetworking.

Introduction to Internetworking

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

Chapter 4: Network Layer

CSCE 463/612 Networks and Distributed Processing Spring 2018

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

IPv4. Christian Grothoff.

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

IP - The Internet Protocol

Router Architecture Overview

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Chapter 3 Internetworking

Recap. Recap. Internetworking. First mile problem. Internet. End Users. Last mile problem. Direct link networks Packet switching.

ECE4110 Internetwork Programming. Introduction and Overview

Position of IP and other network-layer protocols in TCP/IP protocol suite

Integrated Services. Integrated Services. RSVP Resource reservation Protocol. Expedited Forwarding. Assured Forwarding.

Basic Internetworking (IP)

Chapter 4 Network Layer: The Data Plane

Communication Systems DHCP

IP Addresses. IP Addresses

CS 457 Networking and the Internet. Problems. Mechanisms 9/21/16. Fall 2016 Indrajit Ray

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Internetworking Part 2

Chapter 4 Network Layer: The Data Plane

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

IPv6: An Introduction

Computer Networking. IP Packets, IPv6 & NAT. Some Slides from Internet

LOGICAL ADDRESSING. Faisal Karim Shaikh.

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

CIS 551 / TCOM 401 Computer and Network Security

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

CSCI Networking Name:

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Lecture 3. The Network Layer (cont d) Network Layer 1-1

1 Connectionless Routing

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

CS 457 Lecture 11 More IP Networking. Fall 2011

The Network Layer Forwarding Tables and Switching Fabric

Internet Protocols (chapter 18)

NETWORK LAYER: IP Addressing

CS118 Discussion, Week 6. Taqi

CSCI Computer Networks Fall 2016

SEN366 (SEN374) (Introduction to) Computer Networks

Introduction to TCP/IP networking

Outline. IP Address. IP Address. The Internet Protocol. o Hostname & IP Address. o The Address

CSC 4900 Computer Networks: Network Layer

Inter-networking. Problem. 3&4-Internetworking.key - September 20, LAN s are great but. We want to connect them together. ...

C14a: Internetworks and The Internet

CS 43: Computer Networks The Network Layer. Kevin Webb Swarthmore College November 2, 2017

L10: Simple Internetworking. Hui Chen, Ph.D. Department of Engineering & Computer Science Virginia State University Petersburg, VA 23806

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 8

The Internet Protocol (IP)

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Transcription:

Introduction to Internetworking Stefano Vissicchio UCL Computer Science COMP0023

Internetworking Goal: Connect many networks together into one Internet. Any computer can send to any other computer on any network.

Can t we just scale up LANs?

Can t we just scale up LANs? You can connect a lot of Ethernet segments together, just refreshing the signal Problem: all hosts hear all traffic, so that doesn t scale well. You can connect a lot of Ethernet segments together by tracking where hosts are Switches learn where hosts are by listening. Traffic only goes where it needs to go. Problem: each switch needs to learn where every host is. Lots of state Packets still go everywhere until switches learn.

Can t we just scale up LANs? You can connect a lot of Ethernet segments together, just refreshing the signal Problem: all hosts hear all traffic, so that doesn t scale well. You can connect a lot of Ethernet segments together with switches, tracking where hosts are Switches learn where hosts are by listening. Traffic only goes where it needs to go. Problem: each switch needs to learn where every host is. Lots of state Packets still go everywhere until switches learn.

Default answer to all systems problems: If it doesn t scale, add hierarchy. If it doesn t go fast enough, add a cache. 7

Default answer to all systems problems: If it doesn t scale, add hierarchy. If it doesn t go fast enough, add a cache. 8

Two-layer Internet Hierarchy 1. Connect hosts together into Local-Area Networks (LANs) Eg. Ethernet, WiFi, etc LAN addresses responsible for getting packets to each host on that LAN. 2. Add a router to each LAN; connect routers together to form a Wide-Area Network (WAN) Add an extra layer that s responsible for getting packets between LANs: an Internetwork protocol.... host host host... host host host LAN 1 LAN 2 router router router WAN WAN

Addressing Within a LAN: flat MAC addresses No structure. Can just plug any computer in anywhere. Between LANs: structured IP addresses All computers on the same LAN have close network addresses Routers only need to know how to reach a LAN, not which computers are on that network

Basic Internet Design Principles Layering Best effort service model End-to-end principle Datagram packet forwarding One internetwork protocol

Basic Internet Design Principles Layering Best effort service model End-to-end principle Datagram packet forwarding One internetwork protocol

Datagram Packet Forwarding Divide messages into a sequence of datagrams Network deals with each datagram individually Each datagram carries enough information to allow any switch to decide how to get it to its destination Each datagram must contain all relevant network information in its header: Every packet contains complete destination address Routers consult forwarding table Process of building forwarding tables: routing

Routers Routers are more powerful switches that use IP addresses to forward packets across the Internet What does a router consist of? Set of interfaces where packets arrive, and from which should depart Some form of interconnect between interfaces host host... host host host... host LAN 1 router router router WAN WAN LAN 2 Router

Routers Routers are more powerful switches that use IP addresses to forward packets across the Internet What does a router do? Talk to other routers to figure out paths Forward packets to corresponding output interface host host... host host host... host LAN 1 router router router WAN WAN LAN 2 Router

Why Datagram Packet Forwarding? 1. Achieve higher levels of utilization Statistical multiplexing: provision for upper end of expected demand, not worst-case demand 2. Avoid per-flow state inside the network Plenty of routing state, but no finer-grained (e.g., perapplication) state Enables robust failover if paths fail Helps scaling

IP: One Networking Layer Protocol Design goal #1 of the Internet: Connect existing heterogeneous networks together IP unifies the architecture of the network of networks As long as applications can run over IP, they can run on any network As long as networks support IP, they can run any application email WWW phone...! SMTP HTTP RTP...! TCP UDP!! IP!! ethernet PPP! CSMA async sonet...! copper fiber radio...!

IP: One Networking Layer Protocol Design goal #1 Corollary: of the Internet: Connect existing To run heterogeneous over all networks, IP must be very networks together undemanding of the underlying networks. To support all applications, IP must TCP provide UDP! IP unifies the architecture of the network! of networks a very simple service. email WWW phone...! SMTP HTTP RTP...! IP! As long as applications can run over IP, they can run on any network As long as networks support IP, they can run any application! ethernet PPP! CSMA async sonet...! copper fiber radio...!

RFC 1149: IP over Avian Carriers First implementa7on of RFC 1149 by Bergen Linux Users Group 20

RFC 1149: IP over Avian Carriers First implementa7on of RFC 1149 by Bergen Linux Users Group 21

Let s design the Internet Protocol (IP)

IP Header We ll add an IP header to each packet. Carried across each link in a link-layer (L2) packet such as Ethernet. IP header stays (mostly) the same as the packet traverses between networks. FDDI link Ethernet link Router 2 Router 1 Sender

IP Header We ll add an IP header to each packet. Carried across each link in a link-layer (L2) packet such as Ethernet. IP header stays (mostly) the same as the packet traverses between networks. Ethernet header IP header to R1 to Dst IP payload FDDI link Ethernet link Router 2 Router 1 Sender

IP Header We ll add an IP header to each packet. Carried across each link in a link-layer (L2) packet such as Ethernet. IP header stays (mostly) the same as the packet traverses between networks. FDDI header IP header to R2 to Dst IP payload FDDI link Ethernet link Router 2 Router 1 Sender

IP Header We ll add an IP header to each packet. Carried across each link in a link-layer (L2) packet such as Ethernet. IP header stays (mostly) the same as the packet traverses between networks. FDDI header IP header to R2 to Dst IP payload Ethernet link FDDI link Destination Router 2 Router 1

IP Header We ll add an IP header to each packet. Carried across each link in a link-layer (L2) packet such as Ethernet. IP header stays (mostly) the same as the packet traverses between networks. Ethernet header IP header to D to Dst IP payload Ethernet link FDDI link Destination Router 2 Router 1

IP Header (2) IP header needs to contain the destination address. Routers will look at this to decide where next to forward the packet. What else should be in the IP header?

What else should be in the IP header? Some questions to consider: How will you reply to the packet? How does the recipient know what to do with the packet? How big can a packet be? What happens if the routers get confused? Are some packets more important than others? What happens if a packet gets corrupted?

How will you reply to the packet? To reply, you need to know the source address of the packet. Do you need this in the IP header? Advantages: One common way to find out the source. Can be used to scope other identifiers to uniquely identify a conversation. Disadvantages: Waste bits in every packet. Could just send once at the start of a conversation, and use some conversation ID after that. On balance, simpler to include source address.

How does the recipient know what to do with the packet? We re going to build many protocols on top of IP. Reliable transport (TCP) Unreliable transport (UDP) Tunnelling (GRE), Control (ICMP), etc Need some way to tell the recipient which software (for which protocol) to hand the packet to. Solution: Include a next protocol ID in the IP header. Have well-defined values: TCP=6, UDP=17, etc.

How does the recipient know what to do with the packet? We re going to build many protocols on top of IP. Reliable transport (TCP) Unreliable transport (UDP) Tunnelling (GRE), Control (ICMP), etc Need some way to tell the recipient which software (for which protocol) to hand the packet to. Solution: Include a next protocol ID in the IP header. Have well-defined values: TCP=6, UDP=17, etc.

How big can a packet be? We d like to allow reasonably large IP packets. Can we allow arbitrary packet size?

How big can a packet be? We d like to allow reasonably large IP packets. Problem: Many link technologies have a maximum frame size. This differs depending on the link type. Assume we don t want to design for smallest known maximum frame size, a priori: What happens if a smaller one comes along later?

How big can a packet be? (2) Problem: Packet is too big Solution: IP fragmentation If a packet arrives at a router, and it s too big for the next link, have the router split the packet into smaller packets that will fit. New problem: Who puts it back together again?

Who puts fragments back together again? Host A MTU=1000B R1 MTU=500B MTU=1000B Host B 1000 R2 MTU = Maximum Transfer Unit

Who puts fragments back together again? Host A MTU=1000B R1 MTU=500B MTU=1000B Host B 1000 1000 R2 MTU = Maximum Transfer Unit

Who puts fragments back together again? Host A MTU=1000B R1 MTU=500B MTU=1000B Host B 1000 500 500 R2 MTU = Maximum Transfer Unit

Who puts fragments back together again? Host A MTU=1000B R1 MTU=500B MTU=1000B Host B 1000 MTU = Maximum Transfer Unit 500 500 R2 500 500

Who puts fragments back together again? Answer #1: within the network, with no help from end-host B (receiver) Host A MTU=1000B R1 MTU=500B MTU=1000B Host B 1000 500 500 R2 1000 MTU = Maximum Transfer Unit

Who puts fragments back together again? Answer #1: within the network, with no help from end-host B (receiver) Answer #2: at end-host B (receiver) with no help from the network Host A MTU=1000B R1 MTU=500B MTU=1000B Host B 1000 MTU = Maximum Transfer Unit 500 500 R2 500 500 500 500

Who puts fragments back together again? Answer #1: within the network, with no help from end-host B (receiver) Answer #2: at end-host B (receiver) with no help from the network Host A MTU=1000B R1 MTU=500B MTU=1000B Host B 1000 MTU = Maximum Transfer Unit 500 500 R2 500 500 1000

Let s consider a slightly more complex case Answer #1: within the network, with no help from end-host B (receiver) Answer #2: at end-host B (receiver) with no help from the network Host A MTU=1000B R1 MTU=500B R3 MTU=1000B Host B 1000 500 500 R2 MTU = Maximum Transfer Unit

Fragments can take different paths... Answer #1: within the network, with no help from end-host B (receiver) Answer #2: at end-host B (receiver) with no help from the network Host A MTU=1000B R1 MTU=500B R3 500 MTU=1000B Host B 1000 500 R2 500 500 MTU = Maximum Transfer Unit

We must reassemble at the receiver Answer #1: within the network, with no help from end-host B (receiver) Answer #2: at end-host B (receiver) with no help from the network Host A MTU=1000B R1 MTU=500B R3 500 MTU=1000B Host B 1000 500 R2 500 500 1000 MTU = Maximum Transfer Unit

We must reassemble at the receiver Answer #1: within the network, with no help from end-host B (receiver) Answer #2: at end-host B (receiver) with no help from the network Only the receiver is guaranteed to be on all the possible paths taken by fragments. MTU=1000B R3 MTU=1000B MTU=500B Receiver buffers fragmented packets until R1 500 all fragments arrive, and reassembles fragments before passing them to upper layer Host A 1000 MTU = Maximum Transfer Unit 500 R2 500 500 Host B 1000

What happens if the routers get confused? Routers talk to each other to figure out how to get to a destination network. 1 2 3 D S is sending to D S 4 5 6 7

What happens if the routers get confused? Routers talk to each other to figure out how to get to a destination network. What happens if they temporarily have inconsistent state? 1 2 3 D S is sending to D S 4 5 6 7

What happens if the routers get confused? Routers talk to each other to figure out how to get to a destination network. What happens if they temporarily have inconsistent state? Link 2-3 fails 1 2 3 D S 4 5 6 7

What happens if the routers get confused? Routers talk to each other to figure out how to get to a destination network. What happens if they temporarily have inconsistent state? Link 2-3 fails 1 2 3 D S 4 6 5 Routers 4 and 5 don t know about the failure yet and s7ll try to use old path 7

What happens if the routers get confused? Routers talk to each other to figure out how to get to a destination network. What happens if they temporarily have inconsistent state? Routers 1 and 2 know about a route that s7ll works and switch to that Link 2-3 fails 1 2 3 D S 4 6 5 Routers 4 and 5 don t know about the failure yet and s7ll try to use old path 7

What happens if the routers get confused? Routers talk to each other to figure out how to get to a destination network. What happens if they temporarily have inconsistent state? 1 2 3 D S 4 5 Traffic from S to D loops un7l: it s dropped due to massive conges7on router 4 learns about the failure 6 7

What happens if the routers get confused? Solution: Add a counter to packets Have each router decrease the counter by one If the counter reaches zero, drop the packet... and send an ICMP time exceeded message back to the source In IP packets, we call this counter time-to-live (TTL)

Are some packets more important than others?

Are some packets more important than others? When packets arrive too fast at a router, they ll have to queue. queue of packets waiting to cross the link Do we need a way for some important packets to jump the queue?

Are some packets more important than others? Do we need a way for some important packets to jump the queue? It s easy to add a priority field to packets. Higher priority packets overtake lower priority ones at a queue. It s harder to police who gets high priority. Do you want to pay more to get high priority? Packets traverse many networks. Whom do you pay?

Are some packets more important than others? Do we need a way for some important packets to jump the queue? It s easy to add a priority field to packets. Higher priority packets overtake lower priority ones at a queue. It s harder to police who gets high priority. Do you want to pay more to get high priority? Packets traverse many networks. Who to pay?

What happens if a packet gets corrupted? Most errors will be detected by the link CRC. Some may escape detection (e.g. bit flipped in router memory). Do we care? Punt to higher layer protocol? Only the application knows how much error detection overhead is appropriate. Checksum in IP? Avoids misrouted packets if destination address corrupted General solution protects all application protocols Solution: End-to-end argument implies don t checksum payload. Add simple checksum protecting IP header only to avoid misrouting.

What happens if a packet gets corrupted? Most errors will be detected by the link CRC. Some may escape detection (e.g. bit flipped in router memory). Do we care? Punt to higher layer protocol? Only the application knows how much error detection overhead is appropriate. Checksum in IP? Avoids misrouted packets if destination address corrupted General solution protects all application protocols Solution: End-to-end argument implies don t checksum payload. Add simple checksum protecting IP header only to avoid misrouting.

What happens if a packet gets corrupted? Most errors will be detected by the link CRC. Some may escape detection (e.g. bit flipped in router memory). Do we care? Punt to higher layer protocol? Only the application knows how much error detection overhead is appropriate. Checksum in IP? Avoids misrouted packets if destination address corrupted General solution protects all application protocols Solution: End-to-end argument implies don t checksum payload. Add simple checksum protecting IP header only to avoid misrouting.

The IP Packet Header

The IP Packet Header Version: Indicates the version of the IP protocol (4 for this) HLen: Number of 32-bit words in the header 5 (20 bytes) if no options present. Type of Service: Allows some packets to be treated differently Length of packet in bytes TTL: time to live counter Protocol: next layer, eg TCP Checksum: only covers header Ident, Don t Frag / More Frag flags & offset: used for fragmentation Options: extra stuff to extend IP

The IP Packet Header Version: Indicates the version of the IP protocol (4 for this) HLen: Number of 32-bit words in the header 5 (20 bytes) if no options present. Type of Service: Allows some packets to be treated differently Length of packet in bytes Ident, Don t Frag / More Frag flags & offset: used for fragmentation TTL: time to live counter Protocol: next layer, eg TCP Checksum: only covers header Options: extra stuff to extend IP

The IP Packet Header Version: Indicates the version of the IP protocol (4 for this) HLen: Number of 32-bit words in the header 5 (20 bytes) if no options present. Type of Service: Allows some packets to be treated differently Length of packet in bytes Ident, Don t Frag / More Frag flags & offset: used for fragmentation TTL: time to live counter Protocol: next layer, eg TCP Checksum: only covers header Options: extra stuff to extend IP

The IP Packet Header Version: Indicates the version of the IP protocol (4 for this) HLen: Number of 32-bit words in the header 5 (20 bytes) if no options present. Type of Service: Allows some packets to be treated differently Length of packet in bytes Ident, Don t Frag / More Frag flags & offset: used for fragmentation TTL: time to live counter Protocol: next layer, eg TCP Checksum: only covers header Options: extra stuff to extend IP

The IP Packet Header Version: Indicates the version of the IP protocol (4 for this) HLen: Number of 32-bit words in the header 5 (20 bytes) if no options present. Type of Service: Allows some packets to be treated differently Length of packet in bytes Ident, Don t Frag / More Frag flags & offset: used for fragmentation TTL: time to live counter Protocol: next layer, eg TCP Checksum: only covers header Options: extra stuff to extend IP

The IP Packet Header Version: Indicates the version of the IP protocol (4 for this) HLen: Number of 32-bit words in the header 5 (20 bytes) if no options present. Type of Service: Allows some packets to be treated differently Length of packet in bytes Ident, Don t Frag / More Frag flags & offset: used for fragmentation TTL: time to live counter Protocol: next layer, eg TCP Checksum: only covers header Options: extra stuff to extend IP

The IP Packet Header SourceAddr, DestinationAddr: IP addresses of packet source and destination. Version: Indicates the version of the IP protocol (4 for this) HLen: Number of 32-bit words in the header 5 (20 bytes) if no options present. Type of Service: Allows some packets to be treated differently Length of packet in bytes Ident, Don t Frag / More Frag flags & offset: used for fragmentation TTL: time to live counter Protocol: next layer, eg TCP Checksum: only covers header Options: extra stuff to extend IP

Designing IP Addresses Question #1: what should an address be associated with? e.g., a telephone number is associated not with a person, but with a handset Question #2: what structure should addresses have? What are the implications of different types of structure? Question #3: who determines the particular addresses used in the global Internet? What are the implications of how this is done?

IPv4 Addresses A unique 32-bit number Uniquely identifies and associated with an interface (on a host, on a router,...) For humans, represented in dotted-quad notation a.b.c.d where each component is an eight-bit decimal number between zero and 255 e.g. 12.34.158.5 12 34 158 5 00001100 00100010 10011110 00000101

Structure of Internet Addresses Original Internet address structure First eight bits: network address block (/8) Last 24 bits: host address 8 24 Network Host Assumed 256 networks were more than enough! (They weren t )

Next Design: Classful Addressing Constrain network, host parts to be fixed lengths Class A: Very large blocks (e.g., IBM, MIT, HP have /8 s) Class B: Large blocks (e.g., medium-sized organizations) Class C: Small blocks (e.g., very small organizations) Class A: Networks Hosts/network 126 16 million Class B: 16,384 65,534 Class C: 2 million 254

Address Classes Inhibited Growth Class C networks too small for mid-sized organizations, so most organizations got a class B Resulting demand lead to scarcity of class B networks If network reaches the physical size limit imposed by the link layer, then need to allocate a new network address block to that organization, even though it hasn t filled its class B block! Number of networks Hosts/network Class A 126 16 million Class B 16,384 65,535 Class C 2 million 256

Addressing in Today s Internet: CIDR Classless Interdomain Routing Classless: CIDR removes the constraint on network, host address size Flexible boundary between network, host addresses, resulting in high address assignment efficiency

CIDR Addressing Use two 32-bit numbers to represent a network. Network number = IP address AND mask IP address: 12.4.0.0 IP mask: 255.254.0.0 Address: Mask: 00001100 00000100 00000000 00000000 Network number Host part 11111111 11111110 00000000 00000000 Mask must be a contiguous prefix of 1s, starting from the most significant bit, then 0s thereafter; this gives rise to a mask length Written as network number/mask length; e.g. 12.4.0.0/15 or 12.4/15

CIDR: Hierarchal Address Allocation Prefixes are key to Internet scalability Addresses allocated in contiguous chunks (prefixes) Routing protocols and packet forwarding based on prefixes 12.0.0.0/15 12.2.0.0/16 12.3.0.0/16 12.3.0.0/22 12.3.4.0/24 12.0.0.0/8 12.253.0.0/16 12.3.254.0/23 12.253.0.0/19 12.253.32.0/19 12.253.64.0/19 12.253.64.108/30 12.253.96.0/18 12.253.128.0/17

CIDR Scalability: Address Aggregation Customer #0 200.23.16.0/24 Customer #1 200.23.18.0/24 Customer #2 200.23.20.0/24 Customer #7 200.23.30.0/24 Provider A Provider B Send me anything with addresses beginning 200.23.16.0/20 Send me anything with addresses beginning 199.31.0.0/16 Routers in the rest of Internet just need to know how to reach 200.23.16.0/20 Provider A can then direct packets to the correct customer Internet

Forwarding Packets Link 1 Provider A Link 4 Link 2 Link 3 Customer 1 Customer 2 Customer 3 Customer 4 201.143.0.0/22 201.143.4.0/24 201.143.5.0/24 201.143.6.0/23 Prefix Link 201.143.0.0/22 Link 1 201.143.4.0/24 Link 2 201.143.5.0/24 Link 3 201.143.6.0/23 Link 4

Prefix Matching in Routers Packets only contain addresses, not prefix lengths. Route information in routers contains addresses with prefix lens. 201.143.0.0/22 201.143.4.0/24 201.143.5.0/24 201.143.6.0/23 Consider incoming packet with dest 201.143.5.3: 11001001 10001111 000000 11001001 10001111 00000100 11001001 10001111 00000101 11001001 10001111 0000011 11001001 10001111 00000101 00000111 201 143 5 3 First 21 bits match four partial prefixes First 22 bits match three partial prefixes First 23 bits match two partial prefixes First 24 bits match exactly one full prefix

Prefix Matching in Routers Packets only contain addresses, not prefix lengths. Route information in routers contains addresses with prefix lens. 201.143.0.0/22 201.143.4.0/24 201.143.5.0/24 201.143.6.0/23 Consider incoming packet with dest 201.143.5.3: 11001001 10001111 000000 11001001 10001111 00000100 11001001 10001111 00000101 11001001 10001111 0000011 11001001 10001111 00000101 00000111 201 143 5 3 First 21 bits match four partial prefixes First 22 bits match three partial prefixes First 23 bits match two partial prefixes First 24 bits match exactly one full prefix

Prefix Matching in Routers Packets only contain addresses, not prefix lengths. Route information in routers contains addresses with prefix lens. 201.143.0.0/22 201.143.4.0/24 201.143.5.0/24 201.143.6.0/23 Consider incoming packet with dest 201.143.5.3: 11001001 10001111 000000 11001001 10001111 00000100 11001001 10001111 00000101 11001001 10001111 0000011 11001001 10001111 00000101 00000111 201 143 5 3 First 21 bits match four partial prefixes First 22 bits match three partial prefixes First 23 bits match two partial prefixes First 24 bits match exactly one full prefix

Prefix Matching in Routers Packets only contain addresses, not prefix lengths. Route information in routers contains addresses with prefix lens. 201.143.0.0/22 201.143.4.0/24 201.143.5.0/24 201.143.6.0/23 Consider incoming packet with dest 201.143.5.3: 11001001 10001111 000000 11001001 10001111 00000100 11001001 10001111 00000101 11001001 10001111 0000011 11001001 10001111 00000101 00000111 201 143 5 3 First 21 bits match four partial prefixes First 22 bits match three partial prefixes First 23 bits match two partial prefixes First 24 bits match exactly one full prefix

Prefix Matching in Routers Packets only contain addresses, not prefix lengths. Route information in routers contains addresses with prefix lens. 201.143.0.0/22 201.143.4.0/24 201.143.5.0/24 201.143.6.0/23 Consider incoming packet with dest 201.143.5.3: 11001001 10001111 000000 11001001 10001111 00000100 11001001 10001111 00000101 11001001 10001111 0000011 11001001 10001111 00000101 00000111 201 143 5 3 First 21 bits match four partial prefixes First 22 bits match three partial prefixes First 23 bits match two partial prefixes First 24 bits match exactly one full prefix

Is Exact Matching All We Need? Customer #0 200.23.16.0/24 Customer #1 200.23.18.0/24 Customer #2 200.23.20.0/24 Customer #7 200.23.30.0/24 Provider A Provider B Send me anything with addresses beginning 200.23.16.0/20 Send me anything with addresses beginning 199.31.0.0/16 Routers in the rest of Internet just need to know how to reach 200.23.16.0/20 Provider A can then direct packets to the correct customer Internet

What if a Customer has 2 Providers? Customer #0 200.23.16.0/24 Customer #2 200.23.20.0/24 Customer #7 200.23.30.0/24 Provider A Send me 200.23.16.0/20 Customer #1 Provider B Send me 200.23.18.0/24 199.31.0.0/16, 200.23.18.0/24 Internet Multi-homed Customer #1 (200.23.18.0/24) has two providers Rest of Internet needs to know how to reach Customer #1 through either Therefore, 200.23.18.0/24 route must be globally visible

Consider Any Provider Beyond A, B Customer #0 200.23.16.0/24 Internet Customer #2 200.23.20.0/24 Provider A Send me 200.23.16.0/20 Customer #7 200.23.30.0/24 Provider C Customer #1 200.23.18.0/24 Provider B Send me 199.31.0.0/16, 200.23.18.0/24 Multi-homed Customer #1 (200.23.18.0/24) has two providers Rest of Internet needs to know how to reach Customer #1 through either Therefore, 200.23.18.0/24 route must be globally visible

Whom Should Provider C Forward To? Someone s one prefix is covered completely by another. E.g. 200.23.18.0/24 is a subset of 200.23.16.0/20 in previous slide 200.23.16.0/20 200.23.18.0/24 Consider incoming packet with dest 200.23.18.3: 11001000 00010111 0001 11001000 00010111 00010010 11001001 00010111 00010010 00000111 200 23 18 3

Whom Should Provider C Forward To? Someone s one prefix is covered completely by another. E.g. 200.23.18.0/24 is a subset of 200.23.16.0/20 in previous slide 200.23.16.0/20 200.23.18.0/24 11001000 00010111 0001 11001000 00010111 00010010 Consider incoming packet with dest 200.23.18.3: 11001001 00010111 00010010 00000111 200 23 18 3 First 20 bits precisely match all of first prefix First 24 bits precisely match all of second prefix Which one should the router use?

Whom Should Provider C Forward To? Someone s one prefix is covered completely by another. E.g. 200.23.18.0/24 is a subset of 200.23.16.0/20 in previous slide 200.23.16.0/20 200.23.18.0/24 11001000 00010111 0001 11001000 00010111 00010010 Consider incoming packet with dest 200.23.18.3: 11001001 00010111 00010010 00000111 200 23 18 3 First 20 bits precisely match all of first prefix First 24 bits precisely match all of second prefix Which one should the router use?

Whom Should Provider C Forward To? Someone s one prefix is covered completely by another. E.g. 200.23.18.0/24 is a subset of 200.23.16.0/20 in previous slide 200.23.16.0/20 200.23.18.0/24 11001000 00010111 0001 11001000 00010111 00010010 Consider incoming packet with dest 200.23.18.3: 11001001 00010111 00010010 00000111 200 23 18 3 First 20 bits precisely match all of first prefix First 24 bits precisely match all of second prefix Which one should the router use? Use the longest prefix that matches completely

CIDR: Aggregation Not Always Possible Customer #0 200.23.16.0/24 Customer #2 200.23.20.0/24 Customer #7 200.23.30.0/24 Provider A Send me 200.23.16.0/20, 200.23.18.0/24 Customer #1 Provider B Send me 200.23.18.0/24 199.31.0.0/16, 200.23.18.0/24 Internet Multi-homed Customer #1 (200.23.18.0/24) has two providers Rest of Internet needs to know how to reach Customer #1 through either Therefore, 200.23.18.0/24 route must be globally visible. Must advertise the more specific prefix from both, or only provider B will be used

Are 32-bit Addresses Enough? Not all that many unique addresses: 2 32 = 4,294,967,296 Just over four billion Some (many) reserved for special purposes And addresses are allocated in larger blocks Many devices need IP addresses Computers, phones, routers, tanks, toasters, Long-term solution (perhaps): larger address space IPv6 has 128-bit addresses (2 128 = 3.403 10 38 ) Short-term solutions: limping along with IPv4 Network address translation (NAT) Dynamically-assigned addresses (DHCP) Private addresses