SlideShare a Scribd company logo
1 of 6
Download to read offline
CS4254                                                                    Outline
 Computer Network Architecture and                                      •Transmission Control Protocol
          Programming

            Dr. Ayman A. Abdel-Hamid
               Computer Science Department
                          Virginia Tech

       Transmission Control Protocol (TCP)

 TCP               © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006   1    TCP                   © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006           2




                 Transport Layer 1/2                                                      Transport Layer 2/2




                                                                                        Process-to-process delivery
 TCP               © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006   3    TCP                   © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006           4




           Transport Layer Addressing                                                        Port Numbers
Addresses                                                            •Port numbers are 16-bit integers (0                     65,535)
   •Data link layer MAC address                                             Servers use well know ports, 0-1023 are privileged
   •Network layer IP address                                                Clients use ephemeral (short-lived) ports
   •Transport layer Port number (choose among multiple
   processes running on destination host)                            •Internet Assigned Numbers Authority (IANA) maintains a list of
                                                                     port number assignment
                                                                          Well-known ports (0-1023)                      controlled and assigned by
                                                                        IANA
                                                                          Registered ports (1024-49151) IANA registers and lists
                                                                        use of ports as a convenience (49151 is ¾ of 65536)
                                                                            Dynamic ports (49152-65535)                        ephemeral ports
                                                                       For well-known port numbers, see /etc/services on a UNIX or
                                                                     Linux machine
 TCP               © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006   5    TCP                   © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006           6
Socket Addressing                                                              Multiplexing and Demultiplexing
•Process-to-process delivery needs two identifiers                                            Multiplexing
      IP address and Port number                                                                Sender side may have
      Combination of IP address and port number is called a                                     several processes that
    socket address (a socket is a communication endpoint)                                       need to send packets
      Client socket address uniquely identifies client process                                  (albeit only 1 transport-
                                                                                                layer protocol)
      Server socket address uniquely identifies server process
                                                                                              Demultiplexing
•Transport-layer protocol needs a pair of socket addresses
                                                                                                At receiver side, after
      Client socket address                                                                     error checking and
      Server socket address                                                                     header dropping,
      For example, socket pair for a TCP connection is a 4-tuple                                transport-layer delivers
          Local IP address, local port, and                                                     each message to
          foreign IP address, foreign port                                                      appropriate process
   TCP                       © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006               7       TCP                    © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006    8




             Transmission Control Protocol 1/10                                                         Transmission Control Protocol 2/10
•TCP must perform typical transport layer functions:
                                                                                             •Reliable
     Segmentation breaks message into packets
     End-to-end error control since IP is an unreliable Service                                    requires ACK and performs retransmission
     End-to-end flow control to avoid buffer overflow                                              If ACK not received, retransmit and wait a longer time for
     Multiplexing and demultiplexing sessions                                                   ACK. After a number of retransmissions, will give up
•TCP is [originally described in RFC 793, 1981]                                                    How long to wait for ACK? (dynamically compute RTT for
     Reliable                                                                                   estimating how long to wait for ACKs, might be ms for LANs or
                                                                                                seconds for WANs)
     Connection-oriented virtual circuit
     Stream-oriented users exchange streams of data                                               RTT = α * old RTT + (1- α)* new RTT where α usually 90%
     Full duplex concurrent transfers can take place in both                                      Most common, Retransmission time = 2* RTT
   directions                                                                                     Acknowledgments can be “piggy-backed” on reverse direction
     Buffered TCP accepts data and transmits when appropriate                                   data packets or sent as separate packets
   (can be overridden with “push”)
   TCP                       © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006               9       TCP                    © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006   10




             Transmission Control Protocol 3/10                                                         Transmission Control Protocol 4/10
•Sequence Numbers                                                                            •Sending and Receiving buffers
         Associated with every byte that it sends                                                  Senders and receivers may not produce and consume data at
         To detect packet loss, reordering and duplicate removal                                 same speed
                                                                                                     2 buffers for each direction (sending and receiving buffer)
     Two fields are used sequence number and acknowledgment
   number. Both refer to byte number and not segment number
     Sequence number for each segment is the number of the first
   byte carried in that segment
     The ACK number denotes the number of the next byte that
   this party expects to receive (cumulative)
            If an ACK number is 5643               received all bytes from beginning up to
          5642
            This acknowledges all previous bytes as received error-free
   TCP                       © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006              11       TCP                    © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006   12
