Introduction to Communication Networks – 67594 Dr. Michael Schapira Rothberg A413 Some of the slides were taken from Prof. Scott Shenker,

Slides:



Advertisements
Similar presentations
Layering and the network layer CS168, Fall 2014 Sylvia Ratnasamy
Advertisements

Spring 2000CS 4611 Introduction Outline Statistical Multiplexing Inter-Process Communication Network Architecture Performance Metrics.
OSI Model OSI MODEL.
COS 461 Fall 1997 Networks and Protocols u networks and protocols –definitions –motivation –history u protocol hierarchy –reasons for layering –quick tour.
Intro (continued) and Design Principles Nick Feamster CS 3251: Computer Networking I Spring 2013.
Department of Computer Engineering University of California at Santa Cruz Networking Systems (1) Hai Tao.
1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Architecture Computer Science Division Department of Electrical Engineering and.
1 Probability, Preview, and Principles EE122 Fall 2011 Scott Shenker Materials with thanks to Jennifer Rexford, Ion.
Networking Theory (Part 1). Introduction Overview of the basic concepts of networking Also discusses essential topics of networking theory.
CS 268: Lecture 2 (Layering & End-to-End Arguments)
ISOC-Chicago 2001John Kristoff - DePaul University1 Journey to the Center of the Internet John Kristoff DePaul University.
EE 122: Layering and the Internet Architecture Kevin Lai September 4, 2002.
1 EE 122: Internet Design Principles Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern.
Introduction to Management Information Systems Chapter 5 Data Communications and Internet Technology HTM 304 Fall 07.
EE 4272Spring, 2003 Protocols & Architecture A Protocol Architecture is the layered structure of hardware & software that supports the exchange of data.
Data Communications Architecture Models. What is a Protocol? For two entities to communicate successfully, they must “speak the same language”. What is.
1 Link Layer & Network Layer Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
OIS Model TCP/IP Model.
1 Review of Important Networking Concepts Introductory material. This slide uses the example from the previous module to review important networking concepts:
1 Internet Design Principles EE 122: Intro to Communication Networks Fall 2010 (MW 4-5:30 in 101 Barker) Scott Shenker TAs: Sameer Agarwal, Sara Alspaugh,
Plan of attack ‣ What is a network made of? ‣ How is it shared? ‣ How do we evaluate a network? ‣ How is communication organized? 1.
1 Internet Design: Goals and Principles EE122 Fall 2012 Scott Shenker Materials with thanks to Jennifer Rexford,
Protocols and the TCP/IP Suite Chapter 4. Multilayer communication. A series of layers, each built upon the one below it. The purpose of each layer is.
Computer Networking Lent Term M/W/F 11-midday LT1 in Gates Building Slide Set 2 Andrew W. Moore January
CS448 Computer Networking Chapter 1 Introduction to Computer Networks Instructor: Li Ma Office: NBC 126 Phone: (713)
CS 268: Lecture 3 (Layering & End-to-End Arguments)
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
1.1 What is the Internet What is the Internet? The Internet is a shared media (coaxial cable, copper wire, fiber optics, and radio spectrum) communication.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 Taj Mahal, Agra, India.
Chapter 2 – X.25, Frame Relay & ATM. Switched Network Stations are not connected together necessarily by a single link Stations are typically far apart.
Internet Addresses. Universal Identifiers Universal Communication Service - Communication system which allows any host to communicate with any other host.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Introduction Slide 1 A Communications Model Source: generates.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
CS 268: Internet Architecture & E2E Arguments Scott Shenker and Ion Stoica (Fall, 2010) 1.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_b Protocol Layering Instructor: Dr. Li-Chuan Chen Date: 09/15/2003 Based in part upon slides of Prof.
Ch 1. Computer Networks and the Internet Myungchul Kim
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Computer Security Workshops Networking 101. Reasons To Know Networking In Regard to Computer Security To understand the flow of information on the Internet.
William Stallings Data and Computer Communications
TCP/IP Protocol Architecture CSE 3213 – Fall
Computer Networking Michaelmas/Lent Term M/W/F 11:00-12:00
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Protocols and Architecture Slide 1 Use of Standard Protocols.
Protocol Suits and Layering Models OSI Model Dr. Abraham UTPA.
1 Switching and Forwarding Sections Connecting More Than Two Hosts Multi-access link: Ethernet, wireless –Single physical link, shared by multiple.
1 Network Architecture Section Network Architecture Challenge –Fill the gap between hardware capabilities and application expectations, and to.
Computer Engineering and Networks, College of Engineering, Majmaah University Protocols OSI reference MODEL TCp /ip model Mohammed Saleem Bhat
OSI Model OSI MODEL. Communication Architecture Strategy for connecting host computers and other communicating equipment. Defines necessary elements for.
OSI Model OSI MODEL.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
March 14, 2011 Ion Stoica CS162 Operating Systems and Systems Programming Lecture 14 Protocols, Layering and e2e.
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
OSI Protocol Stack Given the post man exemple.
Layered Architectures
Lecturer, Department of Computer Application
DEPARTMENT OF COMPUTER SCIENCE
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
IP - The Internet Protocol
E2E Arguments & Project Suggestions (Lecture 4, cs262a)
OSI Model OSI MODEL.
IP - The Internet Protocol
IP - The Internet Protocol
Presentation transcript:

