SlideShare a Scribd company logo
1 of 29
Introduction to TCP/IP
networking
Source: Ganesh Sittampalam
TCP/IP protocol family
• IP : Internet Protocol
– UDP : User Datagram Protocol
• RTP, traceroute
– TCP : Transmission Control Protocol
• HTTP, FTP, ssh
What is an internet?
• A set of interconnected networks
• The Internet is the most famous
example
• Networks can be completely different
– Ethernet, ATM, modem, …
– (TCP/)IP is what links them
What is an internet? (cont)
• Routers are devices on multiple
networks that pass traffic between them
• Individual networks pass traffic from one
router or endpoint to another
• TCP/IP hides the details as much as
possible
ISO/OSI Network Model
• Seven network “layers”
– Layer 1 : Physical – cables
– Layer 2 : Data Link – ethernet
– Layer 3 : Network – IP
– Layer 4 : Transport – TCP/UDP
– Layer 5 : Session
– Layer 6 : Presentation
– Layer 7 : Application
You don’t need to know the layers just the idea that it is layered
TCP/IP Network Model
• Different view – 4 layers
– Layer 1 : Link
– Layer 2 : Network
– Layer 3 : Transport
– Layer 4 : Application
OSI and Protocol Stack
OSI: Open Systems Interconnect
OSI Model TCP/IP Hierarchy Protocols
7th
Application Layer
6th
Presentation Layer
5th
Session Layer
4th
Transport Layer
3rd
Network Layer
2nd
Link Layer
1st
Physical Layer
Application Layer
Transport Layer
Network Layer
Link Layer
Link Layer : includes device driver and network interface card
Network Layer : handles the movement of packets, i.e. Routing
Transport Layer : provides a reliable flow of data between two hosts
Application Layer : handles the details of the particular application
Packet Encapsulation
 The data is sent down the protocol stack
 Each layer adds to the data by prepending headers