Transmission Control Protocol 5/10                                                                                             Transmission Control Protocol 6/10
                                                                                                                                 •Flow Control
 •TCP uses a sliding window mechanism for flow control
                                                                                                                                       Tell peer exactly how many bytes it is willing to accept
 •Sender maintains 3 pointers for each connection                                                                                    (advertised window sender can not overflow receiver buffer)
         Pointer to bytes sent and acknowledged                                                                                              Sender window includes bytes sent but not acknowledged
         Pointer to bytes sent, but not yet acknowledged                                                                                     Receiver window (number of empty locations in receiver buffer)
                                                                                                                                             Receiver advertises window size in ACKs
                   Sender window includes bytes sent but not acknowledged
                                                                                                                                          Sender window <= receiver window (flow control)
         Pointer to bytes that cannot yet be sent
                                                                                                                                            Sliding sender window (without a change in receiver’s advertised
                                                                                                                                           window)
                                                                                                                                              Expanding sender window (receiving process consumes data faster than
                                                                                                                                           it receives receiver window size increases)
                                                                                                                                             Shrinking sender window (receiving process consumes data more
                                                                                                                                           slowly than it receives receiver window size reduces)
                                                                                                                                             Closing sender window (receiver advertises a window of zero)
   TCP                                                              © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006             13      TCP                      © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006       14




              Transmission Control Protocol 7/10                                                                                             Transmission Control Protocol 8/10
                                                                                                                                 •Congestion Control
•Error Control
      Mechanisms for detecting corrupted segments, lost segments,                                                                     TCP assumes the cause of a lost segment is due to congestion
    out-of-order segments, and duplicated segments                                                                                  in the network
      Tools: checksum (corruption), ACK, and time-out (one time-                                                                       If the cause of the lost segment is congestion, retransmission of
    out counter per segment)                                                                                                        the segment does not remove the problem, it actually aggravates
          Lost segment or corrupted segment are the same situation:                                                                 it
        segment will be retransmitted after time-out (no NACK in
                                                                                                                                      The network needs to tell the sender to slow down (affects the
        TCP)
                                                                                                                                    sender window size in TCP)
          Duplicate segment (destination discards)
                                                                                                                                     Actual window size = Min (receiver window size, congestion
          Out-of-order segment (destination does not acknowledge,
                                                                                                                                    window size)
        until it receives all segments that precede it)
          Lost ACK (loss of an ACK is irrelevant, since ACK                                                                                 The congestion window is flow control imposed by the sender
        mechanism is cumulative)                                                                                                            The advertised window is flow control imposed by the receiver
   TCP                                                              © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006             15      TCP                      © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006       16




              Transmission Control Protocol 9/10                                                                                             Transmission Control Protocol 10/10
•Congestion Control
                                                                                                                                  •Full-Duplex
                                               44
                                                                                                                                           send and receive data in both directions.
            congestion window size in Kbytes




                                               40
                                               36                                                                                       Keep sequence numbers and window sizes for each direction
                                               32
                                               28
                                                                                                                                      of data flow
                                               24
                                                                                                                  Series1
                                               20
                                               16
                                               12
                                                8
                                                4
                                                0
                                                    0   2   4   6   8 10 12 14 16 18 20 22 24 26
                                                                    Transmission number


   TCP                                                              © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006             17      TCP                      © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006       18
TCP Connection Establishment                                                                             TCP Options
                                                                                           Each SYN can contain TCP options
                                                                                               •MSS Option
                                                                                                    maximum segment the maximum amount of data it is
                                                                           Passive open            willing to accept in each TCP segment
                                                                                                       Sending TCP uses receiver’s MSS as its MSS
                                                                                               •Window Scale Option
                                                                                                    maximum window is 65,535 bytes (corresponding field in
                                                                                                   TCP header occupies 16 bits)
                                                                                                    it can be scaled (left-shifted) by 0-14 bits providing a
                                                                                                   maximum of 65,535 * 214 bytes (one gigabyte)
                                                                                                       Option needed for high-speed connections or long delay paths
                       SYN: Synchronize
                                                                                                       In this case, the other side must send the option with its
                       ACK: Acknowledge
                                                                                                   SYN
    TCP                      © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006           19        TCP                     © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006   20




                       TCP MSS and output                                                                TCP Connection Termination
