Layering and Addressing CS551. Bill Cheng. Layer Encapsulation. OSI Model: 7 Protocol Layers.

Similar documents
Design Considerations : Computer Networking. Outline. Challenge 1: Address Formats. Challenge. How to determine split of functionality

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

CS 268: Computer Networking

Lecture 12: Addressing. CSE 123: Computer Networks Alex C. Snoeren

Lecture 12: Aggregation. CSE 123: Computer Networks Alex C. Snoeren

Outline : Computer Networking. Objectives. Who s Who? Administrivia. Layering. L-1 Intro to Computer Networks

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

IP - The Internet Protocol

Network layer: Overview. Network Layer Functions

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

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

LOGICAL ADDRESSING. Faisal Karim Shaikh.

Network Layer: Control/data plane, addressing, routers

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

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

End-to-End Communication

Communication Systems DHCP

15-744: Computer Networking. L-1 Intro to Computer Networks

Networks. an overview. dr. C. P. J. Koymans. Informatics Institute University of Amsterdam. February 4, 2008

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

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

Where we are in the Course

INTERNET SYSTEM. Internet Protocol. Kent State University Dept. of Computer Science. CS 4/55231 Internet Engineering. Large Scale Networking

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Internet Protocol (IP) Lecture 2: Prof. Shervin Shirmohammadi CEG

CS 640: Introduction to Computer Networks. Today s Lecture. Page 1

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

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CS519: Computer Networks. Lecture 2: Feb 2, 2004 IP (Internet Protocol)

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

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

Vorlesung Kommunikationsnetze

Aside: Interaction with Link Layer Computer Networking. Caching ARP Entries. ARP Cache Example

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

EEC-484/584 Computer Networks

Design Considerations : Computer Networking. Outline

The Internet Protocol (IP)

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

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

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

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

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

IP Addresses. IP Addresses

Telecom Systems Chae Y. Lee. Contents. Overview. Issues. Addressing ARP. Adapting Datagram Size Notes

Network Layer: Internet Protocol

Lecture 3: Packet Forwarding

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

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

internet technologies and standards

Internet Protocol (IP)

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

CSC 401 Data and Computer Communications Networks

The Internetworking Problem. Internetworking. A Translation-based Solution

Introduction to TCP/IP networking

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

Computer Networks Prof. S. Ghosh Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture 28 IP Version 4

EEC-684/584 Computer Networks

TCP/IP Protocol Suite

CS118 Discussion, Week 6. Taqi

Chapter 4: network layer

ECE 158A: Lecture 7. Fall 2015

Network Layer/IP Protocols

CSCI-1680 Network Layer:

Introduction to Internetworking

Chapter 4 Network Layer: The Data Plane. Part A. Computer Networking: A Top Down Approach

CSCI-GA Operating Systems. Networking. Hubertus Franke

CSCI Computer Networks Fall 2016

Introduction to Information Science and Technology 2017 Networking II. Sören Schwertfeger 师泽仁

Master Course Computer Networks IN2097

II. Principles of Computer Communications Network and Transport Layer

cs144 Midterm Review Fall 2010

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Internet Protocols (chapter 18)

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

Data & Computer Communication

Chapter 5 Network Layer

IPv6 Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land

Internetworking Part 2

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

Table of Contents. Cisco How NAT Works

Chapter 4: Network Layer

416 Distributed Systems. Networks review; Day 1 of 2 Jan 5 + 8, 2018

EE 610 Part 2: Encapsulation and network utilities

Router Architecture Overview

Internetwork Protocols

Subnets. IP datagram format. The Internet Network layer. IP Fragmentation and Reassembly. IP Fragmentation & Reassembly. IP Addressing: introduction

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

Review for Chapter 4 R1,R2,R3,R7,R10,R11,R16,R17,R19,R22,R24, R26,R30 P1,P2,P4,P7,P10,P11,P12,P14,P15,P16,P17,P22,P24,P29,P30

CSCD58 WINTER 2018 WEEK 6 - NETWORK LAYER PART 1. Brian Harrington. February 13, University of Toronto Scarborough

Quiz. Segment structure and fields Flow control (rwnd) Timeout interval. Phases transition ssthresh setting Cwnd setting

COMP/ELEC 429/556 Introduction to Computer Networks

Lecture 17: Network Layer Addressing, Control Plane, and Routing

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

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

Network Protocols - Revision

Lecture 10: Addressing

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

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

Network layer Network Layer 4-1

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

Transcription:

Protocols CS551 Layering and Addressing Bill Cheng Set of rules governing communication between network elements (applications, hosts, routers) Protocols define: Format and order of messages Actions taken on receipt of a message We need design guidelines! Protocols are hard to design http://merlot.usc.edu/cs551-f12 1 2 Layering Layering Characteristics Layering: technique to simplify complex systems Teleconferencing User A User B Peers Application Each layer relies on services from layer below and exports services to layer above Interface defines interaction Hides implementation - layers can change without disturbing other layers (black box) Transport Network Link 3 4 Layer Encapsulation OSI Model: 7 Protocol Layers Physical: how to transmit bits Data link: how to transmit frames Network: how to route packets hop2hop Transport: how to send packets end2end Session: how to tie flows together Presentation: byte ordering, security Application: everything else! 5 6

