CSTP FS01CS423 (cotter)1 Protocols 2 References: RFC’s 791, 793, 768, 826.

Slides:



Advertisements
Similar presentations
Introduction to Sockets Jan Why do we need sockets? Provides an abstraction for interprocess communication.
Advertisements

Taekyung Kim 0x410 ~ 0x International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement on international.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
Transmission Control Protocol (TCP)
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
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.
EECC694 - Shaaban #1 lec #12 Spring Internet Transport Protocols Transmission Control Protocol (TCP):Transmission Control Protocol (TCP):
TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Client Design. Issues Server Identification Setting up a socket on client side TCP –Reading and writing with a socket –Closing a socket UDP –Reading and.
SOCKETS Lecture #3. The Socket Interface Funded by ARPA (Advanced Research Projects Agency) in Developed at UC Berkeley Objective: to transport.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
1 ELEN 602 Lecture 15 More on IP TCP. 2 byte stream Send buffer segments Receive buffer byte stream Application ACKs Transmitter Receiver TCP Streams.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
Transport Layer TCP and UDP IS250 Spring 2010
Gursharan Singh Tatla Transport Layer 16-May
Client Software Design Objectives: Understand principles of C/S design, with focus on clients Review Windows implementations of Socket functions.
Process-to-Process Delivery:
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
The Transport Layer.
1 Transport Layer Computer Networks. 2 Where are we?
TCP/IP Protocol Stack IP Device Drivers TCPUDP Application Sockets (Gate to network) TCP: –Establish connection –Maintain connection during the communication.
Socket Programming. Introduction Sockets are a protocol independent method of creating a connection between processes. Sockets can be either – Connection.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
 Socket  The combination of an IP address and a port number. (RFC 793 original TCP specification)  The name of the Berkeley-derived application programming.
The Application Layer Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery Service (IP) Unreliable.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
TCP Transport Control Protocol Information management 2 Groep T Leuven – Information department 2/35 Introduction UDP provides the connection.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
Section 5: The Transport Layer. 5.2 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Introduction In the previous section.
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.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Chapter 2 Applications and Layered Architectures Sockets.
Networking Tutorial Special Interest Group for Software Engineering Luke Rajlich.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
TELE202 Lecture 15 Socket programming 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (2) »Source: chapter 17 ¥This Lecture »Socket programming.
Sockets Socket = abstraction of the port concept: –Application programs request that the operating system create a socket when one is needed –O.S. returns.
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
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).
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
Ch 3. Transport Layer Myungchul Kim
Socket Programming(1/2). Outline  1. Introduction to Network Programming  2. Network Architecture – Client/Server Model  3. TCP Socket Programming.
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
5. End-to-end protocols (part 1)
Transport Layer.
CS 1652 Jack Lange University of Pittsburgh
Process-to-Process Delivery, TCP and UDP protocols
PART 5 Transport Layer Computer Networks.
Magda El Zarki Professor, ICS UC, Irvine
Introduction of Transport Protocols
CSCI-1680 Transport Layer I
Process-to-Process Delivery:
PART V Transport Layer.
Socket Programming(1/2)
Transport Protocols: TCP Segments, Flow control and Connection Setup
Chapter 5 Transport Layer Introduction
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

CSTP FS01CS423 (cotter)1 Protocols 2 References: RFC’s 791, 793, 768, 826

CSTP FS01CS423 (cotter)2 Lecture Outline TCP Header TCP Functions Introduction to Sockets

CSTP FS01CS423 (cotter)3 TCP Protocol Functions Connection Oriented Sequence Numbers Flow Control Reliable Data Transfer Congestion Control

CSTP FS01CS423 (cotter)4 TCP Header | Source Port | Destination Port | | Sequence Number | | Acknowledgment Number | | Data | |U|A|P|R|S|F| | | Offset| Reserved |R|C|S|S|Y|I| Window | | | |G|K|H|T|N|N| | | Checksum | Urgent Pointer | | Options | Padding | | data |

CSTP FS01CS423 (cotter)5 TCP - Connection control 2-way Handshake 3-way Handshake System ASystem B syn syn i syn j ack i+1 data i+1 ack j+1 data

CSTP FS01CS423 (cotter)6 Segment Sequence Numbers 32 bit field (2^32 numbers) suggest timer based initialization (4 microsec.) wrap-around at 4.55 hrs.

CSTP FS01CS423 (cotter)7 TCP Window Identify how much data a receiving site can hold (buffer size) in bytes. Example: –Window size is 4096 bytes –Assume packet size is 512 bytes (with 40 additional bytes for TCP and IP headers). –Initial sequence number is