•TCP MSS is = (interface MTU – fixed sizes of IP and TCP headers (20 bytes))
     MSS on an Ethernet (IPv4)= 1460 bytes (1500 (why?) - 40)
•Successful return from write implies you can reuse application buffer




                                                                                                           •FIN: Finish
                                                                                                           •Step 1 can be sent with data
                                                                                                           •Steps 2 and 3 can be combined into 1 segment
    TCP                      © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006           21        TCP                     © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006   22




               State Transition Diagram 1/4                                                             State Transition Diagram 2/4




Typical TCP                                                                               Typical
states visited                                                                            TCP
by a TCP                                                                                  states
client                                                                                    visited by
                                                                                          a TCP
                                                                                          server



    TCP                      © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006           23        TCP                     © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006   24
State Transition Diagram 3/4                                                                      State Transition Diagram 4/4
      State                                         Description

CLOSED            There is no connection.
LISTEN            The server is waiting for calls from the client.
SYN-SENT          A connection request is sent; waiting for acknowledgment.
SYN-RCVD          A connection request is received.
ESTABLISHED Connection is established.
                  The application has requested the closing of the
FIN-WAIT-1
                  connection.
FIN-WAIT-2        The other side has accepted the closing of the connection.
TIME-WAIT         Waiting for retransmitted segments to die.
CLOSE-WAIT        The server is waiting for the application to close.
LAST-ACK          The server is waiting for the last acknowledgment.

              Can use netstat command to see some TCP states
TCP                      © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006                    25         TCP                        © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006        26




                     Packet Exchange                                                                                      TIME_WAIT State
                                                                                                •The end that performs the active close goes through this state
                                                                                                •Duration spent in this state is twice the maximum segment life (2
                                                                           Piggybacking
                                                                           feature              MSL)
                                                                                                     MSL: maximum amount of time any given IP can live in the network
                                                                                                •Every TCP implementation must choose a value for MSL
                                                                                                     Recommended value is 2 minutes (traditionally used 30 seconds)
                                                                                                •TIME_WAIT state motives
                                                                                                     allow old duplicate segments to expire in the network (relate to connection
                                                                                                   incarnation)
                                                                                                            TCP will not initiate a new incarnation of a connection that is in
                                                                                                          TIME_WAIT state
                                                                       Send 1-segment
                                                                       request and receive 1-        Implement TCP’s full-duplex connection termination reliably
                                                                       segment reply                       The end that performs the active close might have to resend the final
TCP                      © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006                    27         TCP
                                                                                                          ACK                © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006      28




                   TCP Segment Format                                                                                   TCP Header Fields 1/2
                                                                                                •Source Port and Destination Port
                                                                                                         Identify processes at ends of the connection
                                                                                                •Control bits
                                                                                                         URG urgent (urgent data present)
                                                                                                         ACK acknowledgment
                                                                                                         PSH push request
                                                                                                            Inform receiver TCP to send data to application ASAP
                                                                                                         RST reset the connection
                                                                                                         SYN synchronize sequence numbers
                                                                                                         FIN sender at end of byte stream

TCP                      © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006                    29         TCP                        © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006        30
TCP Header Fields 2/2
•Sequence Number: position of the data in the sender’s byte stream
•Acknowledgment Number: position of the byte that the source
expects to receive next (valid if ACK bit set)
•Header Length: header size in 32-bit units. Value ranges from [5-15]
•Window: advertised window size in bytes
•Urgent
         defines end of urgent data (or “out-of-band”) data and start of normal data
         Added to sequence number (valid only if URG bit is set)
•Checksum: 16-bit CRC (Cyclic Redundancy Check) over header
and data
•Options: up to 40 bytes of options
   TCP                         © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006      31

More Related Content

What's hot

