SlideShare ist ein Scribd-Unternehmen logo
1 von 20
DATA COMMUNICATION AND NETWORKING
DAWOOD FAHEEM ABBASI
BSCS-IV-05
DATED: JUNE,08 2016
UNIVERSITY OF AZAD JAMMU & KASHMIR
MUZAFFARABAD
WORKING OF TCP/IP AND UDP PROTOCOLS
TCP/IP & UDP
PROTOCOLS
INTRODUCTION
TCP/IP and the OSI Model Comparison
THE TCP/IP AND OSI MODEL
• TCP/IP PROTOCOL SUITE
Host-to-Host Layer Protocols
Transmission Control Protocol (TCP)
• TCP SEGMENT FORMAT
User Datagram Protocol (UDP)
• UDP SEGMENT FORMAT
Which One Should You Use?
CONTENT LIST
• The TCP/IP suite was created by the U.S. Department of Defense
• To ensure that communications could survive any conditions and that
data integrity wouldn't be compromised under malicious attacks.
• The Open Systems Interconnection Basic Reference Model (OSI
Model) is an abstract description for network protocol design,
developed as an effort to standardize networking.
Introduction
• Let's Start by Comparing TCP/IP and the OSI Models.
• The TCP/IP model is basically a shorter version of the OSI
model.
• It consists of four instead of seven layers.
• Despite their architectural differences, both models have
interchangeable transport and network layers and their
operation is based upon packet-switched technology.
TCP/IP and the OSI Model Comparison
THE TCP/IP AND OSI MODEL
Application Layer:
• Deals with representation,
• Encoding
• Dialog control issues.
Host-to-Host:
• Its equivalent Transport protocol in the OSI model.
• Its responsibilities include application data segmentation,
• Transmission reliability, flow and error control.
Internet:
• Their purpose is to route packets to their destination independent of the path
taken.
Network Access:
• The network access layer deals with all the physical issues concerning
• Data termination on network media.
• It includes all the concepts of the data link and physical layers of the OSI
model for both LAN and WAN media.
TCP/IP PROTOCOL SUITE
Two protocols:
1. Transmission Control Protocol (TCP) and
2. User Datagram Protocol (UDP)
•
Host-to-Host Layer Protocols
• TCP is connection-oriented in the sense that prior to transmission end points
need to establish a connection first.
• TCP protocol data units are called segments.
• The sending and receiving TCP entities exchange data in the form of segments,
which consist of a fixed 20-byte(160 bits) header followed by a variable size
data field.
• TCP is responsible for breaking down a stream of bytes into segments and
reconnecting them at the other end,
• Retransmitting whatever might be lost and also organizing the segments in the
correct order.
• The segment size is restricted by the maximum transfer unit (MTU) of the
underlying link layer technology (MTU is generally 1500 bytes which is the
maximum payload size of the Ethernet).
Transmission Control Protocol (TCP)
TCP SEGMENT FORMAT
Source Port & Destination Port:
• Fields together identify the two local end points of the particular connection.
• A port plus its hosts' IP address forms a unique end point.
• Ports are used to communicate with the upper layer and distinguish different application sessions on the host.
Sequence Number & Acknowledgment Number
• Fields specify bytes in the byte stream.
• The sequence number is used for segment differentiation
• Useful for reordering or retransmitting lost segments.
• The Acknowledgment number is set to the next segment expected.
Data offset or TCP header length
• Indicates how many 4-byte words are contained in the TCP header.
Window field
• Indicates how many bytes can be transmitted before an acknowledgment is received.
The Checksum
• Field is used to provide extra reliability and security to the TCP segment.
The actual user data
• are included after the end of the header.
• UDP protocol consists of fewer fields compared to TCP.
• The reason for that is because certain data types do not require reliable
delivery and extra overhead.
• Real-time traffic for example, needs to be transported in an efficient way
without error correction and retransmission mechanisms.
• UDP is considered to be a connectionless protocol.
• It leaves reliability to be handled by the application layer.
• All it cares about is fast transmission.
• The UDP segment format is presented in the next slide.
User Datagram Protocol (UDP)
UDP SEGMENT FORMAT
• The IP routing processes for all nodes involved in the delivery of
an IP packet include the sending host, the intermediate routers,
and the destination host.
END TO END DELIVERY
• When a host sends a packet, the packet is transmitted from an upper layer protocol
(TCP, UDP, or ICMP) to IP, and then IP on the sending host does the following:
• Sets the Time-to-Live (TTL) value to either a default or application-specified value.
• Checks its routing table for the best route to the destination IP address.
If no route is found, IP sends a routing error message to the upper layer protocol
(TCP, UDP, or ICMP).
• Determines the next-hop IP address and the interface, based on the most specific
matching route.
• Sends the packet, the next-hop IP address, and the next-hop interface to Address
Resolution Protocol (ARP), and then ARP resolves the next-hop IP address to its
media access control (MAC) address and forwards the packet.
IP on the Sending Host
When a packet is received at a router, the packet is passed to IP, and IP on the router does the following:
• Verifies the IP header checksum.
If the IP header checksum fails, the IP packet is discarded without notification to the user. This is known as a silent discard.
• Verifies whether the destination IP address in the IP packet corresponds to an IP address assigned to a router interface.
If so, the router processes the IP packet as the destination host If the destination IP address is not the router, IP decrements the
Time-to-Live (TTL).
If the TTL is 0, the router discards the packet and sends an ICMP Time Expired–TTL Expired in Transit message to the sender.
• If the TTL is 1 or greater, IP updates the TTL field and calculates a new IP header checksum.
• IP checks its routing table for the best route to the destination IP address in the IP packet.
If no route is found, the router discards the packet and sends an ICMP Destination Unreachable–Host Unreachable message to
the sender.
• Based on the best route found, IP determines the next-hop IP address and interface.
• IP sends the packet, the next-hop IP address, and the interface to ARP, and then ARP forwards the packet to the appropriate
MAC address.
• This entire process is repeated at each router in the path between the source and destination host.
IP on the Router
When a packet is received at the destination host, it is passed up to IP, and IP on the destination host does
the following:
• Verifies the IP header checksum.
If the IP header checksum fails, the IP packet is silently discarded.
• Verifies that the destination IP address in the IP packet corresponds to an IP address assigned to the
host.
If the destination IP address is not assigned to the host, the IP packet is silently discarded.
• Passes the IP packet without the IP header to the appropriate upper-level protocol, based on the IP
protocol field.
If the protocol does not exist, ICMP sends a Destination Unreachable–Protocol Unreachable message
back to the sender.
• For TCP and UDP packets, IP checks the destination port and processes the TCP segment or UDP
header.
If no application exists for the UDP port number, ICMP sends a Destination Unreachable–Port
Unreachable message back to the sender. If no application exists for the TCP port number, TCP sends a
Connection Reset segment back to the sender.
IP on the Destination Host
Which One Should You Use?
TAKE A SMILE, THEY ARE FREE
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udp
rahul kundu
 

