Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Network Fundamentals
Abdelkhalik Elsaid Mosa
abdu.elsaid@yahoo.com
http://abdelkhalik.staff.scuegypt.edu.eg/
Last Update: 10/7/2011
“In God we trust,
all others bring data”
- W. Edwards Deming
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Introduction
• Layer 4, responsible for the overall end-to-end transfer of
application data.
• Transport layer also encompasses these functions:
1. Enables multiple applications to communicate over the
network at the same time on a single device.
2. Ensures that, if required, all the
data is received reliably and
in order by the correct
application.
3. Employs error
handling mechanisms.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Applications Requirements Vary
• Because different applications have different
requirements, there are multiple Transport layer protocols.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Data Encapsulation
Transport
Data Link
Physical
Network
Data
Header Data
Presentation
Application
Session
Segment-Datagram
Packet
Bits
Frame
Header Segment / Datagram
Header Packet Trailer
1000000111111000001110000
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
TCP and UDP
• UDP
 is a simple, low overhead, connectionless protocol, RFC 768
 Pieces of communication in UDP are called datagrams.
 Datagrams are sent as "best effort“ “Unreliable”.
 Applications that use UDP include:
 DNS,DHCP,SNMP,RIP, TFTP, Online games, Video Streaming, and VoIP.
• TCP
 is a connection-oriented, RFC 793, additional overhead
 Reliable delivery.
 Flow control which prevents overflow
 Applications that use TCP are:
 Web Browsers, E-mail, File Transfers.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Transport Layer Header
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
TCP Header Fields
• Source port : a random value above 1023.
• Destination port: Identifies the destination protocol or application.
• Sequence number: the first byte in the current segment.
Is the SYN flag set or not??
• Acknowledgement number: specifies the next expected byte by
the receiver.
• Window size: determines how many bytes can be sent before
waiting for acknowledgement.
• H.length (Offset): the length of the segment header in bytes.
• Checksum: used for error checking.
• Reserved: Reserved for future use and should be set to zero.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Port Addressing
• Port Number (L4 Addressing): Uniquely identifies applications.
 Server processes have static port numbers assigned to them.
 Clients dynamically choose a port number for each conversation.
• Socket: is the combination of the port number and the IP
address, Ex: 198.16.23.213:80.
• Socket Pair: consists of the source and destination IP addresses
and port numbers, is also unique and identifies the conversation
between the two hosts.
• IANA is responsible for assigning various addressing standards.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Types of port numbers
1. Well Known Ports (0 to 1023): are reserved for services and
applications such as HTTP (80), SMTP (25), DNS (53), ... .
2. Registered Ports (1024 to 49151): are assigned to user
processes or applications such as MSN Messenger (1863).
3. Dynamic or Private ‘Ephemeral’ Ports (49152 to 65535):
assigned dynamically to client applications when initiating a
connection.
Well Known UDP Ports
69 - TFTP
520 - RIP
Well Known TCP/UDP Ports
53 - DNS
161 - SNMP
Well Known TCP Ports
Telnet: 23, SMTP:25, HTTP:
80, POP3: 110, HTTPS:443
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Identifying Applications and hosts
• Netstat: examines the open connections on a host
192.168.1.101
172.16.5.5
Destination Port
80
80
Source Port
49890
49888
198.133.219.25
49888
www.cisco.com
66.13.29.25
80
Source Port
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Transport Layer Functions
• TCP/UDP Functions.
1.Segmentation and Reassembly.
2.Conversation Multiplexing using port numbers.
3.Error detection.
• TCP Additional functions
1.Connection Establishment (3-way handshake)
2.Connection Management.
 Reliability (acknowledgements).
 Flow control (Buffering, congestion avoidance, windowing).
 Error correction .