Identifying PCIe 3.0 Dynamic Equalization Problems
Identifying PCIe 3.0 Dynamic Equalization ProblemsIdentifying PCIe 3.0 Dynamic Equalization Problems
Identifying PCIe 3.0 Dynamic Equalization Problemsteledynelecroy
 
ADS Workshop on PCI Express(r)
ADS Workshop on PCI Express(r)ADS Workshop on PCI Express(r)
ADS Workshop on PCI Express(r)Colin Warwick
 
Pre-Con Education: Recognizing Your Network's Key Performance Indicators Th...
Pre-Con Education: Recognizing Your Network's Key Performance Indicators Th...Pre-Con Education: Recognizing Your Network's Key Performance Indicators Th...
Pre-Con Education: Recognizing Your Network's Key Performance Indicators Th...CA Technologies
 
DIANA: Scenarios for QoS based integration of IP and ATM
DIANA: Scenarios for QoS based integration of IP and ATMDIANA: Scenarios for QoS based integration of IP and ATM
DIANA: Scenarios for QoS based integration of IP and ATMJohn Loughney
 
Pharo Networking by Example
Pharo Networking by ExamplePharo Networking by Example
Pharo Networking by ExampleNoury Bouraqadi
 
Waris l2vpn-tutorial
Waris l2vpn-tutorialWaris l2vpn-tutorial
Waris l2vpn-tutorialrakiva29
 
ARM LPC2300/LPC2400 TCP/IP Stack Porting
ARM LPC2300/LPC2400 TCP/IP Stack PortingARM LPC2300/LPC2400 TCP/IP Stack Porting
ARM LPC2300/LPC2400 TCP/IP Stack PortingMathivanan Elangovan
 
Fpga implementation of a multi channel hdlc
Fpga implementation of a multi channel hdlcFpga implementation of a multi channel hdlc
Fpga implementation of a multi channel hdlcnitin palan
 
Wpmc2004 phy protection
Wpmc2004 phy protectionWpmc2004 phy protection
Wpmc2004 phy protectionArpan Pal
 
GLBP (gateway load balancing protocol)
GLBP (gateway load balancing protocol)GLBP (gateway load balancing protocol)
GLBP (gateway load balancing protocol)Netwax Lab
 
Ix1000 Pro-MPEG/SMPTE 2022 FEC Inserter MPEG over IP
Ix1000 Pro-MPEG/SMPTE 2022 FEC Inserter MPEG over IPIx1000 Pro-MPEG/SMPTE 2022 FEC Inserter MPEG over IP
Ix1000 Pro-MPEG/SMPTE 2022 FEC Inserter MPEG over IPPath 1
 
Free to-air-digital-terrestrial-receiver-set-top-box-requirements-profile
Free to-air-digital-terrestrial-receiver-set-top-box-requirements-profileFree to-air-digital-terrestrial-receiver-set-top-box-requirements-profile
Free to-air-digital-terrestrial-receiver-set-top-box-requirements-profileDishHD Asia
 
CMAF Live Ingest Uplink Protocol
CMAF Live Ingest Uplink ProtocolCMAF Live Ingest Uplink Protocol
CMAF Live Ingest Uplink ProtocolRufael Mekuria
 
Linux Bridging: Teaching an old dog new tricks
Linux Bridging: Teaching an old dog new tricksLinux Bridging: Teaching an old dog new tricks
Linux Bridging: Teaching an old dog new tricksStephen Hemminger
 
Uip Sip Implementation Best Practices060409
Uip Sip Implementation Best Practices060409Uip Sip Implementation Best Practices060409
Uip Sip Implementation Best Practices060409Abdel-Fattah M. Hmoud
 

What's hot (20)

Identifying PCIe 3.0 Dynamic Equalization Problems
Identifying PCIe 3.0 Dynamic Equalization ProblemsIdentifying PCIe 3.0 Dynamic Equalization Problems
Identifying PCIe 3.0 Dynamic Equalization Problems
 
Client server
Client serverClient server
Client server
 
ADS Workshop on PCI Express(r)
ADS Workshop on PCI Express(r)ADS Workshop on PCI Express(r)
ADS Workshop on PCI Express(r)
 