Was ist angesagt? (20)

Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udp
 
TCP and UDP
TCP and UDP TCP and UDP
TCP and UDP
 
Transport layer
Transport layer Transport layer
Transport layer
 
TCP/IP Introduction
TCP/IP IntroductionTCP/IP Introduction
TCP/IP Introduction
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Internet protocol
Internet protocol Internet protocol
Internet protocol
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
RPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy NetworksRPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy Networks
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
Tcp/ip model
Tcp/ip  modelTcp/ip  model
Tcp/ip model
 
What Is User Datagram Protocol?
What Is User Datagram Protocol?What Is User Datagram Protocol?
What Is User Datagram Protocol?
 
Tcp and udp
Tcp and udpTcp and udp
Tcp and udp
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
Snmp
SnmpSnmp
Snmp
 
Tcp/ip
Tcp/ipTcp/ip
Tcp/ip
 
Chapter 3 : User Datagram Protocol (UDP)
Chapter 3 : User Datagram Protocol (UDP)Chapter 3 : User Datagram Protocol (UDP)
Chapter 3 : User Datagram Protocol (UDP)
 
TCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionTCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer Description
 
Ports and protocols
Ports and protocolsPorts and protocols
Ports and protocols
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 

Andere mochten auch

TCP/IP Model
TCP/IP ModelTCP/IP Model
TCP/IP Model
farhan516
 