22Bytes 20Bytes 20Bytes 4Bytes
64 to 1500 Bytes
IP
• Responsible for end to end transmission
• Sends data in individual packets
• Maximum size of packet is determined
by the networks
– Fragmented if too large
• Unreliable
– Packets might be lost, corrupted,
duplicated, delivered out of order
IP addresses
• 4 bytes
– e.g. 163.1.125.98
– Each device normally gets one (or more)
– In theory there are about 4 billion available
• But…
Routing
• How does a device know where to send
a packet?
– All devices need to know what IP
addresses are on directly attached
networks
– If the destination is on a local network,
send it directly there
Routing (cont)
• If the destination address isn’t local
– Most non-router devices just send
everything to a single local router
– Routers need to know which network
corresponds to each possible IP address
Allocation of addresses
• Controlled centrally by ICANN
– Fairly strict rules on further delegation to
avoid wastage
• Have to demonstrate actual need for them
• Organizations that got in early have
bigger allocations than they really need
IP packets
• Source and destination addresses
• Protocol number
– 1 = ICMP, 6 = TCP, 17 = UDP
• Various options
– e.g. to control fragmentation
• Time to live (TTL)
– Prevent routing loops
IP Datagram
Vers Len TOS Total Length
Identification Flags Fragment Offset
TTL Protocol Header Checksum
Source Internet Address
Destination Internet Address
Options... Padding
Data...
0 4 8 16 19 24 31
Field Purpose
Vers IP version number
Len Length of IP header (4 octet units)
TOS Type of Service
T. Length Length of entire datagram (octets)
Ident. IP datagram ID (for frag/reassembly)
Flags Don’t/More fragments
Frag Off Fragment Offset
Field Purpose
TTL Time To Live - Max # of hops
Protocol Higher level protocol (1=ICMP,
6=TCP, 17=UDP)
Checksum Checksum for the IP header
Source IA Originator’s Internet Address
Dest. IA Final Destination Internet Address
Options Source route, time stamp, etc.
Data... Higher level protocol data
You just need to know the IP addresses, TTL and protocol #
IP Routing
• Routing Table
Destination IP address
IP address of a next-hop router
Flags
Network interface specification
Application
Transport
Network
Link
Application
Transport
Network
Link
Network
Link
Source Destination
Router
UDP
• Thin layer on top of IP
• Adds packet length + checksum
– Guard against corrupted packets
• Also source and destination ports
– Ports are used to associate a packet with a
specific application at each end
• Still unreliable:
– Duplication, loss, out-of-orderness possible
UDP datagram
Destination Port
Source Port
Application data
0 16 31
Checksum
Length
Field Purpose
Source Port 16-bit port number identifying originating application
Destination Port 16-bit port number identifying destination application
Length Length of UDP datagram (UDP header + data)
Checksum Checksum of IP pseudo header, UDP header, and data
Typical applications of UDP
– Where packet loss etc is better handled by
the application than the network stack
– Where the overhead of setting up a
connection isn’t wanted
• VOIP
• NFS – Network File System
• Most games
TCP
• Reliable, full-duplex, connection-
oriented, stream delivery
– Interface presented to the application
doesn’t require data in individual packets
– Data is guaranteed to arrive, and in the
correct order without duplications
• Or the connection will be dropped
– Imposes significant overheads
Applications of TCP
• Most things!
– HTTP, FTP, …
• Saves the application a lot of work, so
used unless there’s a good reason not
to
TCP implementation
• Connections are established using a
three-way handshake
• Data is divided up into packets by the
operating system
• Packets are numbered, and received
packets are acknowledged
• Connections are explicitly closed
– (or may abnormally terminate)
TCP Packets
• Source + destination ports
• Sequence number
• Acknowledgement number
• Checksum
• Various options
TCP Segment
Destination Port
Acknowledgment Number
Options... Padding
Data...
0 4 10 16 19 24 31
Source Port
Window
Len
Sequence Number
Reserved Flags
Urgent Pointer
Checksum
Field Purpose
Source Port Identifies originating application
Destination Port Identifies destination application
Sequence Number Sequence number of first octet in the segment
Acknowledgment # Sequence number of the next expected octet (if ACK flag set)
Len Length of TCP header in 4 octet units
Flags TCP flags: SYN, FIN, RST, PSH, ACK, URG
Window Number of octets from ACK that sender will accept
Checksum Checksum of IP pseudo-header + TCP header + data
Urgent Pointer Pointer to end of “urgent data”
Options Special TCP options such as MSS and Window Scale
You just need to know port numbers, seq and ack are added
TCP : Data transfer
Host
Client
Send Packet 1
Start Timer
Retransmit Packet1
Start Timer
Packet should arrive
ACK should be sent
ACK would normally
Arrive at this time
Receive Packet 1
Send AXK 1
Time Expires
Receive ACK 1
Cancel Timer
Packet Lost
Timer
Timer
IPv6
• 128 bit addresses
– Make it feasible to be very wasteful with
address allocations
• Lots of other new features
– Built-in autoconfiguration, security options,
…
• Not really in production use yet
Ethernet
• Computer <-> Computer communication on same
network
• Each device has unique MAC address (48-bit)
example: 00-C0-4F-48-47-93
Ethernet Packet:
Dest.
address
Data CRC
Source
address
Type
MAC: Media Access Control
6bytes 6bytes 2bytes
Preamble
8bytes 64 - 1500bytes 4bytes
Do not worry about this slide
ARP : Address Resolution
Protocol
• ARP provides mapping
32bit IP address <-> 48bit MAC address
128.97.89.153 <-> 00-C0-4F-48-47-93
• ARP cache
maintains the recent mappings from IP addresses to MAC addresses
Protocol
1. ARP request broadcast on Ethernet
2. Destination host ARP layer responds
Do not worry about this slide
DHCP
• Dynamic Host Configuration Protocol
– Used to tell a computer what IP address to use
– Device broadcasts a request from IP 0.0.0.0
• If it had an IP address before, asks for the same one
again
– Server (or relay) on local network responds telling
it which to use (or ignores it, or tells it go away)
• “Lease time” telling it how long that IP will be valid for
• Device requests renewal of lease after ¾(?) elapsed
Do not worry about this slide