Pre-Con Education: Recognizing Your Network's Key Performance Indicators Th...
Pre-Con Education: Recognizing Your Network's Key Performance Indicators Th...Pre-Con Education: Recognizing Your Network's Key Performance Indicators Th...
Pre-Con Education: Recognizing Your Network's Key Performance Indicators Th...
 
DIANA: Scenarios for QoS based integration of IP and ATM
DIANA: Scenarios for QoS based integration of IP and ATMDIANA: Scenarios for QoS based integration of IP and ATM
DIANA: Scenarios for QoS based integration of IP and ATM
 
0-RTT TCP converters
0-RTT TCP converters0-RTT TCP converters
0-RTT TCP converters
 
Pharo Networking by Example
Pharo Networking by ExamplePharo Networking by Example
Pharo Networking by Example
 
Waris l2vpn-tutorial
Waris l2vpn-tutorialWaris l2vpn-tutorial
Waris l2vpn-tutorial
 
ARM LPC2300/LPC2400 TCP/IP Stack Porting
ARM LPC2300/LPC2400 TCP/IP Stack PortingARM LPC2300/LPC2400 TCP/IP Stack Porting
ARM LPC2300/LPC2400 TCP/IP Stack Porting
 
Fpga implementation of a multi channel hdlc
Fpga implementation of a multi channel hdlcFpga implementation of a multi channel hdlc
Fpga implementation of a multi channel hdlc
 
RTP
RTPRTP
RTP
 
Wpmc2004 phy protection
Wpmc2004 phy protectionWpmc2004 phy protection
Wpmc2004 phy protection
 
GLBP (gateway load balancing protocol)
GLBP (gateway load balancing protocol)GLBP (gateway load balancing protocol)
GLBP (gateway load balancing protocol)
 
Ix1000 Pro-MPEG/SMPTE 2022 FEC Inserter MPEG over IP
Ix1000 Pro-MPEG/SMPTE 2022 FEC Inserter MPEG over IPIx1000 Pro-MPEG/SMPTE 2022 FEC Inserter MPEG over IP
Ix1000 Pro-MPEG/SMPTE 2022 FEC Inserter MPEG over IP
 
Ingest oct-9-update
Ingest oct-9-updateIngest oct-9-update
Ingest oct-9-update
 
Free to-air-digital-terrestrial-receiver-set-top-box-requirements-profile
Free to-air-digital-terrestrial-receiver-set-top-box-requirements-profileFree to-air-digital-terrestrial-receiver-set-top-box-requirements-profile
Free to-air-digital-terrestrial-receiver-set-top-box-requirements-profile
 
CMAF Live Ingest Uplink Protocol
CMAF Live Ingest Uplink ProtocolCMAF Live Ingest Uplink Protocol
CMAF Live Ingest Uplink Protocol
 
Voip basics
Voip basicsVoip basics
Voip basics
 
Linux Bridging: Teaching an old dog new tricks
Linux Bridging: Teaching an old dog new tricksLinux Bridging: Teaching an old dog new tricks
Linux Bridging: Teaching an old dog new tricks
 
Uip Sip Implementation Best Practices060409
Uip Sip Implementation Best Practices060409Uip Sip Implementation Best Practices060409
Uip Sip Implementation Best Practices060409
 

Viewers also liked

Viewers also liked (7)

How to prevent scratches on hardwood floors
How to prevent scratches on hardwood floorsHow to prevent scratches on hardwood floors
How to prevent scratches on hardwood floors
 
Chapter05_L14a_Input
Chapter05_L14a_InputChapter05_L14a_Input
Chapter05_L14a_Input
 
Mediacamp Kyiv 2009 Report
Mediacamp Kyiv 2009 ReportMediacamp Kyiv 2009 Report
Mediacamp Kyiv 2009 Report
 
Search
SearchSearch
Search
 
ASI Thesis Project
ASI Thesis ProjectASI Thesis Project
ASI Thesis Project
 
Smart board 480
Smart board 480Smart board 480
Smart board 480
 
Exercise1(database)
Exercise1(database)Exercise1(database)
Exercise1(database)
 

Similar to Tcp 6[1]

CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9Waqas Ahmed Nawaz
 
Socket网络编程
Socket网络编程Socket网络编程
Socket网络编程qhm123
 