Osi model vs TCP/IP
Osi model vs TCP/IPOsi model vs TCP/IP
Osi model vs TCP/IP
Mannu Khani
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network ppt
extraganesh
 

Andere mochten auch (15)

Network Sockets
Network SocketsNetwork Sockets
Network Sockets
 
Ppt of socket
Ppt of socketPpt of socket
Ppt of socket
 
Ports & sockets
Ports  & sockets Ports  & sockets
Ports & sockets
 
Computer Ports
Computer PortsComputer Ports
Computer Ports
 
Ports and connectors
Ports and connectorsPorts and connectors
Ports and connectors
 
TCP/IP(networking)
TCP/IP(networking)TCP/IP(networking)
TCP/IP(networking)
 
TCP/IP Model
TCP/IP ModelTCP/IP Model
TCP/IP Model
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
TCP/IP – Transmission Control Protocol/ Internet Protocol
TCP/IP – Transmission Control Protocol/ Internet ProtocolTCP/IP – Transmission Control Protocol/ Internet Protocol
TCP/IP – Transmission Control Protocol/ Internet Protocol
 
Osi model vs TCP/IP
Osi model vs TCP/IPOsi model vs TCP/IP
Osi model vs TCP/IP
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network ppt
 
Internet protocol (ip) ppt
Internet protocol (ip) pptInternet protocol (ip) ppt
Internet protocol (ip) ppt
 
TCP Model
TCP ModelTCP Model
TCP Model
 
OSI Model
OSI ModelOSI Model
OSI Model
 

Ähnlich wie TCP/IP and UDP protocols

Ähnlich wie TCP/IP and UDP protocols (20)

TCPIP SLIDES.ppt
TCPIP SLIDES.pptTCPIP SLIDES.ppt
TCPIP SLIDES.ppt
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
Internet Protocol.pdf
Internet Protocol.pdfInternet Protocol.pdf
Internet Protocol.pdf
 
TCP /IP
TCP /IPTCP /IP
TCP /IP
 
presentation on TCP/IP protocols data comunications
presentation on TCP/IP protocols data comunicationspresentation on TCP/IP protocols data comunications
presentation on TCP/IP protocols data comunications
 
TRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptxTRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptx
 
Protocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol SuiteProtocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol Suite
 
Unit 4-Transport Layer Protocols-3.pptx
Unit 4-Transport Layer Protocols-3.pptxUnit 4-Transport Layer Protocols-3.pptx
Unit 4-Transport Layer Protocols-3.pptx
 
Unit 4-Transport Layer Protocols.pptx
Unit 4-Transport Layer Protocols.pptxUnit 4-Transport Layer Protocols.pptx
Unit 4-Transport Layer Protocols.pptx
 
Ip and icmp
Ip and icmpIp and icmp
Ip and icmp
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
ADDRESSING PADA TCP IP
ADDRESSING PADA TCP IPADDRESSING PADA TCP IP
ADDRESSING PADA TCP IP
 
1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptx1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptx
 
Tcp presentation
Tcp presentationTcp presentation
Tcp presentation
 
TCP/IP Protocols
TCP/IP ProtocolsTCP/IP Protocols
TCP/IP Protocols
 
Internet Protocols
Internet ProtocolsInternet Protocols
Internet Protocols
 
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & AnomaliesREMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
 
Internet Protocol Version 4
Internet Protocol Version 4Internet Protocol Version 4
Internet Protocol Version 4
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
QSpiders - Upper layer-protocols
QSpiders - Upper layer-protocolsQSpiders - Upper layer-protocols
QSpiders - Upper layer-protocols
 

