TCP/IP.

Slides:



Advertisements
Similar presentations
Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain Chapter 2 TCP/IP Fundamentals.
Advertisements

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
Instructor: Sam Nanavaty TCP/IP protocol. Instructor: Sam Nanavaty Version – Allows for the evolution of the protocol IHL (Internet header length) – Length.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
Transport Layer 3-1 outline r TCP m segment structure m reliable data transfer m flow control m congestion control.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Transport Layer TCP and UDP IS250 Spring 2010
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
The Transport Layer.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
TCP/UDP/IP Courtesy of Kevin Fall at UC Berkeley & Raghupathy Sivakumar at GATECH.
Huda AL_Omairl - Network 71 Protocols and Network Software.
1 LAN Protocols (Week 3, Wednesday 9/10/2003) © Abdou Illia, Fall 2003.
10/13/20151 TCP/IP Transmission Control Protocol Internet Protocol.
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP/IP. TCP/IP Protocol Suite (1) Physical layer Data-link layer –PPP, ARP, RARP Network layer – IP, ICMP, IGMP, BootP Transport layer _ TCP, UDP, RTP.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Review the key networking concepts –TCP/IP reference model –Ethernet –Switched Ethernet –IP, ARP –TCP –DNS.
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.
Networking Basics CCNA 1 Chapter 11.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
Transport Protocols.
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
TCP/IP PROTOCOL UNIT 6. Overview of TCP/IP Application FTP, Telnet, SMTP, HTTP.. Presentation Session TransportHost-to-HostTCP, UDP NetworkInternetIP,
DCN286 Introduction to Data Communication Technology Session 11.
MAC, Scheduling, IP ….
Chapter 9: Transport Layer
(Kapitel 23: Congestion control and QoS översiktligt.)
Scheduling, IP ….
ECE4605: Advanced Internetworking
Introduction to TCP/IP networking
TCP Lecture 4.
Internet Protocol (IP) / Transmission Control Protocol (TCP)
Instructor Materials Chapter 9: Transport Layer
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
ECE4605: IP & TCP.
Introduction to Networks
Transmission Control Protocol (TCP)
ECE4605: Advanced Internetworking
Transmission Control Protocol (TCP)
Raghupathy Sivakumar ECE4605: Scheduling & IP Raghupathy Sivakumar
TCP.
ECE 6610: Wireless Networks
ECE 4607: Mobile & Wireless Networks
PART 5 Transport Layer Computer Networks.
TCP/IP Transmission Control Protocol / Internet Protocol
TCP.
TCP Transport layer Er. Vikram Dhiman LPU.
Magda El Zarki Professor, ICS UC, Irvine
Process-to-Process Delivery:
Chapter 17. Transport Protocols
PART V Transport Layer.
PART 5 Transport Layer.
CS4470 Computer Networking Protocols
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

TCP/IP

Recap Medium Access Control Scheduling ALOHA, slotted-ALOHA, CSMA, CSMA/CD Scheduling FIFO, Priority, GPS, WFQ, WRR, WRR+spread, DRR, CBQ

TCP/IP Protocol Suite Physical layer Data-link layer – ARP, RARP, SLIP Network layer – IP, ICMP, IGMP, BootP Transport layer _ TCP, UDP, RTP Application layer – http, smtp, ftp

Internet Protocol (IP) Addressing Routing Fragmentation and Reassembly Quality of Service Multiplexing and Demultiplexing

Addressing Need unique identifier for every host in the Internet (analogous to postal address) IP addresses are 32 bits long Hierarchical addressing scheme Conceptually … IPaddress =(NetworkAddress,HostAddress)

Address Classes Class A Class B Class C 0 netId hostId 7 bits 24 bits 1 0 netId hostId 14 bits 16 bits 1 1 0 netId hostId 21 bits 8 bits

IP Address Classes (contd.) Two more classes 1110 : multicast addressing 1111 : reserved Significance of address classes? Why this conceptual form?

Addresses and Hosts Since netId is encoded into IP address, each host will have a unique IP address for each of its network connections Hence, IP addresses refer to network connections and not hosts Why will hosts have multiple network connections?

Special Addresses hostId of 0 : network address hostId of all 1’s: directed broadcast All 1’s : limited broadcast netId of 0 : this network Loopback : 127.0.0.0 Dotted decimal notation: IP addresses are written as four decimal integers separated by decimal points, where each integer gives the value of one octet of the IP address.