Introduction to Communication Networks – Dr. Michael Schapira Rothberg A413 Some of the slides were taken from Prof. Scott Shenker, UC Berkeley

2 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network

3 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Broadcast Communication Network

4 Information transmitted by any node is received by every other node in the network –Usually only in LANs (Local Area Networks) E.g., WiFi, Ethernet (classical, but not current) E.g., lecture! What problems does this raise? Problem #1: limited range Problem #2: coordinating access to the shared communication medium –Multiple Access Problem Problem #3: privacy of communication Broadcast Communication Networks

5 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Switched Communication Network Broadcast Communication Network

6 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Switched Communication Network Broadcast Communication Network Circuit-Switched Communication Network

7 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Switched Communication Network Broadcast Communication Network Circuit-Switched Communication Network Packet-Switched Communication Network (Datagram Network)

Packets / Datagrams Payload (Body) – Data being transferred Header – Instructions to the network for how to handle packet 8 Payload Header

9 Datagram Packet Switching Each packet is independently switched –Each packet header contains full destination address No resources are pre-allocated (reserved) in advance

Bursts Packets arrive at the nodes in different patterns: – Bursty/smooth sources – Multiplexing different flows creates bursts time

Buffers to mitigate bursts Due to bursts, sometime transient arrival rate is larger than transmission rate – Even if long-term arrival rate is smaller than transmission rate One possibility: drop packets Better approach: add buffers to save excess packets (until the bursts ends) – Even when buffers, sometimes packets are lost – Even with infinite buffers, sometimes packets are lost

Data Rate 1 Data Rate 2 Data Rate 3 Three Flows with Bursty Arrivals Time Capacity

Data Rate 1 Data Rate 2 Data Rate 3 When Each Flow Gets 1/3 rd of Capacity Time Frequent Overloading

When Flows Share Total Capacity Time No Overloading Statistical multiplexing relies on the assumption that not all flows burst at the same time. Very similar to insurance, and has same failure case

So, if you were building a network…. Which would you choose? – Circuit switched? – Packet-switched? Let’s review the strengths and weaknesses 15

16 Advantages of Circuit Switching Guaranteed bandwidth –Predictable communication performance –Not “best-effort” delivery with no real guarantees Simple abstraction –Reliable communication channel between hosts –No worries about lost or out-of-order packets Simple forwarding –Forwarding based on time slot or frequency –No need to inspect a packet header Low per-packet overhead –Forwarding based on time slot or frequency –No headers on each packet

17 Disadvantages of Circuit Switching Wasted bandwidth –Bursty traffic leads to idle connection during silent period –Unable to achieve gains from “statistical multiplexing” Blocked connections –Connection refused when resources are not sufficient –Unable to offer “okay” service to everybody Network state –Network nodes must store per-connection information –Unable to avoid per-connection storage and state –This makes failures more disruptive! Connection set-up delay –No communication until the connection is set up –Unable to avoid extra latency for small data transfers

Packet-Switching vs. Circuit-Switching Reliability advantage: since routers don’t know about individual conversations, when a router or link fails, it is easy to fail over to a different path Efficiency advantage of packet-switching over circuit switching: Exploitation of statistical multiplexing Deployability advantage: easier for different parties to link their networks together because they’re not promising to reserve resources for one another Disadvantage: packet-switching must handle congestion –More complex routers (more buffering, sophisticated dropping) –Harder to provide good network services (e.g., delay and bandwidth guarantees) 18