3. Connection Termination (4-way handshake)
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
At the source: Segmentation
• divides application data into blocks of data that are of
appropriate size
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
At the Destination: TCP in order Reassembly
• The Transport layer reassembles the data before sending it to the
destination application or service.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
At the Destination: UDP Out of order Reassembly
• The Transport layer reassembles the data before sending it to the
destination application or service.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Conversation Multiplexing
• Multiple Applications can use the network at the same time
where each application is identified by unique port number.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
TCP Connection Establishment (3-way handshake)
• When two hosts communicate using TCP, a connection
(Three-way handshake) is established before data can be
exchanged.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Connection Management - Reliability
• At the Transport layer the three basic operations of reliability are:
1. Tracking transmitted data: keep track of all the data pieces of
each conversation.
2. Acknowledging received data: The destination sends
acknowledgements to the source for the segments that it
receives.
3. Retransmitting any unacknowledged data: Retransmit any of
data that were not acknowledged by the destination.
If the source does not receive an acknowledgement within a predetermined
amount of time, it retransmits that data to the destination.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Connection Management - Flow Control
• Flow Control: the management of data flow between devices in
the network.
 is a method of making sure that an excessive amount of data
doesn't overrun the end station.
 Example: imagine that PC A is running at 100 Mbps and PC B is running at