COMPUTER NETWORKS NOTES Unit 4
COMPUTER NETWORKS NOTES  Unit 4 COMPUTER NETWORKS NOTES  Unit 4
COMPUTER NETWORKS NOTES Unit 4 sudhakce
 
Лекц 7
Лекц 7Лекц 7
Лекц 7Muuluu
 
Unit 4 - Transport Layer
Unit 4 - Transport LayerUnit 4 - Transport Layer
Unit 4 - Transport LayerKalpanaC14
 
topicCybersecurity_4
topicCybersecurity_4topicCybersecurity_4
topicCybersecurity_4Anne Starr
 
Transport protocols
Transport protocolsTransport protocols
Transport protocolsOnline
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Olivier Bonaventure
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsOlivier Bonaventure
 
It nv51 instructor_ppt_ch9
It nv51 instructor_ppt_ch9It nv51 instructor_ppt_ch9
It nv51 instructor_ppt_ch9newbie2019
 
CN_UNIT4.ppt ytutuim jykhjl fjghkhj gjjj
CN_UNIT4.ppt ytutuim jykhjl fjghkhj gjjjCN_UNIT4.ppt ytutuim jykhjl fjghkhj gjjj
CN_UNIT4.ppt ytutuim jykhjl fjghkhj gjjjPRADEEPERUKULLA2
 

Similar to Tcp 6[1] (20)

TCP/IP(networking)
TCP/IP(networking)TCP/IP(networking)
TCP/IP(networking)
 
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
 
Socket网络编程
Socket网络编程Socket网络编程
Socket网络编程
 
Transport layer
Transport layer Transport layer
Transport layer
 
Ch05
Ch05Ch05
Ch05
 
COMPUTER NETWORKS NOTES Unit 4
COMPUTER NETWORKS NOTES  Unit 4 COMPUTER NETWORKS NOTES  Unit 4
COMPUTER NETWORKS NOTES Unit 4
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Лекц 7
Лекц 7Лекц 7
Лекц 7
 
CN UNIT IV ..pptx
CN UNIT IV ..pptxCN UNIT IV ..pptx
CN UNIT IV ..pptx
 
Unit 4 - Transport Layer
Unit 4 - Transport LayerUnit 4 - Transport Layer
Unit 4 - Transport Layer
 
topicCybersecurity_4
topicCybersecurity_4topicCybersecurity_4
topicCybersecurity_4
 
Tcpip 1
Tcpip 1Tcpip 1
Tcpip 1
 
Transport protocols
Transport protocolsTransport protocols
Transport protocols
 
Tcp3 wayhandshakeprocess
Tcp3 wayhandshakeprocessTcp3 wayhandshakeprocess
Tcp3 wayhandshakeprocess
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6
 
Mod4
Mod4Mod4
Mod4
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
 
It nv51 instructor_ppt_ch9
It nv51 instructor_ppt_ch9It nv51 instructor_ppt_ch9
It nv51 instructor_ppt_ch9
 
CN_UNIT4.ppt ytutuim jykhjl fjghkhj gjjj
CN_UNIT4.ppt ytutuim jykhjl fjghkhj gjjjCN_UNIT4.ppt ytutuim jykhjl fjghkhj gjjj
CN_UNIT4.ppt ytutuim jykhjl fjghkhj gjjj
 
ADDRESSING PADA TCP IP
ADDRESSING PADA TCP IPADDRESSING PADA TCP IP
ADDRESSING PADA TCP IP
 

Recently uploaded

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 

