Network Technologies (TCP/IP)

Slides:



Advertisements
Similar presentations
Switching Techniques In large networks there might be multiple paths linking sender and receiver. Information may be switched as it travels through various.
Advertisements

Jaringan Komputer Lanjut Packet Switching Network.
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
Answers of Exercise 7 1. Explain what are the connection-oriented communication and the connectionless communication. Give some examples for each of the.
International Standards Organization Open Systems Interconnect (OSI) Reference Model Advanced Computer Networks.
Lect-2: BasicsComputer Networks : An Introduction to Computer Networks Handout #2: Foundations and Basic Concepts Additional Reading Text book:
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
Professor Yashar Ganjali Department of Computer Science University of Toronto
10 - Network Layer. Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Performance Modeling Computer Science Division Department of Electrical Engineering and Computer.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 13 Introduction to Networks and the Internet.
1 An Introduction to Computer Networks Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof.
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.
COMPUTER NETWORKS.
CS144, Stanford University Error in Q3-7. CS144, Stanford University Using longest prefix matching, the IP address will match which entry? a /8.
Switching Techniques Student: Blidaru Catalina Elena.
Data Communications and Networking
Process-to-Process Delivery:
Courtesy: Nick McKeown, Stanford 1 TCP Congestion Control Tahir Azim.
Computer Networks & The Internet University of Management & Technology
The Network Layer. Network Projects Must utilize sockets programming –Client and Server –Any platform Please submit one page proposal Can work individually.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
Slides originally from Professor Williamson at U Calgary1-1 Introduction Part II  Network Core  Delay & Loss in Packet-switched Networks  Structure.
Chapter 2 – X.25, Frame Relay & ATM. Switched Network Stations are not connected together necessarily by a single link Stations are typically far apart.
Virtual Circuit Network. Network Layer 2 Network layer r transport segment from sending to receiving host r network layer protocols in every host, router.
Professor Ayse Karaman CSC 458/CSC 2209 – Computer NetworksUniversity of Toronto – Fall 2015 Today Outline What this course is.
Mukesh N. Tekwani Elphinstone College Mumbai
Presented By: Vasantha Lakshmi Gutha Graduate student (CS) Course: CENG 5931 University of Houston-Clear Lake Spring 2011.
Computer Networks Performance Metrics. Performance Metrics Outline Generic Performance Metrics Network performance Measures Components of Hop and End-to-End.
TELE202 Lecture 5 Packet switching in WAN 1 Lecturer Dr Z. Huang Overview ¥Last Lectures »C programming »Source: ¥This Lecture »Packet switching in Wide.
Sami Al-wakeel 1 Data Transmission and Computer Networks The Switching Networks.
Switching breaks up large collision domains into smaller ones Collision domain is a network segment with two or more devices sharing the same Introduction.
Basic Concepts CS 438: Spring 2014 Matthew Caesar
Computer Networks with Internet Technology William Stallings
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.
CS244A Midterm Review Ben Nham Some slides derived from: David Erickson (2007) Paul Tarjan (2007)
Winter 2008CS244a Handout 31 CS244a: An Introduction to Computer Networks Handout 3: Foundations and Basic Concepts Nick McKeown Professor of Electrical.
I NTRODUCTION TO C OMPUTER N ETWORKS By Dr. Nawaporn Wisitpongphan Presentation Slides Courtesy of: Prof Nick McKeown, Stanford University.
Packet switching network Data is divided into packets. Transfer of information as payload in data packets Packets undergo random delays & possible loss.
Networking Fundamentals. Basics Network – collection of nodes and links that cooperate for communication Nodes – computer systems –Internal (routers,
1 Physical and Data Link Layer Computer Network System Sirak Kaewjamnong.
Nick McKeown Spring 2012 Lecture 2,3 Output Queueing EE384x Packet Switch Architectures.
Lecture # 03 Switching Course Instructor: Engr. Sana Ziafat.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Protocols and Architecture Slide 1 Use of Standard Protocols.
048866: Packet Switch Architectures
WAN Transmission Media
THE NETWORKS Theo Chakkapark. Open System Interconnection  The tower of power!  The source of this power comes from the model’s flexibility.
CSE 413: Computer Network Circuit Switching and Packet Switching Networks Md. Kamrul Hasan
Delay in packet switched network. Circuit switching In Circuit switched networks the resources needed along a path (buffers and link transmission rate)
1 Switching and Forwarding Sections Connecting More Than Two Hosts Multi-access link: Ethernet, wireless –Single physical link, shared by multiple.
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 2: Foundation.
Building A Network: Cost Effective Resource Sharing
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Univ. of TehranComputer Network1 Computer Networks Computer Networks (Graduate level) University of Tehran Dept. of EE and Computer Engineering By: Dr.
Data Communication Networks Lec 13 and 14. Network Core- Packet Switching.
Lecture # 3: WAN Data Communication Network L.Rania Ahmed Tabeidi.
2003 컴퓨터 통신 1 Foundation # 컴퓨터 통신 2 Outline A Detailed FTP Example Layering Packet Switching and Circuit Switching Some terms –Data rate, “Bandwidth”
1. Layered Architecture of Communication Networks: Circuit Switching & Packet Switching.
Introduction1-1 Data Communications and Computer Networks Chapter 1 CS 3830 Lecture 3 Omar Meqdadi Department of Computer Science and Software Engineering.
: An Introduction to Computer Networks Handout #2: Foundations and Basic Concepts Additional Reading Text book: Chap. 3.1 Homepage
Chapter 5 Network and Transport Layers
Chapter 8 Switching Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Handout # 2: Course Logistics and Introduction
Process-to-Process Delivery:
Data Communication Networks
Building A Network: Cost Effective Resource Sharing
L9: Intro Network Systems
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

Network Technologies (TCP/IP) Foundations and Basic Concepts Tahir Azim courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Outline A Detailed FTP Example Layering Packet Switching and Circuit Switching Some terms Data rate, “Bandwidth” and “throughput” Propagation delay Packet, header, address Bandwidth-delay product, RTT Next class: Demo of Ethereal + other stuff… courtesy: Nick McKeown, Stanford University

Example: FTP over the Internet Using TCP/IP and Ethernet 1 2 3 4 6 7 20 19 18 17 5 9 10 8 12 13 11 15 16 14 App App “A” Stanford “B” (MIT) OS OS Ethernet Ethernet R5 R1 R2 R3 R4 courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University In the sending host Application-Programming Interface (API) Application requests TCP connection with “B” Transmission Control Protocol (TCP) Creates TCP “Connection setup” packet TCP requests IP packet to be sent to “B” TCP Packet TCP Data TCP Header Type = Connection Setup Empty courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University In the sending host (2) 3. Internet Protocol (IP) Creates IP packet with correct addresses. IP requests packet to be sent to router. TCP Packet TCP Data Header Encapsulation Destination Address: IP “B” Source Address: IP “A” Protocol = TCP IP Data IP Header IP Packet courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University In the sending host (3) 4. Link (“MAC” or Ethernet) Protocol Creates MAC frame with Frame Check Sequence (FCS). Wait for Access to the line. MAC requests PHY to send each bit of the frame. IP Packet IP Data Header Encapsulation Destination Address: MAC “R1” Source Address: MAC “A” Protocol = IP Ethernet FCS Ethernet Data Ethernet Header Ethernet Packet courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University In Router R1 5. Link (“MAC” or Ethernet) Protocol Accept MAC frame, check address and Frame Check Sequence (FCS). Pass data to IP Protocol. IP Packet IP Data Header Decapsulation Destination Address: MAC “R1” Source Address: MAC “A” Protocol = IP Ethernet FCS Ethernet Data Ethernet Header Ethernet Packet courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University In Router R1 6. Internet Protocol (IP) Use IP destination address to decide where to send packet next (“next-hop routing”). Request Link Protocol to transmit packet. Destination Address: IP “B” Source Address: IP “A” Protocol = TCP IP Data IP Header IP Packet courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University In Router R1 7. Link (“MAC” or Ethernet) Protocol Creates MAC frame with Frame Check Sequence (FCS). Wait for Access to the line. MAC requests Physical layer (PHY) to send each bit of the frame. IP Packet IP Data Header Encapsulation Destination Address: MAC “R2” Source Address: MAC “R1” Protocol = IP Ethernet FCS Ethernet Data Ethernet Header Ethernet Packet courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University In Router R5 16. Link (“MAC” or Ethernet) Protocol Creates MAC frame with Frame Check Sequence (FCS). Wait for Access to the line. MAC requests PHY to send each bit of the frame. IP Packet IP Data Header Encapsulation Destination Address: MAC “B” Source Address: MAC “R5” Protocol = IP Ethernet FCS Ethernet Data Ethernet Header Ethernet Packet courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University In the receiving host 17. Link (“MAC” or Ethernet) Protocol Accept MAC frame, check address and Frame Check Sequence (FCS). Pass data to IP Protocol. IP Packet IP Data Header Decapsulation Destination Address: MAC “B” Source Address: MAC “R5” Protocol = IP Ethernet FCS Ethernet Data Ethernet Header Ethernet Packet courtesy: Nick McKeown, Stanford University

In the receiving host (2) 18. Internet Protocol (IP) Verify IP address. Extract/decapsulate TCP packet from IP packet. Pass TCP packet to TCP Protocol. TCP Packet TCP Data Header Decapsulation Destination Address: IP “B” Source Address: IP “A” Protocol = TCP IP Data IP Header IP Packet courtesy: Nick McKeown, Stanford University

In the receiving host (3) 19. Transmission Control Protocol (TCP) Accepts TCP “Connection setup” packet Establishes connection by sending “Ack”. 20. Application-Programming Interface (API) Application receives request for TCP connection with “A”. TCP Packet TCP Data TCP Header Type = Connection Setup Empty courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Outline A Detailed FTP Example Layering Packet Switching and Circuit Switching Some terms Data rate, “Bandwidth” and “throughput” Propagation delay Packet, header, address Bandwidth-delay product, RTT courtesy: Nick McKeown, Stanford University

Layering: The OSI Model layer-to-layer communication Application Application 7 7 Presentation Presentation 6 6 Session Session 5 5 Peer-layer communication Transport Transport Router Router 4 4 Network Network Network Network 3 3 Link Link Link Link 2 2 Physical Physical Physical Physical 1 1 courtesy: Nick McKeown, Stanford University

Layering: Our FTP Example Application FTP ASCII/Binary IP TCP Ethernet Application Presentation Transport Session Transport Network Network Link Link Physical The 7-layer OSI Model The 4-layer Internet model courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Outline A Detailed FTP Example Layering Packet Switching and Circuit Switching Some terms Data rate, “Bandwidth” and “throughput” Propagation delay Packet, header, address Bandwidth-delay product, RTT courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Circuit Switching A B Source Destination It’s the method used by the telephone network. A call has three phases: Establish circuit from end-to-end (“dialing”), Communicate, Close circuit (“tear down”). Originally, a circuit was an end-to-end physical wire. Nowadays, a circuit is like a virtual private wire: each call has its own private, guaranteed data rate from end-to-end. courtesy: Nick McKeown, Stanford University

Circuit Switching Telephone Network Each phone call is allocated 64kb/s. So, a 2.5Gb/s trunk line can carry about 39,000 calls. Destination “Callee” Source “Caller” Central Office “C.O.” Central Office “C.O.” Trunk Exchange courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Packet Switching A B R2 Source Destination R1 R3 R4 It’s the method used by the Internet. Each packet is individually routed packet-by-packet, using the router’s local routing table. The routers maintain no per-flow state. Different packets may take different paths. Several packets may arrive for the same output link at the same time, therefore a packet switch has buffers. courtesy: Nick McKeown, Stanford University

Packet Switching Simple router model Link 1, ingress Link 1, egress “4” Choose Egress Link 2 Link 2, ingress Choose Egress Link 2, egress R1 “4” Link 1 Link 3 Link 3, ingress Choose Egress Link 3, egress Link 4 Link 4, ingress Choose Egress Link 4, egress courtesy: Nick McKeown, Stanford University

Statistical Multiplexing Basic idea One flow Two flows rate rate Average rate time Many flows time rate Network traffic is bursty. i.e. the rate changes frequently. Peaks from independent flows generally occur at different times. Conclusion: The more flows we have, the smoother the traffic. Average rates of: 1, 2, 10, 100, 1000 flows. time courtesy: Nick McKeown, Stanford University

Packet Switching Statistical Multiplexing Packets for one output Queue Length X(t) Dropped packets Dropped packets 1 Data Hdr R X(t) B 2 R Data Hdr Link rate, R R Packet buffer N Data Hdr Time Because the buffer absorbs temporary bursts, the egress link need not operate at rate N.R. But the buffer has finite size, B, so losses will occur. courtesy: Nick McKeown, Stanford University

Statistical Multiplexing Rate A C C A time B Rate Statistical multiplexing Important if traffic is bursty Less expensive Contention requires buffering Variable delay => no QoS guarantees C C B time courtesy: Nick McKeown, Stanford University

Statistical Multiplexing Gain A+B Rate 2C R < 2C A R B time Statistical multiplexing Important if traffic is bursty Less expensive Contention requires buffering Variable delay => no QoS guarantees Statistical multiplexing gain = 2C/R (C = max(A) = max(B)) courtesy: Nick McKeown, Stanford University

Why does the Internet use packet switching? Efficient use of expensive links: The links are assumed to be expensive and scarce. Packet switching allows many, bursty flows to share the same link efficiently. “Circuit switching is rarely used for data networks, ... because of very inefficient use of the links” - Gallager Resilience to failure of links & routers: ”For high reliability, ... [the Internet] was to be a datagram subnet, so if some lines and [routers] were destroyed, messages could be ... rerouted” - Tanenbaum Breaking message into packets allows parallel transmission across all links, reducing network latency. In summary the benefits that of packet switched networks can be summarized as follows: They use the bandwidth efficiently, meaning that a trunk link uses less resources than the sum of its tributaries, as they multiplex and conserve bandwidth They have little state in the intermediate nodes They are robust, some claim that they were designed to withstand a nuclear attack They do not have a central authority from whom we need permission to run experiments courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Some Definitions Packet length, P, is the length of a packet in bits. Link length, L, is the length of a link in meters. Data rate, R, is the rate at which bits can be sent, in bits/second, or b/s.1 Propagation delay, PROP, is the time for one bit to travel along a link of length, L. PROP = L/c. Transmission time, TRANSP, is the time to transmit a packet of length P. TRANSP = P/R. Latency is the time from when the first bit begins transmission, until the last bit has been received. On a link: Latency = PROP + TRANSP. 1. Note that a kilobit/second, kb/s, is 1000 bits/second, not 1024 bits/second. courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Announcements! The class group is now a Google group, tcpip-niit@googlegroups.com courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Packet Switching A B R2 Source Destination R1 R3 R4 Host A TRANSP1 “Store-and-Forward” at each Router TRANSP2 R1 PROP1 TRANSP3 R2 PROP2 TRANSP4 R3 PROP3 Host B PROP4 courtesy: Nick McKeown, Stanford University

Packet Switching Why not send the entire message in one packet? M/R M/R Host A Host A R1 R1 R2 R2 R3 R3 Host B Host B Breaking message into packets allows parallel transmission across all links, reducing end to end latency. It also prevents a link from being “hogged” for a long time by one message. courtesy: Nick McKeown, Stanford University

Packet Switching Queueing Delay Because the egress link is not necessarily free when a packet arrives, it may be queued in a buffer. If the network is busy, packets might have to wait a long time. Host A TRANSP1 Q2 TRANSP2 How can we determine the queueing delay? R1 PROP1 TRANSP3 R2 PROP2 TRANSP4 R3 PROP3 Host B PROP4 courtesy: Nick McKeown, Stanford University

Queues and Queueing Delay To understand the performance of a packet switched network, we can think of it as a series of queues interconnected by links. For given link rates and lengths, the only variable is the queueing delay. If we can understand the queueing delay, we can understand how the network performs. courtesy: Nick McKeown, Stanford University

Queues and Queueing Delay Cross traffic causes congestion and variable queueing delay. courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University A router queue Model of FIFO router queue A(t), l D(t) m Q(t) courtesy: Nick McKeown, Stanford University

A simple deterministic model Model of FIFO router queue A(t), l D(t) m Q(t) Properties of A(t), D(t): A(t), D(t) are non-decreasing A(t) >= D(t) courtesy: Nick McKeown, Stanford University

A simple deterministic model bytes or “fluid” Cumulative number of bits that arrived up until time t. A(t) A(t) Cumulative number of bits D(t) Q(t) m Service process m time D(t) Properties of A(t), D(t): A(t), D(t) are non-decreasing A(t) >= D(t) Cumulative number of departed bits up until time t. courtesy: Nick McKeown, Stanford University

Simple deterministic model Cumulative number of bits d(t) A(t) Q(t) D(t) time Queue occupancy: Q(t) = A(t) - D(t). Queueing delay, d(t), is the time spent in the queue by a bit that arrived at time t, and if the queue is served first-come-first-served (FCFS or FIFO) courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Example Cumulative number of bits Q(t) Example: Every second, a train of 100 bits arrive at rate 1000b/s. The maximum departure rate is 500b/s. What is the average queue occupancy? d(t) A(t) 100 D(t) time 0.1s 0.2s 1.0s courtesy: Nick McKeown, Stanford University

Queues with Random Arrival Processes Usually, arrival processes are complicated, so we often model them as random processes. The study of queues with random arrival processes is called Queueing Theory. Queues with random arrival processes have some interesting properties. We’ll consider some here. courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Properties of queues Time evolution of queues. Examples Burstiness increases delay Determinism minimizes delay Little’s Result. The M/M/1 queue. courtesy: Nick McKeown, Stanford University

Time evolution of a queue Packets Model of FIFO router queue A(t), l D(t) m Q(t) Packet Arrivals: time Departures: Q(t) courtesy: Nick McKeown, Stanford University

Burstiness increases delay Example 1: Periodic arrivals 1 packet arrives every 1 second 1 packet can depart every 1 second Depending on when we sample the queue, it will contain 0 or 1 packets. Example 2: N packets arrive together every N seconds (same rate) 1 packet departs every second Queue might contain 0,1, …, N packets. Both the average queue occupancy and the variance have increased. In general, burstiness increases queue occupancy (which increases queueing delay). courtesy: Nick McKeown, Stanford University

Determinism minimizes delay Example 3: Random arrivals Packets arrive randomly; on average, 1 packet arrives per second. Exactly 1 packet can depart every 1 second. Depending on when we sample the queue, it will contain 0, 1, 2, … packets depending on the distribution of the arrivals. In general, determinism minimizes delay. i.e. random arrival processes lead to larger delay than simple periodic arrival processes. courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University Little’s Result courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University The Poisson process courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University The Poisson process Why use the Poisson process? It is the continuous time equivalent of a series of coin tosses. The Poisson process is known to model well systems in which a large number of independent events are aggregated together. e.g. Arrival of new phone calls to a telephone switch Decay of nuclear particles “Shot noise” in an electrical circuit It makes the math easy. Be warned Network traffic is very bursty! Packet arrivals are not Poisson. But it models quite well the arrival of new flows. courtesy: Nick McKeown, Stanford University

courtesy: Nick McKeown, Stanford University An M/M/1 queue Model of FIFO router queue A(t), l D(t) m If A(t) is a Poisson process with rate l, and the time to serve each packet is exponentially distributed with rate m, then: courtesy: Nick McKeown, Stanford University