Mehr von Dawood Faheem Abbasi

Mehr von Dawood Faheem Abbasi (11)

First and follow set
First and follow setFirst and follow set
First and follow set
 
Report writing
Report writingReport writing
Report writing
 
UML constructs
UML constructs UML constructs
UML constructs
 
Mathematical induction and divisibility rules
Mathematical induction and divisibility rulesMathematical induction and divisibility rules
Mathematical induction and divisibility rules
 
Hashing
HashingHashing
Hashing
 
Features of-RC-quad-copter
Features of-RC-quad-copter Features of-RC-quad-copter
Features of-RC-quad-copter
 
7 cs of communication
7 cs of communication7 cs of communication
7 cs of communication
 
Geography of pakistan
Geography of pakistanGeography of pakistan
Geography of pakistan
 
FET (Field Effect Transistors)
FET (Field Effect Transistors)FET (Field Effect Transistors)
FET (Field Effect Transistors)
 
Cyber crime.pptx
Cyber crime.pptxCyber crime.pptx
Cyber crime.pptx
 
BJT’s (bipolar junction transistor)
BJT’s (bipolar junction transistor)BJT’s (bipolar junction transistor)
BJT’s (bipolar junction transistor)
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

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
 
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Ữ Â...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
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
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
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
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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_...
 