More Related Content

Similar to TCP/IP networking protocols introduction

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).pptxVINAYTANWAR18
 
Computer network coe351- part2- final
Computer network coe351- part2- finalComputer network coe351- part2- final
Computer network coe351- part2- finalTaymoor Nazmy
 
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...MathivananP4
 
Computer network coe351- part3-final
Computer network coe351- part3-finalComputer network coe351- part3-final
Computer network coe351- part3-finalTaymoor Nazmy
 
ENC_254_PPT_ch04.pdf
ENC_254_PPT_ch04.pdfENC_254_PPT_ch04.pdf
ENC_254_PPT_ch04.pdfshaker402
 
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.pptip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.pptVINAYTANWAR18
 
Vulnerabilities in IP Protocols
Vulnerabilities in IP ProtocolsVulnerabilities in IP Protocols
Vulnerabilities in IP Protocolsbabak danyal
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layertmavroidis
 
Transport Layer
Transport LayerTransport Layer
Transport Layertmavroidis
 
tcp-140613123317-phpapp01.pptx
tcp-140613123317-phpapp01.pptxtcp-140613123317-phpapp01.pptx
tcp-140613123317-phpapp01.pptxtouseeqzulfiqar1
 
Network protocol
Network protocolNetwork protocol
Network protocolOnline
 
4. Communication and Network Security
4. Communication and Network Security4. Communication and Network Security
4. Communication and Network SecuritySam Bowne
 
CISSP Prep: Ch 5. Communication and Network Security (Part 1)
CISSP Prep: Ch 5. Communication and Network Security (Part 1)CISSP Prep: Ch 5. Communication and Network Security (Part 1)
CISSP Prep: Ch 5. Communication and Network Security (Part 1)Sam Bowne
 
Packet Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferencePacket Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferenceCengage Learning
 
Internet protocols Report Slides
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report SlidesBassam Kanber
 

Similar to TCP/IP networking protocols introduction (20)

QSpiders - Upper layer-protocols
QSpiders - Upper layer-protocolsQSpiders - Upper layer-protocols
QSpiders - Upper layer-protocols
 
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
 
Computer network coe351- part2- final
Computer network coe351- part2- finalComputer network coe351- part2- final
Computer network coe351- part2- final
 
TCP /IP
TCP /IPTCP /IP
TCP /IP
 
Networking.ppt
Networking.pptNetworking.ppt
Networking.ppt
 
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
Computer network coe351- part3-final
Computer network coe351- part3-finalComputer network coe351- part3-final
Computer network coe351- part3-final
 
ENC_254_PPT_ch04.pdf
ENC_254_PPT_ch04.pdfENC_254_PPT_ch04.pdf
ENC_254_PPT_ch04.pdf
 
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.pptip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
 
Vulnerabilities in IP Protocols
Vulnerabilities in IP ProtocolsVulnerabilities in IP Protocols
Vulnerabilities in IP Protocols
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layer
 
Transport Layer
Transport LayerTransport Layer
Transport Layer
 
tcp-140613123317-phpapp01.pptx
tcp-140613123317-phpapp01.pptxtcp-140613123317-phpapp01.pptx
tcp-140613123317-phpapp01.pptx
 
Network protocol
Network protocolNetwork protocol
Network protocol
 
4. Communication and Network Security
4. Communication and Network Security4. Communication and Network Security
4. Communication and Network Security
 
CISSP Prep: Ch 5. Communication and Network Security (Part 1)
CISSP Prep: Ch 5. Communication and Network Security (Part 1)CISSP Prep: Ch 5. Communication and Network Security (Part 1)
CISSP Prep: Ch 5. Communication and Network Security (Part 1)
 
Packet Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferencePacket Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing Conference
 
