Você está na página 1de 21

1

Transport Layer Concepts

OSI and Protocol Stack


OSI Model
7th Application Layer 6th Presentation Layer 5th Session Layer 4th Transport Layer 3rd Network Layer 2nd Link Layer Transport Layer Network Layer Application Layer

TCP/IP Hierarchy

Protocols

Physical Layer

1st

Link Layer

Packet Encapsulation
The data is sent down the protocol stack Each layer adds to the data by adding headers

22Bytes 20Bytes 20Bytes

4Bytes

64 to 1500 Bytes

OSI Model Layers

Physical Layer : how the physical bits are sent, details all the electrical and physical specifications for devices Link Layer : set of rules that determine when a device can send data over a particular medium

Network Layer : handles the movement of packets, i.e. Logical addressing, Routing & Path Determination

Transport Layer : accepts the data from a session and formats the data into segments for transport across the network
Session Layer : establishes, manages and terminates communication sessions Presentation Layer : translates data formats, Encryption and compression are performed at this level. Application Layer : interfaces directly with the application programs running on the devices

Transport Layer

Transport Layer

UDP User Datagram Protocol

Simple Data Transmission Model , basically an application interface to IP. It adds no reliability, flow-control, or error recovery to IP. It simply serves as a mux/demux for sending and receiving datagrams NO handshake between the communicating hosts Datagrams can occasionally be dropped and subsequently not re-sent arrive at destination in the wrong order Arrive without integrity of data

ADVANTAGE : Fast (Ideal for real-time data transmission) DISADVANTAGE : Unreliable, no account for the data lost

UDP Header
32 Bit

Source Port : UDP port number of the process on the sending device Dest. Port : UDP port number of the process on the destination device Length : Size of Packet ( Header + Data ) UDP Checksum : Verifies integrity of UDP header only

UDP

Use : Two critical systems utilise the UDP transport protocol precisely due to it's speed : 1. Domain Name System (DNS) which uses UDP for simple requests and replies to resolve hostnames on the Internet. 2. Dynamic Host Configuration Protocol (DHCP) used to assign dynamic IP addresses to hosts

UDP is used for applications like Voice over IP and Online gaming where not always 100% of the data is required to function

TCP Transmission Control Protocol

10

Provides a reliable, ordered delivery of data packets from one application on one system to another application on another system Detects errors, initiates retransmissions, and controls the flow of information Protocol Steps: 1. Set up connection 2. Transfer data 3. Close connection ADVANTAGE : flow control and error correction DISADVANTAGE : Low speed

TCP Header
0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 3 0 3 1
Source Port Sequence Number Acknowledgement Number Destination Port

11

Data Offset

Window
Urgent Pointer Options (0 to 10 Words of 32 Bits) TCP Payload

Checksum

Acknowledgement Number is the sequence number that the receiver expects to receive next Offset is the number of 32-bit words in the TCP header Flags : Urgent (URG), Acknowledgement (ACK), Push (PSH), Reset connection (RST), Synchronous (SYN), Finish (FIN), Congestion Window Reduced (CWD) and ECN-Echo (ECE) Checksum is used to verify the integrity of the TCP header and data Urgent Pointer is used when urgent data is being sent

TCP

12

Uses :

1. Used by Domain Name System (DNS) for larger messages, especially zone transfers as reliability of the data is much more important in these cases 2. Used by Border Gateway Protocol (BGP) to maintain the table of IP networks 3. Ideal for Emails and FTP

Session Comparison

13

TCP : Connection

14

Client Send SYN seq=x

Host

Client Send FIN seq=x

Host

Receive SYN +ACK segment Send ACK y+1

Receive SYN segment Send SYN seq=y, ACK x+1

Receive ACK segment Receive FIN + ACK segment Send ACK y+1

Receive FIN segment Send ACK x+1 Send FIN seq=y, ACK x+1 Receive ACK segment

Receive ACK segment

Establishing a TCP Connection

Closing a TCP Connection

TCP : Data transfer


Client Send Packet 1 Start Timer ACK would normally Arrive at this time Time Expires Packet Lost Host

15

Timer

Packet should arrive ACK should be sent

Timer

Retransmit Packet1 Start Timer Receive ACK 1 Cancel Timer

Receive Packet 1 Send AXK 1

Comparison:
Transport Control Protocol User Datagram Protocol Addresses several endpoints inside an IP device with different Port Numbers connection-oriented connectionless
sequence numbers count bytes of the data stream -order and completeness of packets guaranteed -retransmission of missing data flow-control implementation using window sizes to prevent overflow of receiver TCP UDP

16

purpose classification

implementation

no sequence numbers -order and completeness of packets is not guaranteed -no retransmission possible no flow-control implementation

overhead
applications

20 bytes File-Transfer (ftp) Web-surfing (http) e-Mail (SMTP, pop3)

8 bytes
Network Management (SNMP) Network Time Protocol (NTP) Routing (RIP, OSPF)

SCTP

17

In order to address the limitations of TCP and UDP the Signaling Transport (SIGTRAN) working group in the IETF developed SCTP

Places messages and control information into separate chunks


Chunk Data or Control - each identified by a chunk header

Multi-Streaming : Refers to the capability of SCTP to transmit several independent streams of chunks in parallel Eg : transmitting web page images together with the web page text Features : Improved error detection Validation and acknowledgment mechanisms protect against flooding attacks and provide notification of duplicated or missing data chunks Path selection and monitoring select a primary data transmission path and test the connectivity of the transmission path.

SCTP Header
Consists of two basic sections: 1. The common header, which occupies the first 12 bytes and is highlighted in blue 2. The data chunks, which occupy the remaining portion of the packet. Each chunk has a type identifier that is one byte long yielding, at most, 255 different chunk types

18

Bits

0 7

2431

+0 32 64

Source port Verification tag Checksum

Destination port

96

Chunk 1 type

Chunk 1 length

128

Chunk 1 data

Chunk N type

Chunk N length

Chunk N data

Mapping Layer 4 to Applications

19

Questionnaire:

20

In the OSI model, as a data packet moves from the lower to the upper layers, headers are Added Removed Re-arranged modified In the OSI model, what is the main function of the transport layer? node-to-node delivery process-to-process message delivery Synchronization process-to-process message delivery _______ is a process-to-process protocol that adds only port addresses, checksum error control, and length information to the data from the upper layer. TCP UDP IP None of the above Packets in the IP layer are called _________ . segments Datagrams Frames None of the above

21

Thank You

Você também pode gostar