Recently uploaded (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

Tcp 6[1]

  • 1. CS4254 Outline Computer Network Architecture and •Transmission Control Protocol Programming Dr. Ayman A. Abdel-Hamid Computer Science Department Virginia Tech Transmission Control Protocol (TCP) TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 1 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 2 Transport Layer 1/2 Transport Layer 2/2 Process-to-process delivery TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 3 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 4 Transport Layer Addressing Port Numbers Addresses •Port numbers are 16-bit integers (0 65,535) •Data link layer MAC address Servers use well know ports, 0-1023 are privileged •Network layer IP address Clients use ephemeral (short-lived) ports •Transport layer Port number (choose among multiple processes running on destination host) •Internet Assigned Numbers Authority (IANA) maintains a list of port number assignment Well-known ports (0-1023) controlled and assigned by IANA Registered ports (1024-49151) IANA registers and lists use of ports as a convenience (49151 is ¾ of 65536) Dynamic ports (49152-65535) ephemeral ports For well-known port numbers, see /etc/services on a UNIX or Linux machine TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 5 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 6
  • 2. Socket Addressing Multiplexing and Demultiplexing •Process-to-process delivery needs two identifiers Multiplexing IP address and Port number Sender side may have Combination of IP address and port number is called a several processes that socket address (a socket is a communication endpoint) need to send packets Client socket address uniquely identifies client process (albeit only 1 transport- layer protocol) Server socket address uniquely identifies server process Demultiplexing •Transport-layer protocol needs a pair of socket addresses At receiver side, after Client socket address error checking and Server socket address header dropping, For example, socket pair for a TCP connection is a 4-tuple transport-layer delivers Local IP address, local port, and each message to foreign IP address, foreign port appropriate process TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 7 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 8 Transmission Control Protocol 1/10 Transmission Control Protocol 2/10 •TCP must perform typical transport layer functions: •Reliable Segmentation breaks message into packets End-to-end error control since IP is an unreliable Service requires ACK and performs retransmission End-to-end flow control to avoid buffer overflow If ACK not received, retransmit and wait a longer time for Multiplexing and demultiplexing sessions ACK. After a number of retransmissions, will give up •TCP is [originally described in RFC 793, 1981] How long to wait for ACK? (dynamically compute RTT for Reliable estimating how long to wait for ACKs, might be ms for LANs or seconds for WANs) Connection-oriented virtual circuit Stream-oriented users exchange streams of data RTT = α * old RTT + (1- α)* new RTT where α usually 90% Full duplex concurrent transfers can take place in both Most common, Retransmission time = 2* RTT directions Acknowledgments can be “piggy-backed” on reverse direction Buffered TCP accepts data and transmits when appropriate data packets or sent as separate packets (can be overridden with “push”) TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 9 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 10 Transmission Control Protocol 3/10 Transmission Control Protocol 4/10 •Sequence Numbers •Sending and Receiving buffers Associated with every byte that it sends Senders and receivers may not produce and consume data at To detect packet loss, reordering and duplicate removal same speed 2 buffers for each direction (sending and receiving buffer) Two fields are used sequence number and acknowledgment number. Both refer to byte number and not segment number Sequence number for each segment is the number of the first byte carried in that segment The ACK number denotes the number of the next byte that this party expects to receive (cumulative) If an ACK number is 5643 received all bytes from beginning up to 5642 This acknowledges all previous bytes as received error-free TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 11 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 12
  • 3. Transmission Control Protocol 5/10 Transmission Control Protocol 6/10 •Flow Control •TCP uses a sliding window mechanism for flow control Tell peer exactly how many bytes it is willing to accept •Sender maintains 3 pointers for each connection (advertised window sender can not overflow receiver buffer) Pointer to bytes sent and acknowledged Sender window includes bytes sent but not acknowledged Pointer to bytes sent, but not yet acknowledged Receiver window (number of empty locations in receiver buffer) Receiver advertises window size in ACKs Sender window includes bytes sent but not acknowledged Sender window <= receiver window (flow control) Pointer to bytes that cannot yet be sent Sliding sender window (without a change in receiver’s advertised window) Expanding sender window (receiving process consumes data faster than it receives receiver window size increases) Shrinking sender window (receiving process consumes data more slowly than it receives receiver window size reduces) Closing sender window (receiver advertises a window of zero) TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 13 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 14 Transmission Control Protocol 7/10 Transmission Control Protocol 8/10 •Congestion Control •Error Control Mechanisms for detecting corrupted segments, lost segments, TCP assumes the cause of a lost segment is due to congestion out-of-order segments, and duplicated segments in the network Tools: checksum (corruption), ACK, and time-out (one time- If the cause of the lost segment is congestion, retransmission of out counter per segment) the segment does not remove the problem, it actually aggravates Lost segment or corrupted segment are the same situation: it segment will be retransmitted after time-out (no NACK in The network needs to tell the sender to slow down (affects the TCP) sender window size in TCP) Duplicate segment (destination discards) Actual window size = Min (receiver window size, congestion Out-of-order segment (destination does not acknowledge, window size) until it receives all segments that precede it) Lost ACK (loss of an ACK is irrelevant, since ACK The congestion window is flow control imposed by the sender mechanism is cumulative) The advertised window is flow control imposed by the receiver TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 15 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 16 Transmission Control Protocol 9/10 Transmission Control Protocol 10/10 •Congestion Control •Full-Duplex 44 send and receive data in both directions. congestion window size in Kbytes 40 36 Keep sequence numbers and window sizes for each direction 32 28 of data flow 24 Series1 20 16 12 8 4 0 0 2 4 6 8 10 12 14 16 18 20 22 24 26 Transmission number TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 17 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 18
  • 4. TCP Connection Establishment TCP Options Each SYN can contain TCP options •MSS Option maximum segment the maximum amount of data it is Passive open willing to accept in each TCP segment Sending TCP uses receiver’s MSS as its MSS •Window Scale Option maximum window is 65,535 bytes (corresponding field in TCP header occupies 16 bits) it can be scaled (left-shifted) by 0-14 bits providing a maximum of 65,535 * 214 bytes (one gigabyte) Option needed for high-speed connections or long delay paths SYN: Synchronize In this case, the other side must send the option with its ACK: Acknowledge SYN TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 19 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 20 TCP MSS and output TCP Connection Termination •TCP MSS is = (interface MTU – fixed sizes of IP and TCP headers (20 bytes)) MSS on an Ethernet (IPv4)= 1460 bytes (1500 (why?) - 40) •Successful return from write implies you can reuse application buffer •FIN: Finish •Step 1 can be sent with data •Steps 2 and 3 can be combined into 1 segment TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 21 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 22 State Transition Diagram 1/4 State Transition Diagram 2/4 Typical TCP Typical states visited TCP by a TCP states client visited by a TCP server TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 23 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 24
  • 5. State Transition Diagram 3/4 State Transition Diagram 4/4 State Description CLOSED There is no connection. LISTEN The server is waiting for calls from the client. SYN-SENT A connection request is sent; waiting for acknowledgment. SYN-RCVD A connection request is received. ESTABLISHED Connection is established. The application has requested the closing of the FIN-WAIT-1 connection. FIN-WAIT-2 The other side has accepted the closing of the connection. TIME-WAIT Waiting for retransmitted segments to die. CLOSE-WAIT The server is waiting for the application to close. LAST-ACK The server is waiting for the last acknowledgment. Can use netstat command to see some TCP states TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 25 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 26 Packet Exchange TIME_WAIT State •The end that performs the active close goes through this state •Duration spent in this state is twice the maximum segment life (2 Piggybacking feature MSL) MSL: maximum amount of time any given IP can live in the network •Every TCP implementation must choose a value for MSL Recommended value is 2 minutes (traditionally used 30 seconds) •TIME_WAIT state motives allow old duplicate segments to expire in the network (relate to connection incarnation) TCP will not initiate a new incarnation of a connection that is in TIME_WAIT state Send 1-segment request and receive 1- Implement TCP’s full-duplex connection termination reliably segment reply The end that performs the active close might have to resend the final TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 27 TCP ACK © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 28 TCP Segment Format TCP Header Fields 1/2 •Source Port and Destination Port Identify processes at ends of the connection •Control bits URG urgent (urgent data present) ACK acknowledgment PSH push request Inform receiver TCP to send data to application ASAP RST reset the connection SYN synchronize sequence numbers FIN sender at end of byte stream TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 29 TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 30
  • 6. TCP Header Fields 2/2 •Sequence Number: position of the data in the sender’s byte stream •Acknowledgment Number: position of the byte that the source expects to receive next (valid if ACK bit set) •Header Length: header size in 32-bit units. Value ranges from [5-15] •Window: advertised window size in bytes •Urgent defines end of urgent data (or “out-of-band”) data and start of normal data Added to sequence number (valid only if URG bit is set) •Checksum: 16-bit CRC (Cyclic Redundancy Check) over header and data •Options: up to 40 bytes of options TCP © Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 31