TCP/IP Protocols
TCP/IP ProtocolsTCP/IP Protocols
TCP/IP Protocols
 
Internet protocols Report Slides
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report Slides
 

Recently uploaded

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 

TCP/IP networking protocols introduction

  • 2. TCP/IP protocol family • IP : Internet Protocol – UDP : User Datagram Protocol • RTP, traceroute – TCP : Transmission Control Protocol • HTTP, FTP, ssh
  • 3. What is an internet? • A set of interconnected networks • The Internet is the most famous example • Networks can be completely different – Ethernet, ATM, modem, … – (TCP/)IP is what links them
  • 4. What is an internet? (cont) • Routers are devices on multiple networks that pass traffic between them • Individual networks pass traffic from one router or endpoint to another • TCP/IP hides the details as much as possible
  • 5. ISO/OSI Network Model • Seven network “layers” – Layer 1 : Physical – cables – Layer 2 : Data Link – ethernet – Layer 3 : Network – IP – Layer 4 : Transport – TCP/UDP – Layer 5 : Session – Layer 6 : Presentation – Layer 7 : Application You don’t need to know the layers just the idea that it is layered
  • 6. TCP/IP Network Model • Different view – 4 layers – Layer 1 : Link – Layer 2 : Network – Layer 3 : Transport – Layer 4 : Application
  • 7. OSI and Protocol Stack OSI: Open Systems Interconnect OSI Model TCP/IP Hierarchy Protocols 7th Application Layer 6th Presentation Layer 5th Session Layer 4th Transport Layer 3rd Network Layer 2nd Link Layer 1st Physical Layer Application Layer Transport Layer Network Layer Link Layer Link Layer : includes device driver and network interface card Network Layer : handles the movement of packets, i.e. Routing Transport Layer : provides a reliable flow of data between two hosts Application Layer : handles the details of the particular application
  • 8. Packet Encapsulation  The data is sent down the protocol stack  Each layer adds to the data by prepending headers 22Bytes 20Bytes 20Bytes 4Bytes 64 to 1500 Bytes
  • 9. IP • Responsible for end to end transmission • Sends data in individual packets • Maximum size of packet is determined by the networks – Fragmented if too large • Unreliable – Packets might be lost, corrupted, duplicated, delivered out of order
  • 10. IP addresses • 4 bytes – e.g. 163.1.125.98 – Each device normally gets one (or more) – In theory there are about 4 billion available • But…
  • 11. Routing • How does a device know where to send a packet? – All devices need to know what IP addresses are on directly attached networks – If the destination is on a local network, send it directly there
  • 12. Routing (cont) • If the destination address isn’t local – Most non-router devices just send everything to a single local router – Routers need to know which network corresponds to each possible IP address
  • 13. Allocation of addresses • Controlled centrally by ICANN – Fairly strict rules on further delegation to avoid wastage • Have to demonstrate actual need for them • Organizations that got in early have bigger allocations than they really need
  • 14. IP packets • Source and destination addresses • Protocol number – 1 = ICMP, 6 = TCP, 17 = UDP • Various options – e.g. to control fragmentation • Time to live (TTL) – Prevent routing loops
  • 15. IP Datagram Vers Len TOS Total Length Identification Flags Fragment Offset TTL Protocol Header Checksum Source Internet Address Destination Internet Address Options... Padding Data... 0 4 8 16 19 24 31 Field Purpose Vers IP version number Len Length of IP header (4 octet units) TOS Type of Service T. Length Length of entire datagram (octets) Ident. IP datagram ID (for frag/reassembly) Flags Don’t/More fragments Frag Off Fragment Offset Field Purpose TTL Time To Live - Max # of hops Protocol Higher level protocol (1=ICMP, 6=TCP, 17=UDP) Checksum Checksum for the IP header Source IA Originator’s Internet Address Dest. IA Final Destination Internet Address Options Source route, time stamp, etc. Data... Higher level protocol data You just need to know the IP addresses, TTL and protocol #
  • 16. IP Routing • Routing Table Destination IP address IP address of a next-hop router Flags Network interface specification Application Transport Network Link Application Transport Network Link Network Link Source Destination Router
  • 17. UDP • Thin layer on top of IP • Adds packet length + checksum – Guard against corrupted packets • Also source and destination ports – Ports are used to associate a packet with a specific application at each end • Still unreliable: – Duplication, loss, out-of-orderness possible
  • 18. UDP datagram Destination Port Source Port Application data 0 16 31 Checksum Length Field Purpose Source Port 16-bit port number identifying originating application Destination Port 16-bit port number identifying destination application Length Length of UDP datagram (UDP header + data) Checksum Checksum of IP pseudo header, UDP header, and data
  • 19. Typical applications of UDP – Where packet loss etc is better handled by the application than the network stack – Where the overhead of setting up a connection isn’t wanted • VOIP • NFS – Network File System • Most games
  • 20. TCP • Reliable, full-duplex, connection- oriented, stream delivery – Interface presented to the application doesn’t require data in individual packets – Data is guaranteed to arrive, and in the correct order without duplications • Or the connection will be dropped – Imposes significant overheads
  • 21. Applications of TCP • Most things! – HTTP, FTP, … • Saves the application a lot of work, so used unless there’s a good reason not to
  • 22. TCP implementation • Connections are established using a three-way handshake • Data is divided up into packets by the operating system • Packets are numbered, and received packets are acknowledged • Connections are explicitly closed – (or may abnormally terminate)
  • 23. TCP Packets • Source + destination ports • Sequence number • Acknowledgement number • Checksum • Various options
  • 24. TCP Segment Destination Port Acknowledgment Number Options... Padding Data... 0 4 10 16 19 24 31 Source Port Window Len Sequence Number Reserved Flags Urgent Pointer Checksum Field Purpose Source Port Identifies originating application Destination Port Identifies destination application Sequence Number Sequence number of first octet in the segment Acknowledgment # Sequence number of the next expected octet (if ACK flag set) Len Length of TCP header in 4 octet units Flags TCP flags: SYN, FIN, RST, PSH, ACK, URG Window Number of octets from ACK that sender will accept Checksum Checksum of IP pseudo-header + TCP header + data Urgent Pointer Pointer to end of “urgent data” Options Special TCP options such as MSS and Window Scale You just need to know port numbers, seq and ack are added
  • 25. TCP : Data transfer Host Client Send Packet 1 Start Timer Retransmit Packet1 Start Timer Packet should arrive ACK should be sent ACK would normally Arrive at this time Receive Packet 1 Send AXK 1 Time Expires Receive ACK 1 Cancel Timer Packet Lost Timer Timer
  • 26. IPv6 • 128 bit addresses – Make it feasible to be very wasteful with address allocations • Lots of other new features – Built-in autoconfiguration, security options, … • Not really in production use yet
  • 27. Ethernet • Computer <-> Computer communication on same network • Each device has unique MAC address (48-bit) example: 00-C0-4F-48-47-93 Ethernet Packet: Dest. address Data CRC Source address Type MAC: Media Access Control 6bytes 6bytes 2bytes Preamble 8bytes 64 - 1500bytes 4bytes Do not worry about this slide
  • 28. ARP : Address Resolution Protocol • ARP provides mapping 32bit IP address <-> 48bit MAC address 128.97.89.153 <-> 00-C0-4F-48-47-93 • ARP cache maintains the recent mappings from IP addresses to MAC addresses Protocol 1. ARP request broadcast on Ethernet 2. Destination host ARP layer responds Do not worry about this slide
  • 29. DHCP • Dynamic Host Configuration Protocol – Used to tell a computer what IP address to use – Device broadcasts a request from IP 0.0.0.0 • If it had an IP address before, asks for the same one again – Server (or relay) on local network responds telling it which to use (or ignores it, or tells it go away) • “Lease time” telling it how long that IP will be valid for • Device requests renewal of lease after ¾(?) elapsed Do not worry about this slide