1Transport Layer...Transport Protocols and MPLS #9Chapter 8 & Section 10.52Transport Layer...Outline Goals: Understand principles behind transport layer services Multiplexing/demultiplexing (Ports/Sockets) Examples of Transport Protocols UDP TCP– reliable data transfer– flow control– congestion control Note there are other transport layer protocols MPLS (Section 10.5)3Transport Layer...Transport services and protocols Provide logical communicationbetween app processes running on different hosts Transport protocols run in end systems send side: breaks app messages into segments, passes to network layer rcv side: reassembles segments into messages, passes to app layer More than one transport protocol available to apps Internet: TCP, UDP and othersapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalModified from: Computer Networking: A Top Down Approach 4thedition. Jim Kurose, Keith RossAddison-Wesley, July 2007.4Transport Layer...How multiplexing works IP datagrams each datagram has source IP address, destination IP address each datagram carries 1 transport-layer segment each segment has source, destination port number host uses IP addresses & port numbers to direct segment to appropriate socketsource port # dest port #32 bitsapplicationdata (message)other header fieldsTCP/UDP segment formatFrom: Computer Networking: A Top Down Approach 4thedition. Jim Kurose, Keith RossAddison-Wesley, July 2007.5Transport Layer...Ports and Sockets Port address + IP address = socket address Ports are 16 bits Both sender and receive have socket addresses A connection is identified by a pair of sockets The port address is internal to the host (indicates application) A socket address is unique in the internet Once an application creates a socket and TCP connection then a write is used to send to the network and a read used to receive from the network. 6Transport Layer...Ports and Sockets Well Known Ports are those from 0 through 1023. The Registered Ports are those from 1024 through 49151 The Dynamic and/or Private Ports are those from 49152 through 65535 There are some common port numbers Example: – File data transfer (21)– TELNET (23)– Simple Mail Transfer Protocol (SMTP)(25)– Remote Procedure Call [RPC] (111)– Web servers listens on port 80 http://www.iana.org/assignments/port-numbers7Transport Layer...Transport Layer: UDP UDP Connectionless No congestion control No acknowledgments Packets may be– lost– delivered out of order to app No handshaking between UDP sender, receiver Each UDP segment handled independently of othersFrom: “Computer Networks, 3rd Edition, A.S. Tanenbaum. Prentice Hall, 19968Transport Layer...UDP Use Cases Streaming multimedia apps loss tolerant rate sensitive DNS Simple Network Management Protocol(SNMP) Reliable transfer over UDP: add reliability at application layer application-specific error recovery!Modified from: Computer Networking: A Top Down Approach 4thedition. Jim Kurose, Keith RossAddison-Wesley, July 2007.9Transport Layer...Transport Layer: TCP TCP provides for assured delivery of PDU’s TCP Services Connection oriented (end-to-end)– Need call processing– Information on the status of each connection is available Reliable data transfer– Uses acknowledgments – Uses sequence numbers10Transport Layer...TCP HeaderFrom: “Computer Networks, 3rd Edition, A.S. Tanenbaum. Prentice Hall, 199611Transport Layer...TCP Header Source/Destination identify local end points Window size used to dynamically control source rate into the network Checksum, checks the header and data12Transport Layer...TCP Stream-oriented TCP collect user bytes and forms segments to be passed on to the IP layer Sequence number based on byte counts Push Upper layer protocol send Push message to TCP to force it to send all the bytes collected in a segment Resequencing IP may deliver information out of order, TCP must put it back together13Transport Layer...TCP Inclusive Acknowledgment Acknowledgment number, acknowledges all received bytes prior to the one specified Flow control Window size is in bytes Transmit N-bytes and the must wait for acknowledgment Window size is dynamic, i.e., it changes based on “knowledge” of network congestion14Transport Layer...TCP Multiplexing Allows multiple sessions within one host to be transmitted over an IP path (ports/sockets) Full duplex Security and precedence Graceful close All traffic in flow is acknowledged before the session is ended.15Transport Layer...From: “Computer Networks, 3rd Edition, A.S. Tanenbaum. Prentice Hall, 1996TCP SessionProcessingTCP Connection Management: Finite State Machine16Transport Layer...Host A Host BFigure 8.22From: Communications Networks, Garcia and Widaja, McGraw Hill, 2000TCP Connection Setup: Three-way Handshake17Transport Layer...tcpdump http connection set up Output columns are Time SourceIP.SourcePort > DestIP.DestPort Flags ... 11:13:38.524046 x.x.x.x.3600 > 64.233.167.104.80: S 2021815674:2021815674(0) win 64240 <mss 1460,nop,nop,sackOK> (DF) First packet is from client host x.x.x.x. Client host is using 3600 as a source port. Destination host is 64.233.167.104 on port 80 (that’s Google's webserver). The packet with flag S is a TCP SYN packet, means in words "i'd like to open a TCP connection with you“ Client host will have a temporarily opened port (3600) in order to receive data back from the server. 11:13:38.558668 64.233.167.104.80 > x.x.x.x.3600: S 3132749891:3132749891(0) ack 2021815675 win 8190 <mss 1460> Second packet is sent from Google webserver. This packet comes from 64.233.167.104 source port 80, and contains SYN/ACK TCP flags sent to client port 3600, means "ok you may open a connection with me". 11:13:38.559105 x.x.x.x.3600 > 64.233.167.104.80: . ack 1 win 64240 (DF) Third packet is the client host sending a last ACK packet, which means "ok we are now connected". Source and dest ports must stay the same here.18Transport Layer...From: “Computer Networks, 3rd Edition, A.S. Tanenbaum. Prentice Hall, 1996TCP Window Management19Transport Layer...Silly Window Syndrome Situation: Transmitter sends large amount of data Receiver buffer depleted slowly, so buffer fills Every
View Full Document