10 Mbps. If PC A sends something to PC B at full speed, 90 percent of the
information will be lost because PC B cannot accept the information at 100
Mbps. This is the reason for flow control.
• Flow control Methods:
1. Buffering
2. Congestion Avoidance
3. Windowing
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Flow Control - Buffering & Congestion Avoidance
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Flow Control - Windowing
• Window Size: The amount of data that a source can transmit
before an acknowledgement must be received
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Flow Control - Windowing
• Flow control assists the reliability of TCP transmission by adjusting
the effective rate of data flow between the two services in the
session.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Flow Control – Reducing the window size
• If a receiving host has congestion, it may respond to the sending
host with a segment with a reduced window size.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
TCP Connection Termination (4-way Handshake)
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Network Fundamentals: Ch4 - Transport Layer

  • 1.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Network Fundamentals Abdelkhalik Elsaid Mosa abdu.elsaid@yahoo.com http://abdelkhalik.staff.scuegypt.edu.eg/ Last Update: 10/7/2011 “In God we trust, all others bring data” - W. Edwards Deming
  • 2.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Introduction • Layer 4, responsible for the overall end-to-end transfer of application data. • Transport layer also encompasses these functions: 1. Enables multiple applications to communicate over the network at the same time on a single device. 2. Ensures that, if required, all the data is received reliably and in order by the correct application. 3. Employs error handling mechanisms.
  • 3.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Applications Requirements Vary • Because different applications have different requirements, there are multiple Transport layer protocols.
  • 4.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Data Encapsulation Transport Data Link Physical Network Data Header Data Presentation Application Session Segment-Datagram Packet Bits Frame Header Segment / Datagram Header Packet Trailer 1000000111111000001110000
  • 5.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy TCP and UDP • UDP  is a simple, low overhead, connectionless protocol, RFC 768  Pieces of communication in UDP are called datagrams.  Datagrams are sent as "best effort“ “Unreliable”.  Applications that use UDP include:  DNS,DHCP,SNMP,RIP, TFTP, Online games, Video Streaming, and VoIP. • TCP  is a connection-oriented, RFC 793, additional overhead  Reliable delivery.  Flow control which prevents overflow  Applications that use TCP are:  Web Browsers, E-mail, File Transfers.
  • 6.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Transport Layer Header
  • 7.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy TCP Header Fields • Source port : a random value above 1023. • Destination port: Identifies the destination protocol or application. • Sequence number: the first byte in the current segment. Is the SYN flag set or not?? • Acknowledgement number: specifies the next expected byte by the receiver. • Window size: determines how many bytes can be sent before waiting for acknowledgement. • H.length (Offset): the length of the segment header in bytes. • Checksum: used for error checking. • Reserved: Reserved for future use and should be set to zero.
  • 8.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Port Addressing • Port Number (L4 Addressing): Uniquely identifies applications.  Server processes have static port numbers assigned to them.  Clients dynamically choose a port number for each conversation. • Socket: is the combination of the port number and the IP address, Ex: 198.16.23.213:80. • Socket Pair: consists of the source and destination IP addresses and port numbers, is also unique and identifies the conversation between the two hosts. • IANA is responsible for assigning various addressing standards.
  • 9.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Types of port numbers 1. Well Known Ports (0 to 1023): are reserved for services and applications such as HTTP (80), SMTP (25), DNS (53), ... . 2. Registered Ports (1024 to 49151): are assigned to user processes or applications such as MSN Messenger (1863). 3. Dynamic or Private ‘Ephemeral’ Ports (49152 to 65535): assigned dynamically to client applications when initiating a connection. Well Known UDP Ports 69 - TFTP 520 - RIP Well Known TCP/UDP Ports 53 - DNS 161 - SNMP Well Known TCP Ports Telnet: 23, SMTP:25, HTTP: 80, POP3: 110, HTTPS:443
  • 10.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Identifying Applications and hosts • Netstat: examines the open connections on a host 192.168.1.101 172.16.5.5 Destination Port 80 80 Source Port 49890 49888 198.133.219.25 49888 www.cisco.com 66.13.29.25 80 Source Port
  • 11.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Transport Layer Functions • TCP/UDP Functions. 1.Segmentation and Reassembly. 2.Conversation Multiplexing using port numbers. 3.Error detection. • TCP Additional functions 1.Connection Establishment (3-way handshake) 2.Connection Management.  Reliability (acknowledgements).  Flow control (Buffering, congestion avoidance, windowing).  Error correction . 3. Connection Termination (4-way handshake)
  • 12.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy At the source: Segmentation • divides application data into blocks of data that are of appropriate size
  • 13.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy At the Destination: TCP in order Reassembly • The Transport layer reassembles the data before sending it to the destination application or service.
  • 14.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy At the Destination: UDP Out of order Reassembly • The Transport layer reassembles the data before sending it to the destination application or service.
  • 15.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Conversation Multiplexing • Multiple Applications can use the network at the same time where each application is identified by unique port number.
  • 16.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy TCP Connection Establishment (3-way handshake) • When two hosts communicate using TCP, a connection (Three-way handshake) is established before data can be exchanged.
  • 17.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Connection Management - Reliability • At the Transport layer the three basic operations of reliability are: 1. Tracking transmitted data: keep track of all the data pieces of each conversation. 2. Acknowledging received data: The destination sends acknowledgements to the source for the segments that it receives. 3. Retransmitting any unacknowledged data: Retransmit any of data that were not acknowledged by the destination. If the source does not receive an acknowledgement within a predetermined amount of time, it retransmits that data to the destination.
  • 18.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Connection Management - Flow Control • Flow Control: the management of data flow between devices in the network.  is a method of making sure that an excessive amount of data doesn't overrun the end station.  Example: imagine that PC A is running at 100 Mbps and PC B is running at 10 Mbps. If PC A sends something to PC B at full speed, 90 percent of the information will be lost because PC B cannot accept the information at 100 Mbps. This is the reason for flow control. • Flow control Methods: 1. Buffering 2. Congestion Avoidance 3. Windowing
  • 19.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Flow Control - Buffering & Congestion Avoidance
  • 20.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Flow Control - Windowing • Window Size: The amount of data that a source can transmit before an acknowledgement must be received
  • 21.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Flow Control - Windowing • Flow control assists the reliability of TCP transmission by adjusting the effective rate of data flow between the two services in the session.
  • 22.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy Flow Control – Reducing the window size • If a receiving host has congestion, it may respond to the sending host with a segment with a reduced window size.
  • 23.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy TCP Connection Termination (4-way Handshake)
  • 24.
    Suez Canal University– Faculty of Computers & Informatics - Cisco Local Academy