Exceptions to Addressing Subnetting Splitting hostId into subnetId and hostId Achieved using subnet masks Useful for? Supernetting (Classless Inter-domain Routing or CIDR) Combining multiple lower class address ranges into one range Achieved using 32 bit masks and max prefix routing

Examples Subnetting Supernetting 192.168.1.0/24 – class C network 192.168.1.64/26 and 192.168.1.128/26 – 2 subnetworks with upto 62 stations each! Supernetting 192.168.2.0/24 and 192.168.3.0/24 – 2 class C networks 192.168.2.0/23 – 1 super network with upto 512 stations!!

Weaknesses Mobility Switching address classes Notion of host vs. IP address

IP Routing Direct Indirect If source and destination hosts are connected directly Still need to perform IP address to physical address translation. Why? Indirect Table driven routing Each entry: (NetId, RouterId) Default router Host-specific routes

IP Routing Algorithm RouteDatagram(Datagram, RoutingTable) Extract destination IP address, D, from the datagram and compute the netID N If N matches any directly connected network address deliver datagram to destination D over that network Else if the table contains a host-specific route for D, send datagram to next-hop specified in table Else if the table contains a route for network N send datagram to next-hop specified in table Else if the table contains a default route send datagram to the default router specified in table Else declare a routing error

Routing Protocols Interior Gateway Protocol (IGP) Within an autonomous domain RIP (distance vector protocol), OSPF (link state protocol) Exterior Gateway Protocol (EGP) Across autonomous domains BGP (border gateway protocol)

IP Fragmentation The physical network layers of different networks in the Internet might have different maximum transmission units The IP layer performs fragmentation when the next network has a smaller MTU than the current network MTU = 1500 MTU=500 IP fragmentation

IP Reassembly Fragmented packets need to be put together Where does reassembly occur? What are the trade-offs?

Multiplexing Web Email MP3 Web Email MP3 TCP UDP TCP UDP IP IP IP datagrams IP datagrams

IP Header Used for conveying information to peer IP layers Source Destn Application Application Transport Router Router Transport IP IP IP IP DataLink DataLink DataLink DataLink Physical Physical Physical Physical

IP Header (contd.) 4 bit version 4 bit hdr length 16 bit total length TOS 16 bit identification 3 bit flags 13 bit fragment offset 8 bit TTL 8 bit protocol 16 bit header checksum 32 bit source IP address 32 bit destination IP address Options (if any) (maximum 40 bytes) data

Transmission Control Protocol (TCP)

Transmission Control Protocol (TCP) End-to-end transport protocol Responsible for reliability, congestion control, flow control, and sequenced delivery Applications that use TCP: http (web), telnet, ftp (file transfer), smtp (email), chat Applications that don’t: multimedia (typically) – use UDP instead

Ports, End-points, & Connections IP Layer TCP UDP http ftp smtptelnet A1 A2 A3 Transport Port IP address Protocol ID Thus, an end-point is represented by (IP address,Port) Ports can be re-used between transport protocols A connection is (SRC IP address, SRC port, DST IP address, DST port) Same end-point can be used in multiple connections

TCP Connection Establishment Connection Maintenance Reliability Congestion control Flow control Sequencing Connection Termination

Active and Passive Open How do applications initiate a connection? One end (server) registers with the TCP layer instructing it to “accept” connections at a certain port The other end (client) initiates a “connect” request which is “accept”-ed by the server

Connection Establishment & Termination 3-way handshake used for connection establishment Randomly chosen sequence number is conveyed to the other end Similar FIN, FIN+ACK exchange used for connection termination Server does passive open Accept connection request Send acceptance Start connection Active open Send connection request SYN SYN+ACK ACK DATA

Reliability (Loss Recovery) Sequence Numbers TCP uses cumulative Acknowledgments (ACKs) Next expected in-sequence packet sequence number Pros and cons? Piggybacking ack data 5 1 2 3 4 3 1 2 4 Timeout calculation Rttavg = k*Rttavg + (1-k)*Rttsample RTO = Rttavg + 4*Rttdeviation