Internet Design Principles

The Networking Dilemma Many different networking technologies Many different network applications How do you prevent incompatibilities? 20

21 The Problem Re-implement every application for every technology? No! But how does the Internet design avoid this? Skype SSHNFS Radio Coaxial cable Fiber optic Application Transmission Media HTTP

22 Solution: Intermediate Layers Introduce intermediate layers that provide set of abstractions for various network functionality and technologies –A new app/media implemented only once –Variation on “add another level of indirection” Skype SSHNFS Packet radio Coaxial cable Fiber optic Application Transmission Media HTTP Intermediate layers

23 Computer System Modularity Partition system into modules & abstractions: Well-defined interfaces give flexibility –Hides implementation - can be freely changed, changes are limited in scope –Extend functionality of system by adding new modules –Allows for continuing evolution and innovation E.g., libraries encapsulating set of functionality E.g., programming language + compiler abstracts away how the particular CPU works …

Computer System Modularity Well-defined interfaces hide information –Isolate assumptions –Present high-level abstractions But can impair performance! Ease of implementation vs worse performance 24

25 Network System Modularity Like software modularity, but: Implementation distributed across many machines (routers and hosts) Must decide: –How to break system into modules Layering –Where modules are implemented End-to-End Principle –Where state is stored Fate-sharing We will address these choices in turn

Layering

Methodology Break job down into smaller tasks – And understand how they interact Define abstractions for these tasks Then implement them….. 27

Tasks in Networking What does it take to send packets across country? Simplistic decomposition: – Task 1: send along a single wire – Task 2: string these together to go across country What makes Task 2 nontrivial? – Routing! More detailed decomposition in next slide…. 28

Tasks in Networking (bottom up) Electrons on wire Bits on wire Packets on wire Deliver packets across local network – Local addresses Deliver packets across country – Global addresses Ensure that packets get there Do something with the data 29

How do we organize these tasks? Put them into “layers” Layering is a particularly strict form of modularity – Interactions limited to interfaces above and below To motivate layers, we go back to the beginning… 30

Question: Who invented layering? 31

Answer: Henry Ford Before: – Each person worked on the whole car After: – Each person only handled one particular task – Handed off car to next person in line Only needed to understand the state of the car as it arrived, and only needed to produce the appropriate output – Could remain ignorant of everything else! 32

Advantages of Assembly Line Specialization allows people to get faster – i.e., local improvements in implementation If you want to change something in the car, only one person needed to know. – i.e., changes of limited scope 33

More Layering in the Real World CEO A writes letter to CEO B – Folds letter and hands it to administrative aide Aide: – Puts letter in envelope with CEO B’s name – Takes to FedEx FedEx Office – Puts letter in larger envelope – Puts name and street address on FedEx envelope – Puts package on FedEx delivery truck FedEx delivers to other company 34 Dear Steve, We give up. Let’s merge. --Bill

CEO Aide FedEx CEO Aide FedEx LocationFedex Envelope (FE) The Path of the Letter 35 Letter Envelope Semantic Content Identity “Peers” on each side understand the same things No one else does Lowest level has most packaging

The Path Through FedEx 36 Truck Sorting Office Airport FE Sorting Office Airport Truck Sorting Office Airport Crate FE New Crate FE Higher “Stack” at Ends Partial “Stack” During Transit Deepest Packaging at the Lowest Level of Transport Highest Level of “Transit Stack” is Routing

How Does This Apply to Networking? Let’s return to task decomposition…. 37

Tasks in Networking Electrons on wire Bits on wire Packets on wire Deliver packets across local network – Local addresses Deliver packets across country – Global addresses Ensure that packets get there Do something with the data 38

Resulting Layers Electrons on wire (contained in next layer) Bits on wire (Physical) Packets on wire (contained in next layer) Deliver packets across local network (Link) – Local addresses Deliver packets across country (Internetwork) – Global addresses Ensure that packets get there (Transport) Do something with the data (Application) 39

Who Does What? Five layers –Lower three layers implemented everywhere –Top two layers implemented only at hosts –What is top layer of router doing? 40 Transport Network Datalink Physical Transport Network Datalink Physical Network Datalink Physical Application Host AHost BRouter

Logical Communication Layers interacts with peer’s corresponding layer 41 Transport Network Datalink Physical Transport Network Datalink Physical Network Datalink Physical Application Host AHost BRouter