eliability Flow control Fragmentation Layering General Issues Example: Transport Layer First end-to-end layer End-to-end state May provide reliability, flow control, and congestion control Multiplexing Connection setup (handshaking) Addressing/naming (locating peers) 7 8 Example: Network Layer Point-to-point communication Network and host addressing outing Is Layering Harmful? Sometimes.. Layer N may duplicate lower level functionality (e.g., error recovery). Layers may need same info (timestamp, MTU). Strict adherence to layering may hurt performance. Naïve layer implementation frequently hurts performance. 9 10 Course Focus IP IP & TCP IP & TCP Application Transport Network Link outer outer 11 12

IP Header IP Functions 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Version IHL Type of Service Total Length Identification Flags Fragment Offset Time to Live Protocol Header Checksum Source IP Address Destination IP Address Options Padding Example Internet Datagram Header Not used until recently Type of service Fragmentation Identification, flags and fragment offset Bounded delivery Time to live Protocol (De)multiplexing higher layer protocols (analogous to port numbers in TCP) IP packet length limited to 64K Length 13 Ensures some degree of header integrity Header checksum 14 Fragmentation Fragmentation Is Harmful Nice if we can send large chunks of data Forwarding costs per packet Example of packet just bigger than MTU Uses resources poorly Different link-layers have different MTUs Fragmentation Intra-network Inter-network Loss of a fragment Poor end-to-end performance Buffering constraints eassembly is hard 15 16 Path MTU Discovery Path MTU s dynamically discover MTU of path Send message with don t fragment bit Get ICMP message indicating size Increasing/decreasing path MTU What happens if path changes? Usually implemented by the transport layer Expected that future routing protocols will provide MTU information Algorithm: Initialize MTU to MTU to next hop Send datagrams with DF bit set If "datagram too big", decrease MTU Periodically (>5mins, or >1min after previous increase), increase MTU Some routers will return proper MTU MTU values cached in routing table 17 18