Fundamental Mechanism ack data data retx Simple stop and go protocol Timeout based reliability (loss recovery) ack data Multiple unacknowledged packets! Sliding Window Protocol: 1 2 3 4 5 6 7 8 9 10 11 12 ….

Congestion Control Slow Start Start with W=1 For every ACK, W=W+1 Congestion Avoidance (linear increase) For every ACK, W = W+1/W Congestion Control (multiplicative decrease) ssthresh = W/2 W = 1 Alternative: Fall to W/2 and start congestion avoidance directly

Why LIMD? (fairness) W=1 W=W/2 100 10 diff = 90 1 1 diff = 0 Problem? – inefficient W=W/2 50 5 diff = 45 51 6 diff = 45 52 7 diff = 45 .. 73 28 diff = 45 37.5 14 diff = 23.5 61.75 38.25 diff = 23.5 30.85 19.65 diff = 11.2

Flow Control Prevent sender from overwhelming the receiver Receiver in every ACK advertises the available buffer space at its end Window calculation MIN(congestion control window, flow control window)

Sequencing Byte sequence numbers TCP receiver buffers out of order segments and reassembles them later 3 1 2 4 1 given to app 2 given to app Loss 4 buffered (not given to app) 3 & 4 given to app 4 discarded Starting sequence number randomly chosen during connection establishment Why?

TCP Segment Format 16 bit SRC Port 16 bit DST Port 32 bit sequence number 32 bit ACK number HL resvd flags 16 bit window size Flags: URG, ACK, PSH, RST, SYN, FIN 16 bit TCP checksum 16 bit urgent pointer Options (if any) Data

TCP Flavors TCP-Tahoe TCP-Reno TCP-newReno TCP-Vegas, TCP-SACK W=1 adaptation on congestion TCP-Reno W=W/2 adaptation on fast retransmit, W=1 on timeout TCP-newReno TCP-Reno + intelligent fast recovery TCP-Vegas, TCP-SACK

TCP Tahoe Slow-start Congestion control upon time-out or DUP-ACKs When the sender receives 3 duplicate ACKs for the same sequence number, sender infers a loss Congestion window reduced to 1 and slow-start performed again Simple Congestion control too aggressive

TCP Reno Tahoe + Fast re-transmit Packet loss detected both through timeouts, and through DUP-ACKs Sender reduces window by half, the ssthresh is set to half of current window, and congestion avoidance is performed (window increases only by 1 every round-trip time) Fast recovery ensures that pipe does not become empty Window cut-down to 1 (and subsequent slow-start) performed only on time-out

TCP New-Reno TCP-Reno with more intelligence during fast recovery In TCP-Reno, the first partial ACK will bring the sender out of the fast recovery phase Results in timeouts when there are multiple losses In TCP New-Reno, partial ACK is taken as an indication of another lost packet (which is immediately retransmitted). Sender comes out of fast recovery only after all outstanding packets (at the time of first loss) are ACKed

TCP SACK TCP (Tahoe, Reno, and New-Reno) uses cumulative acknowledgements When there are multiple losses, TCP Reno and New-Reno can retransmit only one lost packet per round-trip time What about TCP-Tahoe? SACK enables receiver to give more information to sender about received packets allowing sender to recover from multiple-packet losses faster

TCP SACK (Example) Assume packets 5-25 are transmitted Let packets 5, 12, and 18 be lost Receiver sends back a CACK=5, and SACK=(6-11,13-17,19-25) Sender knows that packets 5, 12, and 18 are lost and retransmits them immediately

Other TCP flavors TCP Vegas TCP FACK Uses round-trip time as an early-congestion-feedback mechanism Reduces losses TCP FACK Intelligently uses TCP SACK information to optimize the fast recovery mechanism further

User Datagram Protocol (UDP) Simpler cousin of TCP No reliability, sequencing, congestion control, flow control, or connection management! Serves solely as a labeling mechanism for demultiplexing at the receiver end Use predominantly by protocols that do no require the strict service guarantees offered by TCP (e.g. real-time multimedia protocols) Additional intelligence built at the application layer if needed

UDP Header Src Port Dst Port Length: length of header + data (min = 8) Checksum

Puzzle Singly linked list Need to find if the list has a loop Constraint1: only read operations on the nodes of the linked-list Constraint2: constant order memory usage

Recap TCP Connection management Reliability Flow control Congestion control TCP flavors UDP