CSTP FS01CS423 (cotter)8 TCP Window System ASystem B seq ack credit 4096 ack credit 4096 seq seq seq seq seq seq

CSTP FS01CS423 (cotter)9 TCP Window (recv failure) System ASystem B seq ack credit 4096 ack credit 4096 seq seq seq seq seq seq

CSTP FS01CS423 (cotter)10 TCP-Reliable Data Transfer Lost Packet Retransmission –Go-Back-N –Selective Repeat Round Trip Time Calculation –time from send to ack –RTT = X * old_RTT + (1 - X)*new_RTT –Karn’s Algorithm (don’t time retransmissions)

CSTP FS01CS423 (cotter)11 TCP - Flow Control Packets sent ack. window (8)

CSTP FS01CS423 (cotter)12 TCP - Congestion Control Window-size backoff –multiplicative decrease –additive increase

CSTP FS01CS423 (cotter)13 Sockets Introduction IP Addresses

CSTP FS01CS423 (cotter)14 Sockets Introduction Ports

CSTP FS01CS423 (cotter)15 Sockets Introduction Socket App 1 App 2App

CSTP FS01CS423 (cotter)16 Internet Ports 16 bit fields (64k ports possible) Duplicate sets for TCP and UDP Well-known Ports ( reserved) –ftp: 21telnet:23finger: 79 –time:37echo:7SNMP: 161 BSD usage conventions – Privileged Ports – General Applications (arbitrary ports) –5000 +Site Specific services

CSTP FS01CS423 (cotter)17 Basic Socket Functions Server Socket ( ) –Create a socket of a particular type Bind ( ) –Bind that socket to a specific port Listen ( ) –Wait for an incoming message Accept ( ) –Create a new socket and return new socket ID to server

CSTP FS01CS423 (cotter)18 Basic Socket Functions Server Read ( ) –Read an incoming message Write ( ) –Send a message to client Close ( ) –Close the socket

CSTP FS01CS423 (cotter)19 Basic Socket Functions Client Socket ( ) –Create a socket of a particular type Connect ( ) –Establish a connection to a remote Port/Socket Read ( ) / Write ( ) –Send and receive messages to/from remote socket Close ( ) –Close the socket

CSTP FS01CS423 (cotter)20 Socket Interaction Client Server Wait for connection requests and accept when one arives accept ( ) Create a Socket socket ( ) Bind address to socket bind ( ) Put socket in listen state listen ( ) Create a Socket socket ( ) Bind address to socket bind ( ) Make a connection request connect ( )

CSTP FS01CS423 (cotter)21 Additional Socket Functions Byte ordering functions –DEC / Intel vs Internet / Name resolution functions –host / protocol / service –by name / address / port Other Stuff

CSTP FS01CS423 (cotter)22 Information Byte Ordering Convert from host to network order htons ( )/* used to convert a short integer */ htonl ( )/* used to convert a long integer */ Convert from network to host order ntohs ( ) ntohl ( )

CSTP FS01CS423 (cotter)23 Host Name Lookup Convert Domain name to IP address hostent *hptr gethostbyname (char *newname) struct hostent { char *h_name; /* official host name */ char **h_aliases;/* other aliases */ int h_addrtype;/* address type */ int h_length;/* address length */ char**h_addr_list;/* list of addresses*/ }; #define h_addrh_addr_list[0]

CSTP FS01CS423 (cotter)24 Port Number Lookup Used for well-known services servent *sptr getservbyname(char *service) struct servent{ char *s_name;/* official service name */ char**s_aliases;/* other aliases */ int s_port;/* port for this service */ char *s_proto;/* protocol to use */ };

CSTP FS01CS423 (cotter)25 Protocol Number Lookup Used to convert protocol name to official number protoent *pptr getprotobyname ( char *protocol) structprotoent{ char *p_name;/* official protocol name */ char**p_aliases;/* list of aliases allowed */ short p_proto;/* official protocol number */ };

CSTP FS01CS423 (cotter)26 Socket Address Structure connect (sd, (struct sockaddr far *) &addr_Loc, sizeof(addr_Loc)); struct sockaddr_in { u_shortsin_family; /* address family */ u_shortsin_port;/* address port */ struct in_addrsin_addr;/* IP address (union) */ charsin_zero[8];/* filler */ };

CSTP FS01CS423 (cotter)27 Course Review: Evolution of C / S Architecture –how did we get to Client Server? Objectives of C/S Architecture –What problem is C/S trying to solve? C / S transport (specifically Internet model) –How do the lower protocol layers work? Socket Concepts –How do sockets (in general) work?

CSTP FS01CS423 (cotter)28 Next Step: Client/Server in Windows CSTP Windows Support Environment Windows Operating Environment Windows Programming Environment Sockets