Physical Communication Communication goes down to physical network Then from network peer to peer Then up to relevant layer 42 Transport Network Datalink Physical Transport Network Datalink Physical Network Datalink Physical Application Host AHost BRouter Protocol

What Is A Protocol? Protocol: an agreement on how to communicate –To exchange data –To coordinate sharing of resources Protocols specifies syntax and semantics Syntax: how protocol is structured –Format, order messages are sent and received Semantics: what these bits mean –How to respond to various messages, events, etc.

Examples of Protocols in Life Asking a question in class Turn-taking in conversations – Pause is a signal for the next person’s response – When do these rules break? Boarding and exiting an airplane – Not all countries have the same protocol! Answering the phone – Starting with hello as signal for other party to talk – Other party identifies themselves, then conversation 44

45 Example: HyperText Transfer Protocol GET /courses/archive/spring06/cos461/ HTTP/1.1 Host: User-Agent: Mozilla/4.03 CRLF HTTP/ OK Date: Mon, 6 Feb :09:03 GMT Server: Netscape-Enterprise/3.5.1 Last-Modified: Mon, 6 Feb :12:23 GMT Content-Length: 21 CRLF Site under construction Request Response

46 Example: IP Packet 4-bit Version 4-bit Header Length 8-bit Type of Service (TOS) 16-bit Total Length (Bytes) 16-bit Identification 3-bit Flags 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload 20-byteheader

47 Protocol Standardization All hosts must follow same protocol –Very small modifications can make a big difference –Or prevent it from working altogether This is why we have standards –Can have multiple implementations of protocol Internet Engineering Task Force –Based on working groups that focus on specific issues –Produces “Request For Comments” (RFCs) –IETF Web site is –RFCs archived at

IP Suite: End Hosts vs. Routers 48 HTTP TCP IP Ethernet interface HTTP TCP IP Ethernet interface IP Ethernet interface Ethernet interface SONET interface SONET interface host router HTTP message TCP segment IP packet

Layer Encapsulation 49 Trans: Connection ID Net: Source/DestLink: Src/Dest Appl: Get index.html User AUser B Common case: 20 bytes TCP header + 20 bytes IP header + 14 bytes Ethernet header = 54 bytes overhead

Characterizing the Layers (OSI) Service: what a layer does Service interface: how to access the service – Interface for layer above Protocol: how peers communicate – Protocol interface: set of rules and formats that govern the communication between network elements – Determines how the peers achieve the service – Does not govern implementation on a single machine, but how the layer is implemented between machines Examples: layer can have many implementations – This allows innovation! 50

Physical Layer (1) Service: move bits between two systems connected by a single physical link Interface: specifies how to send and receive bits –E.g., require quantities and timing Protocols: coding scheme used to represent bits, voltage levels, duration of a bit Examples: Optical, wireless, etc. 51 “Introduction to digital communications” – 67746

(Data) Link Layer (2) Service: Enable hosts to exchange messages – Using abstract (but local) addresses – Not just direct physical connections Interface: send messages (frames) to other end hosts; receive messages addressed to end host Protocols: – Routing – Media Access Control (MAC) Examples: – Ethernet, , Frame Relay, ATM 52 We will start discussing the basics later today

(Inter) Network Layer (3) Service: Deliver packets to specified destination – Using abstract global addresses – Inter-network = across multiple layer-2 networks – E.g., from Ethernet to to Frame Relay to ATM Interface: send packets to specified internetwork destinations; receive packets destined for end host Protocols: construct routing tables Examples: IP – Why no other examples? 53

Transport Layer (4) Service: Communication between processes – Demultiplexing of communication between hosts – Perhaps: reliable transport, rate adaptation Interface: – send message to specific process at given destination – local process receives messages sent to it Protocol: reliability, flow control, packetization of large messages, framing Examples: TCP and UDP – SCTP, T/TCP, DCCP, 54

Application Layer (7 - not 5!) Service: any service provided to the end user Interface: depends on the application Protocol: depends on the application Examples: Skype, SMTP ( ), HTTP (Web), Halo, BitTorrent … 55

The Internet Hourglass 56 Data Link Physical Applications The Hourglass Model Waist There is just one network-layer protocol, IP. The “narrow waist” facilitates interoperability. SMTPHTTPNTPDNS TCPUDP IP EthernetSONET Transport FiberCopperRadio