Addressing in IP Addressing Considerations IP addresses are names of interfaces Fixed length or variable length? DNS names are names of hosts Issues: DNS binds host names to interfaces outing binds interface names to paths Flexibility Processing costs Header size Engineering choice: IP uses fixed length addresses 19 20 Structured vs flat Addressing Considerations Packet Traveling Through the Internet Issues Need structure for designing scalable binding from outers send packet to next closest point interface name to route! How many levels? Fixed? Variable? H H H H H : s H : outers 21 22 IP Addressing Hierarchy Some Special IP Addresses 127.0.0.1: local host (a.k.a. The loopback address. 127.X.X.X: same as above. Backbones bits all set to 0: network address. bits all set to 1: broadcast address. eginals 0.0.0.0: this host on this network. Campus LANs 23 24

IP Addresses Class Sizes Fixed length: 32 bits Initial classful structure High Order Bits Format Class --------------- ---------------------------------- ----- 0 7 bits of net, 24 bits of host a 10 14 bits of net, 16 bits of host b 110 21 bits of net, 8 bits of host c 111 escape to extended addressing mode Total IP address size: 4 billion Class A: 128 networks, 16M hosts Class B: 16K networks, 64K hosts Class C: 2M networks, 256 hosts 25 26 IP Address Classes (Some Are Obsolete) 8 16 24 32 Subnet Addressing for networks with more than 255 hosts Very few LANs have close to 64K hosts Class A Class B 0 1 0 Network ID Network ID ID ID could subnet a class B into several chunks Variable length subnet masks Class C 1 1 0 Network ID ID Network Subnet Class D 1 1 1 0 Multicast Addresses Class E 1 1 1 1 eserved for experiments 27 28 Subnetting Subnetting Example Simple and elegant way to reduce the total number of network addresses that are assigned. Assume an organization was assigned address 150.100 (10010110 01100100) Assume < 100 hosts per subnet network host How many host bits do we need? network subnet host seven 1111......1111 mask What is the network mask? 11111111 11111111 11111111 10000000 255.255.255.128 29 30

Using Subnet Mask Assume a packet arrives with address 150.100.12.176 (10010110 01100100 00001100 10110000) Step 1: AND address with subnet mask (150.100.12.176) AND (255.255.255.128) result: 150.100.12.128 which is the target network IP Address Problem (1991)? in danger of running out of classes A and B Address space depletion outing table explosion 150.100.12.129-150.100.12.254 Target network has hosts in the range 31 32 Some Problems but people refuse to give it back Class B sparsely populated Classless Inter-domain outing (CID) Do not use classes to determine network ID how do you allocate to avoid routing table explosion? One solution: assign class C addresses Use common part of address as network number i.e., use netmask (/xx bits) for network address Addresses not geographically related addresses given by your ISP blocks assigned to various countries E.g., addresses 192.4.16-192.4.31 have the first 20 bits in common. Thus, we use this as the network number 192.4.16: 11000000 00000100 00010000 192.4.31: 11000000 00000100 00011111 netmask is /20 In CID /xx is valid for almost any xx 33 34 CID Addressing A block of addresses is described by address prefix mask Examples: 10/8 denotes addresses from 10.0.0.0 to 10.255.255.255 /xx indicates number of significant bits Classless Inter-Domain outing (CID) allocate addresses to organizations in power-of-two blocks Several key ideas organizations get addresses from provider s block provider aggregates Addresses: address utilization routing table size 35 36

Old classes and CID CID prefixes Class A network is a /8 Class B network is a /16 Class C network is a /24 CID Blk Prfx /28 /27 /26 /25 /24 /23 /22 /21 /20 /19 /18 /17 /16 /15 /14 /13 # Eqiv Class C # of s 1/16 16 1/8 32 1/4 64 1/2 128 1 class C 256 2 512 4 1,024 8 2,048 16 4,096 32 8,192 64 16,384 128 32,768 256=1 class B 65,536 512 131,072 1,024 262,144 2,048 524,288 37 38 CID example CID Illustration Network admin is allocated 8 class C chunks, 201.10.0.0 to 201.10.7.255 (11001001 00001010 00000000 00000000 to 11001001 00001010 00000111 11111111) 12/6 Provider Allocation uses 3 bits of class C space emaining 21 bits are network number, written as 201.10.0.0/21 21 is prefix indication which must be carried with address outing protocols carry this prefix 12/6 = 12/8 = 13/8 = 14/8 = 15/8 = 12/8 13/8 14/8 15/8 0 0 0 0 1 1 0 0.0.0.0 0 0 0 0 1 1 0 0.0.0.0 0 0 0 0 1 1 0 1.0.0.0 0 0 0 0 1 1 1 0.0.0.0 0 0 0 0 1 1 1 1.0.0.0 39 40 CID Shortcomings Multi-homing Customer selecting a new provider Some other ideas geographic addressing Is it enough? Do we need a new IP? Network Address Translation (NAT) Kludge (but useful) Sits between your network and the Internet Translates local network layer addresses to global IP addresses Has a pool of global IP addresses (less than number of hosts on your network) 41 42

NAT Illustration NAT Illustration - Overloading Pool of global IP addresses G P Single global IP addresses N P N Dg Internet Dg Internet Dg Sg data NAT Private network Dg Sg:Ng data NAT Private network Sp Sp:Np Operation:Sp wants to talk to Dg: Create Sg-Sp mapping (g for global and p for private) eplace Sp with Sg for outgoing packets eplace Sg with Sp for incoming packets Dg Sp data Operation:Sp:Np wants to talk to Dg: Create Ng-Sp:Np mapping eplace Sp:Np with Sg:Ng for outgoing packets eplace Sg:Ng with Sp:Np for incoming packets Dg Sp:Np data 43 44 NAT Disadvantages Breaks end-to-end semantics internal computers cannot be addressed from the outside more on End-to-end Argument later [Saltzer81a] NAT box modifies packets on the fly sometimes needs to modify app-level info, not just packet headers ex. if IP address is in packet data (not just header), as in FTP therefore forces application-specific gateways (for protocols that do not work behind NAT box) state information stored in NAT box new failure modes NAT Advantages Breaks end-to-end semantics internal computers cannot be addressed from the outside an effective security kludge! Cheap, relatively easy, relatively fast Don t have to tell your cable modem company :-) 45 46 IPv6 IPv6 The ight Way just make bigger addresses and fix a bunch of other stuff But... requires a whole new protocol stack slow adoption but but... seems to be gaining momentum Cell phones Asia We will not talk about IPv6 in this class Version Traffic Class Flow Label Payload Length Next Header Hop Limit + + + Source Address + + + + + + Destination Address + + + 47 48

Things to Think About Hints for Computer System Design How much IP functionality is really useful? Where? Why? Functionality (Does it work?) Speed (Is it fast enough?) Fault-tolerance (Does it keep working?) Was IP a success by design or by accident? More on this later [Clark88a] Completeness Separate normal and worst case Shared load End-to-end Safety first End-to-end Interface Do one thing well: Don t generealize Get it right Don t hide power Use procedure arguments Leave it to the client Keep basic interfaces stable Keep a place to stand Make it fast Split resources Static analysis Dynamic translation End-to-end Log updates Make actions atomic Implementation Plan to throw one away Keep secrets Use a good idea again Divide the conquer Cache answers Use hints Use brute force Compute in background Batch processing Make actions atomic Use hints 49 50