TCP/IP and UDP protocols

  • 1. DATA COMMUNICATION AND NETWORKING DAWOOD FAHEEM ABBASI BSCS-IV-05 DATED: JUNE,08 2016 UNIVERSITY OF AZAD JAMMU & KASHMIR MUZAFFARABAD
  • 2. WORKING OF TCP/IP AND UDP PROTOCOLS TCP/IP & UDP PROTOCOLS
  • 3. INTRODUCTION TCP/IP and the OSI Model Comparison THE TCP/IP AND OSI MODEL • TCP/IP PROTOCOL SUITE Host-to-Host Layer Protocols Transmission Control Protocol (TCP) • TCP SEGMENT FORMAT User Datagram Protocol (UDP) • UDP SEGMENT FORMAT Which One Should You Use? CONTENT LIST
  • 4. • The TCP/IP suite was created by the U.S. Department of Defense • To ensure that communications could survive any conditions and that data integrity wouldn't be compromised under malicious attacks. • The Open Systems Interconnection Basic Reference Model (OSI Model) is an abstract description for network protocol design, developed as an effort to standardize networking. Introduction
  • 5. • Let's Start by Comparing TCP/IP and the OSI Models. • The TCP/IP model is basically a shorter version of the OSI model. • It consists of four instead of seven layers. • Despite their architectural differences, both models have interchangeable transport and network layers and their operation is based upon packet-switched technology. TCP/IP and the OSI Model Comparison
  • 6. THE TCP/IP AND OSI MODEL
  • 7. Application Layer: • Deals with representation, • Encoding • Dialog control issues. Host-to-Host: • Its equivalent Transport protocol in the OSI model. • Its responsibilities include application data segmentation, • Transmission reliability, flow and error control. Internet: • Their purpose is to route packets to their destination independent of the path taken. Network Access: • The network access layer deals with all the physical issues concerning • Data termination on network media. • It includes all the concepts of the data link and physical layers of the OSI model for both LAN and WAN media.
  • 9. Two protocols: 1. Transmission Control Protocol (TCP) and 2. User Datagram Protocol (UDP) • Host-to-Host Layer Protocols
  • 10. • TCP is connection-oriented in the sense that prior to transmission end points need to establish a connection first. • TCP protocol data units are called segments. • The sending and receiving TCP entities exchange data in the form of segments, which consist of a fixed 20-byte(160 bits) header followed by a variable size data field. • TCP is responsible for breaking down a stream of bytes into segments and reconnecting them at the other end, • Retransmitting whatever might be lost and also organizing the segments in the correct order. • The segment size is restricted by the maximum transfer unit (MTU) of the underlying link layer technology (MTU is generally 1500 bytes which is the maximum payload size of the Ethernet). Transmission Control Protocol (TCP)
  • 12. Source Port & Destination Port: • Fields together identify the two local end points of the particular connection. • A port plus its hosts' IP address forms a unique end point. • Ports are used to communicate with the upper layer and distinguish different application sessions on the host. Sequence Number & Acknowledgment Number • Fields specify bytes in the byte stream. • The sequence number is used for segment differentiation • Useful for reordering or retransmitting lost segments. • The Acknowledgment number is set to the next segment expected. Data offset or TCP header length • Indicates how many 4-byte words are contained in the TCP header. Window field • Indicates how many bytes can be transmitted before an acknowledgment is received. The Checksum • Field is used to provide extra reliability and security to the TCP segment. The actual user data • are included after the end of the header.
  • 13. • UDP protocol consists of fewer fields compared to TCP. • The reason for that is because certain data types do not require reliable delivery and extra overhead. • Real-time traffic for example, needs to be transported in an efficient way without error correction and retransmission mechanisms. • UDP is considered to be a connectionless protocol. • It leaves reliability to be handled by the application layer. • All it cares about is fast transmission. • The UDP segment format is presented in the next slide. User Datagram Protocol (UDP)
  • 15. • The IP routing processes for all nodes involved in the delivery of an IP packet include the sending host, the intermediate routers, and the destination host. END TO END DELIVERY
  • 16. • When a host sends a packet, the packet is transmitted from an upper layer protocol (TCP, UDP, or ICMP) to IP, and then IP on the sending host does the following: • Sets the Time-to-Live (TTL) value to either a default or application-specified value. • Checks its routing table for the best route to the destination IP address. If no route is found, IP sends a routing error message to the upper layer protocol (TCP, UDP, or ICMP). • Determines the next-hop IP address and the interface, based on the most specific matching route. • Sends the packet, the next-hop IP address, and the next-hop interface to Address Resolution Protocol (ARP), and then ARP resolves the next-hop IP address to its media access control (MAC) address and forwards the packet. IP on the Sending Host
  • 17. When a packet is received at a router, the packet is passed to IP, and IP on the router does the following: • Verifies the IP header checksum. If the IP header checksum fails, the IP packet is discarded without notification to the user. This is known as a silent discard. • Verifies whether the destination IP address in the IP packet corresponds to an IP address assigned to a router interface. If so, the router processes the IP packet as the destination host If the destination IP address is not the router, IP decrements the Time-to-Live (TTL). If the TTL is 0, the router discards the packet and sends an ICMP Time Expired–TTL Expired in Transit message to the sender. • If the TTL is 1 or greater, IP updates the TTL field and calculates a new IP header checksum. • IP checks its routing table for the best route to the destination IP address in the IP packet. If no route is found, the router discards the packet and sends an ICMP Destination Unreachable–Host Unreachable message to the sender. • Based on the best route found, IP determines the next-hop IP address and interface. • IP sends the packet, the next-hop IP address, and the interface to ARP, and then ARP forwards the packet to the appropriate MAC address. • This entire process is repeated at each router in the path between the source and destination host. IP on the Router
  • 18. When a packet is received at the destination host, it is passed up to IP, and IP on the destination host does the following: • Verifies the IP header checksum. If the IP header checksum fails, the IP packet is silently discarded. • Verifies that the destination IP address in the IP packet corresponds to an IP address assigned to the host. If the destination IP address is not assigned to the host, the IP packet is silently discarded. • Passes the IP packet without the IP header to the appropriate upper-level protocol, based on the IP protocol field. If the protocol does not exist, ICMP sends a Destination Unreachable–Protocol Unreachable message back to the sender. • For TCP and UDP packets, IP checks the destination port and processes the TCP segment or UDP header. If no application exists for the UDP port number, ICMP sends a Destination Unreachable–Port Unreachable message back to the sender. If no application exists for the TCP port number, TCP sends a Connection Reset segment back to the sender. IP on the Destination Host
  • 19. Which One Should You Use?
  • 20. TAKE A SMILE, THEY ARE FREE THANK YOU