Implications of Hourglass Allows arbitrary L2 networks to interoperate – Any networks that support IP can exchange packets Allows applications to function on all networks – Applications that can run on IP can use any network Supports innovations above and below IP – Innovations can be independent, done in parallel But changing IP itself, i.e., IPv6, very hard 57

Back to Modularity Modularity in programming: – Set of abstractions Modularity in networking: – Distributed nature of system requires deciding where abstractions are implemented 58

Three Basic Architectural Decisions How to break system into modules Where modules are implemented Where state is stored 59

Breaking into Modules That is described by layering 60

Placing Network Functionality Hugely influential paper: “End-to-End Arguments in System Design” by Saltzer, Reed, and Clark (‘84) –End-to-end principle Basic observation: some types of network functionality can only be correctly implemented end-to-end Because of this, end hosts: –Can satisfy the requirement without network’s help –Must do so, since can’t rely on network’s help Thus, don’t need to implement them in network 61

Example: Reliable File Transfer Solution 1: make each step reliable, and string them together to make reliable end-to-end process Solution 2: allow steps to be unreliable, but do end-to-end check and try again if necessary 62 OS Appl. OS Appl. Host AHost B OK

Discussion Solution 1 cannot be made perfectly reliable – What happens if a network element misbehaves? – Receiver has to do the check anyway! Solution 2 can also fail, but only if the end system itself fails (i.e., doesn’t follow its own protocol) Solution 2 only relies on what it can control – The endpoint behavior Solution 1 requires endpoints trust other elements – That’s not what reliable means! 63

Robust (From Clark’s Paper) As long as the network is not partitioned, two endpoints should be able to communicate Failures (except network partition) should not interfere with endpoint semantics 64

Question? Should you ever implement reliability in network? Perhaps, if needed for reasonable efficiency – Don’t aim for perfect reliability, but ok to reduce error rate If individual links fail 10% of the time, and are traversing 10 links, then E2E error rate is 65% Implementing one retransmission on links – Link error rate reduced to 1%, E2E error rate is 9.5% 65

Back to the End-to-End Principle Implementing such functionality in the network: Doesn’t reduce host implementation complexity Does increase network complexity Probably imposes delay and overhead on all applications, even if they don’t need functionality However, implementing in network can enhance performance in some cases –E.g., very lossy link 66

Conservative Interpretation of E2E Don’t implement a function at the lower levels of the system unless it can be completely implemented at this level Unless you can relieve the burden from hosts, don’t bother 67

Radical Interpretation of E2E Don’t implement anything in the network that can be implemented correctly by the hosts –E.g., multicast Make network layer absolutely minimal –E2E principle trumps performance issues –Increases flexibility, since lower layers stay simple 68

Important life lessons (partial) Flexibility often more important than performance Architect for flexibility, engineer for performance 69

Moderate Interpretation Think twice before implementing functionality in the network If hosts can implement functionality correctly, implement it in a lower layer only as a performance enhancement But do so only if it does not impose burden on applications that do not require that functionality 70

What Does E2E Principle Ignore? There are other stakeholders besides users – ISP might care about the good operation of their network – Various commercial entities – Money-chain might require insertion into the network The need for middlebox functionality – Some functions that, for management reasons, are more easily done in the network. 71

Three Basic Architectural Decisions How to break system into modules Where modules are implemented Where state is stored 72

Fate-Sharing Note that E2E principles relied on “fate- sharing” – Invariants break only when endpoints themselves break – Minimize dependence on other network elements This should dictate placement of storage 73

General Principle: Fate-Sharing When storing state in a distributed system, co- locate it with entities that rely on that state Only way failure can cause loss of the critical state is if the entity that cares about it also fails... –… in which case it doesn’t matter Often argues for keeping network state at end hosts rather than inside routers –In keeping with End-to-End principle –E.g., packet-switching rather than circuit-switching –E.g., NFS file handles, HTTP “cookies” 74

Decisions and Their Principles How to break system into modules – Dictated by Layering Where modules are implemented – Dictated by End-to-End Principle Where state is stored – Dictated by Fate-Sharing 75

Reminder: Tasks in Networking (bottom up) Electrons on wire Bits on wire Packets on wire Deliver packets across local network – Local addresses Deliver packets across country – Global addresses Ensure that packets get there Do something with the data 76 Not in this course (mostly) The following few weeks The following few weeks Later in the course