SlideShare une entreprise Scribd logo
1  sur  37
Internet Protocol
Introduction
 Fundamental Internet communication service

 Format of packets

 Processing of packets by Routers

   Forwarding
   Delivery
Connectionless service
 End-to-end delivery service is connectionless

 Extension of LAN abstraction
    Universal addressing
    Data delivered in packets (frames), each with a header

 Combines collection of physical networks into single, virtual network.
Connectionless service
       Transport protocols use this connectionless service to
        provide:

          Connectionless data delivery (UDP)

    and

          Connection-oriented data delivery (TCP)
Virtual Packets

 Packets serve same purpose in internet as frames on LAN.

 Each has a header.

 Routers (formerly gateways) forward between physical networks.
Virtual Packets
 Packets have a uniform, hardware-independent format.
    Includes header and data.
    Can't use format from any particular hardware.

 Encapsulated in hardware frames for delivery across each physical network.
IP Datagram Format
 Formally, the unit of IP data delivery was called a Datagram.
 Includes header area and data area.
IP Datagram Size
 Datagrams can have different sizes:

   Header area usually fixed (20 octets) but can have options.

   Data area can contain between 1 octet and 65,535 octets (216 -
    1).

   Usually, data area is much larger than header.
Forwarding Datagrams
 Header contains all information needed to deliver
 datagram to the destination computer.
     Destination address
     Source address
     Identifier
     Other delivery information

 Router examines header of each datagram and forwards
 datagram along path to destination.
Routing Table
 For efficiency, information about forwarding is stored in a
 routing table.
   Initialized at system initialization.
   Must be updated as network topology changes.

 Contains list of destination networks and next hop for each
 destination.
Routing Table
Routing Tables & Address Masks
   In practice, additional information is kept in routing table.
   Destination stored as network address.
   Next hop stored as IP address of router.
   Address mask defines how many bits of address are in
    prefix.
     Prefix defines how much of address used to identify network.
     E.g., class A mask is 255.0.0.0.
     Used for subnetting.
Routing Tables & Address Masks
Address Masks
 To identify destination network, apply address mask to
 destination address and compare to network address in
 routing table.

 Can use Boolean and
 if ((Mask[i] & D) == Dest[i]) forward to NextHop[i].
Address Masks
Forwarding, Destination Address and Next-hop

 Destination address in IP datagram is always ultimate
  destination.
 Router looks up next-hop address and forwards datagram.
 Network interface layer takes two parameters:
   IP datagram
   Next-hop address
 Next-hop address never appears in IP datagram.
Best-Effort Delivery
 IP provides service equivalent to LAN.

 Does not guarantee to prevent:

     Duplicate datagrams
     Delayed or out-of-order delivery
     Corruption of data
     Datagram loss
Best-Effort Delivery

 Reliable delivery provided by Transport layer
 Network layer - IP - can detect and report errors without
 actually fixing them.
   Network layer focuses on datagram delivery.
   Application layer not is interested in differentiating among
    delivery problems at intermediate routers.
IP Datagram Header Format
IP Datagram Header Format
 VERS - version of IP (currently 4)

 H. LEN - header length (in units of 32 bits)

 SERVICE TYPE - sender's preference for low latency, high
 reliability (rarely used)

 TOTAL LENGTH - total octets in datagram

 IDENT, FLAGS, FRAGMENT OFFSET - used with
 fragmentation
IP Datagram Header Format
 TTL - time to live; decremented in each router; datagram
 discarded when TTL = 0

 TYPE - type of protocol carried in datagram;
 e.g., TCP, UDP.

 HEADER CHECKSUM - 1s complement of 1s complement
 sum.

 SOURCE, DEST ,IP ADDRESS - IP addresses of original
 source and ultimate destination.
IP Datagram Options
 Several options can be added to IP header:
    Record route
    Source route
    Time stamp
 Header with no options has H. LEN field value 5; data
  begins immediately after DESTINATION IP ADDRESS.
 Options added between DESTINATION IP ADDRESS and
  data in multiples of 32 bits.
 Header with 96 bits of options has H. LEN field value 8.
IP Encapsulation, Fragmentation and Reassembly
Encapsulation
 Network interface layer encapsulates IP datagram as data area in hardware frame.
    Hardware ignores IP datagram format
    Standards for encapsulation describe details.

 Standard defines data type for IP datagram, as well as others (e.g., ARP).

 Receiving protocol stack interprets data area based on frame type.
Encapsulation
Encapsulation across Multiple Hops
 Each router in the path from the source to the destination:
    Unencapsulates incoming datagram from frame.
    Processes datagram - determines next hop.
    Encapsulates datagram in outgoing frame.

 Datagram may be encapsulated in different hardware
 format at each hop.

 Datagram itself is (almost!) unchanged.
Encapsulation across Multiple Hops
MTU
 Every hardware technology specification includes the
 definition of the maximum size of the frame data area.

 Called the Maximum Transmission Unit (MTU).

 Any datagram encapsulated in a hardware frame must be
 smaller than the MTU for that hardware.
MTU and Heterogeneous Networks
 An internet may have networks with different
  MTUs.
 Suppose downstream network has smaller MTU
  than local network?
Fragmentation
 One technique - limits datagram size to smallest MTU of
 any network.

 IP uses fragmentation - datagrams can be split into pieces
 to fit in network with small MTU.

 Router detects datagram larger than network MTU.
    Splits into pieces.
    Each piece smaller than outbound network MTU.
Fragmentation
 Each fragment is an independent datagram
    Includes all header fields.
    Bit in header indicates datagram is a fragment.
    Other fields have information for reconstructing original
     datagram.
    FRAGMENT OFFSET gives original location of fragment.
 Router uses local MTU to compute size of each fragment.
 Puts part of data from original datagram in each fragment.
 Puts other information into header.
Fragmentation
Datagram Reassembly
 Reconstruction of original datagram is called
  Reassembly.
 Ultimate destination performs reassembly.
Datagram Reassembly
 Fragments may arrive out of order; header bit identifies
  fragment containing end of data from original
  datagram.
 Fragment 3 identified as last fragment.
Identifying a Datagram
&
Fragment Loss
Fragment Loss
 IP may drop fragment.
 What happens to original datagram?
    Destination drops entire original datagram.
 How does destination identify lost fragment?
    Sets timer with each fragment.
    If timer expires before all fragments arrive, fragment assumed
     lost.
    Datagram dropped.
 Source (application layer protocol) assumed to retransmit.
Fragmenting a Fragment

 Fragment may encounter subsequent network with even
 smaller MTU.

 Router fragments the fragment to fit.

 Resulting sub-fragments look just like original fragments
 (except for size).

 No need to reassemble hierarchically; sub-fragments
 include position in original datagram.

Contenu connexe

Tendances

Et3003 sem2-1314-7 network layers iv (ipv4)
Et3003 sem2-1314-7 network layers iv (ipv4)Et3003 sem2-1314-7 network layers iv (ipv4)
Et3003 sem2-1314-7 network layers iv (ipv4)
Tutun Juhana
 
Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)
Tutun Juhana
 
Et3003 sem2-1314-8 network layers v (icmpv4)
Et3003 sem2-1314-8 network layers v (icmpv4)Et3003 sem2-1314-8 network layers v (icmpv4)
Et3003 sem2-1314-8 network layers v (icmpv4)
Tutun Juhana
 
IP Routing
IP RoutingIP Routing
IP Routing
Peter R. Egli
 
Mac addresses(media access control)
Mac addresses(media access control)Mac addresses(media access control)
Mac addresses(media access control)
Ismail Mukiibi
 
Ipv4 tutorial
Ipv4 tutorialIpv4 tutorial
Ipv4 tutorial
saryu2011
 
Internet protocols Report Slides
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report Slides
Bassam Kanber
 

Tendances (20)

Cs553 st7 ch18-internet_protocols
Cs553 st7 ch18-internet_protocolsCs553 st7 ch18-internet_protocols
Cs553 st7 ch18-internet_protocols
 
Et3003 sem2-1314-6 network layers iii (arp)
Et3003 sem2-1314-6 network layers iii (arp)Et3003 sem2-1314-6 network layers iii (arp)
Et3003 sem2-1314-6 network layers iii (arp)
 
Ch 19 Network-layer protocols Section 1
Ch 19  Network-layer protocols Section 1Ch 19  Network-layer protocols Section 1
Ch 19 Network-layer protocols Section 1
 
I pv4 format
I pv4 formatI pv4 format
I pv4 format
 
Et3003 sem2-1314-7 network layers iv (ipv4)
Et3003 sem2-1314-7 network layers iv (ipv4)Et3003 sem2-1314-7 network layers iv (ipv4)
Et3003 sem2-1314-7 network layers iv (ipv4)
 
Et3003 sem2-1314-5 network layers ii (intro to routing)
Et3003 sem2-1314-5 network layers ii (intro to routing)Et3003 sem2-1314-5 network layers ii (intro to routing)
Et3003 sem2-1314-5 network layers ii (intro to routing)
 
Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)
 
Et3003 sem2-1314-8 network layers v (icmpv4)
Et3003 sem2-1314-8 network layers v (icmpv4)Et3003 sem2-1314-8 network layers v (icmpv4)
Et3003 sem2-1314-8 network layers v (icmpv4)
 
Network layer
Network layerNetwork layer
Network layer
 
Transport layer
Transport layer   Transport layer
Transport layer
 
IPv6 header
IPv6 headerIPv6 header
IPv6 header
 
IP Routing
IP RoutingIP Routing
IP Routing
 
Mac addresses(media access control)
Mac addresses(media access control)Mac addresses(media access control)
Mac addresses(media access control)
 
Et3003 sem2-1314-3 ethernets
Et3003 sem2-1314-3 ethernetsEt3003 sem2-1314-3 ethernets
Et3003 sem2-1314-3 ethernets
 
Ipv6up
Ipv6upIpv6up
Ipv6up
 
IPv6 Routing.pdf
IPv6 Routing.pdfIPv6 Routing.pdf
IPv6 Routing.pdf
 
Evolution of Routing Techniques
Evolution of  Routing TechniquesEvolution of  Routing Techniques
Evolution of Routing Techniques
 
Ipv4 tutorial
Ipv4 tutorialIpv4 tutorial
Ipv4 tutorial
 
Routing
RoutingRouting
Routing
 
Internet protocols Report Slides
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report Slides
 

En vedette (14)

Microwave engineering david m.pozar
Microwave engineering david m.pozarMicrowave engineering david m.pozar
Microwave engineering david m.pozar
 
Tel313 tipaagb
Tel313 tipaagbTel313 tipaagb
Tel313 tipaagb
 
Matlab guide
Matlab guideMatlab guide
Matlab guide
 
Working of wimax under jamming
Working of wimax under jammingWorking of wimax under jamming
Working of wimax under jamming
 
Lmb162 abc manual-rev0.2
Lmb162 abc manual-rev0.2Lmb162 abc manual-rev0.2
Lmb162 abc manual-rev0.2
 
Ways On How To Efficiently Perform Tricep Exercises
Ways On How To Efficiently Perform Tricep ExercisesWays On How To Efficiently Perform Tricep Exercises
Ways On How To Efficiently Perform Tricep Exercises
 
SUPPLY CHAIN MANAGEMENT
SUPPLY CHAIN MANAGEMENTSUPPLY CHAIN MANAGEMENT
SUPPLY CHAIN MANAGEMENT
 
Extraposition+ (lecture 16)
Extraposition+ (lecture 16)Extraposition+ (lecture 16)
Extraposition+ (lecture 16)
 
Talk nbu
Talk nbuTalk nbu
Talk nbu
 
Pregnancy and human_development
Pregnancy and human_developmentPregnancy and human_development
Pregnancy and human_development
 
Seente biotehnoloogiline kasutamine
Seente biotehnoloogiline kasutamineSeente biotehnoloogiline kasutamine
Seente biotehnoloogiline kasutamine
 
Bombas de-desplazamiento-positivo
Bombas de-desplazamiento-positivoBombas de-desplazamiento-positivo
Bombas de-desplazamiento-positivo
 
Nirzari Trivedi CV
Nirzari Trivedi CVNirzari Trivedi CV
Nirzari Trivedi CV
 
Trade union Act 1926
Trade union Act 1926Trade union Act 1926
Trade union Act 1926
 

Similaire à Introduction to IP

Exploration network chapter_5_modified
Exploration network chapter_5_modifiedExploration network chapter_5_modified
Exploration network chapter_5_modified
rajesh531
 
Ip protocol
Ip protocolIp protocol
Ip protocol
H K
 
Custom_IP_Network_Protocol_and_Router
Custom_IP_Network_Protocol_and_RouterCustom_IP_Network_Protocol_and_Router
Custom_IP_Network_Protocol_and_Router
Vishal Vasudev
 
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
Vanitha Joshi
 
07 - TCP_IP and the DoD Model.ppt
07 - TCP_IP and the DoD Model.ppt07 - TCP_IP and the DoD Model.ppt
07 - TCP_IP and the DoD Model.ppt
ssuserf7cd2b
 

Similaire à Introduction to IP (20)

474-22-DatagramForwarding.pptx
474-22-DatagramForwarding.pptx474-22-DatagramForwarding.pptx
474-22-DatagramForwarding.pptx
 
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENTTCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
 
Exploration network chapter_5_modified
Exploration network chapter_5_modifiedExploration network chapter_5_modified
Exploration network chapter_5_modified
 
Ip protocol
Ip protocolIp protocol
Ip protocol
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 
Custom_IP_Network_Protocol_and_Router
Custom_IP_Network_Protocol_and_RouterCustom_IP_Network_Protocol_and_Router
Custom_IP_Network_Protocol_and_Router
 
Tcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication headerTcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication header
 
tcpheader-151221111244.pdf
tcpheader-151221111244.pdftcpheader-151221111244.pdf
tcpheader-151221111244.pdf
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Network Layer And I Pv6
Network Layer And I Pv6Network Layer And I Pv6
Network Layer And I Pv6
 
IP Utilites
IP UtilitesIP Utilites
IP Utilites
 
Mod5
Mod5Mod5
Mod5
 
Network Layer & Transport Layer
Network Layer & Transport LayerNetwork Layer & Transport Layer
Network Layer & Transport Layer
 
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
Implementation of IPSec VPN on Cisco routers and Configuring it on ISP. (1)
 
sandhiya
sandhiyasandhiya
sandhiya
 
computerNetworkSecurity.ppt
computerNetworkSecurity.pptcomputerNetworkSecurity.ppt
computerNetworkSecurity.ppt
 
07 - TCP_IP and the DoD Model.ppt
07 - TCP_IP and the DoD Model.ppt07 - TCP_IP and the DoD Model.ppt
07 - TCP_IP and the DoD Model.ppt
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
Tcp
TcpTcp
Tcp
 
Introduction for internet connectivity (IoT)
 Introduction for internet connectivity (IoT) Introduction for internet connectivity (IoT)
Introduction for internet connectivity (IoT)
 

Dernier

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Dernier (20)

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

Introduction to IP

  • 2. Introduction  Fundamental Internet communication service  Format of packets  Processing of packets by Routers  Forwarding  Delivery
  • 3. Connectionless service  End-to-end delivery service is connectionless  Extension of LAN abstraction  Universal addressing  Data delivered in packets (frames), each with a header  Combines collection of physical networks into single, virtual network.
  • 4. Connectionless service  Transport protocols use this connectionless service to provide:  Connectionless data delivery (UDP) and  Connection-oriented data delivery (TCP)
  • 5. Virtual Packets  Packets serve same purpose in internet as frames on LAN.  Each has a header.  Routers (formerly gateways) forward between physical networks.
  • 6. Virtual Packets  Packets have a uniform, hardware-independent format.  Includes header and data.  Can't use format from any particular hardware.  Encapsulated in hardware frames for delivery across each physical network.
  • 7. IP Datagram Format  Formally, the unit of IP data delivery was called a Datagram.  Includes header area and data area.
  • 8. IP Datagram Size  Datagrams can have different sizes:  Header area usually fixed (20 octets) but can have options.  Data area can contain between 1 octet and 65,535 octets (216 - 1).  Usually, data area is much larger than header.
  • 9. Forwarding Datagrams  Header contains all information needed to deliver datagram to the destination computer.  Destination address  Source address  Identifier  Other delivery information  Router examines header of each datagram and forwards datagram along path to destination.
  • 10. Routing Table  For efficiency, information about forwarding is stored in a routing table.  Initialized at system initialization.  Must be updated as network topology changes.  Contains list of destination networks and next hop for each destination.
  • 12. Routing Tables & Address Masks  In practice, additional information is kept in routing table.  Destination stored as network address.  Next hop stored as IP address of router.  Address mask defines how many bits of address are in prefix.  Prefix defines how much of address used to identify network.  E.g., class A mask is 255.0.0.0.  Used for subnetting.
  • 13. Routing Tables & Address Masks
  • 14. Address Masks  To identify destination network, apply address mask to destination address and compare to network address in routing table.  Can use Boolean and  if ((Mask[i] & D) == Dest[i]) forward to NextHop[i].
  • 16. Forwarding, Destination Address and Next-hop  Destination address in IP datagram is always ultimate destination.  Router looks up next-hop address and forwards datagram.  Network interface layer takes two parameters:  IP datagram  Next-hop address  Next-hop address never appears in IP datagram.
  • 17. Best-Effort Delivery  IP provides service equivalent to LAN.  Does not guarantee to prevent:  Duplicate datagrams  Delayed or out-of-order delivery  Corruption of data  Datagram loss
  • 18. Best-Effort Delivery  Reliable delivery provided by Transport layer  Network layer - IP - can detect and report errors without actually fixing them.  Network layer focuses on datagram delivery.  Application layer not is interested in differentiating among delivery problems at intermediate routers.
  • 20. IP Datagram Header Format  VERS - version of IP (currently 4)  H. LEN - header length (in units of 32 bits)  SERVICE TYPE - sender's preference for low latency, high reliability (rarely used)  TOTAL LENGTH - total octets in datagram  IDENT, FLAGS, FRAGMENT OFFSET - used with fragmentation
  • 21. IP Datagram Header Format  TTL - time to live; decremented in each router; datagram discarded when TTL = 0  TYPE - type of protocol carried in datagram; e.g., TCP, UDP.  HEADER CHECKSUM - 1s complement of 1s complement sum.  SOURCE, DEST ,IP ADDRESS - IP addresses of original source and ultimate destination.
  • 22. IP Datagram Options  Several options can be added to IP header:  Record route  Source route  Time stamp  Header with no options has H. LEN field value 5; data begins immediately after DESTINATION IP ADDRESS.  Options added between DESTINATION IP ADDRESS and data in multiples of 32 bits.  Header with 96 bits of options has H. LEN field value 8.
  • 24. Encapsulation  Network interface layer encapsulates IP datagram as data area in hardware frame.  Hardware ignores IP datagram format  Standards for encapsulation describe details.  Standard defines data type for IP datagram, as well as others (e.g., ARP).  Receiving protocol stack interprets data area based on frame type.
  • 26. Encapsulation across Multiple Hops  Each router in the path from the source to the destination:  Unencapsulates incoming datagram from frame.  Processes datagram - determines next hop.  Encapsulates datagram in outgoing frame.  Datagram may be encapsulated in different hardware format at each hop.   Datagram itself is (almost!) unchanged.
  • 28. MTU  Every hardware technology specification includes the definition of the maximum size of the frame data area.  Called the Maximum Transmission Unit (MTU).  Any datagram encapsulated in a hardware frame must be smaller than the MTU for that hardware.
  • 29. MTU and Heterogeneous Networks  An internet may have networks with different MTUs.  Suppose downstream network has smaller MTU than local network?
  • 30. Fragmentation  One technique - limits datagram size to smallest MTU of any network.  IP uses fragmentation - datagrams can be split into pieces to fit in network with small MTU.  Router detects datagram larger than network MTU.  Splits into pieces.  Each piece smaller than outbound network MTU.
  • 31. Fragmentation  Each fragment is an independent datagram  Includes all header fields.  Bit in header indicates datagram is a fragment.  Other fields have information for reconstructing original datagram.  FRAGMENT OFFSET gives original location of fragment.  Router uses local MTU to compute size of each fragment.  Puts part of data from original datagram in each fragment.  Puts other information into header.
  • 33. Datagram Reassembly  Reconstruction of original datagram is called Reassembly.  Ultimate destination performs reassembly.
  • 34. Datagram Reassembly  Fragments may arrive out of order; header bit identifies fragment containing end of data from original datagram.  Fragment 3 identified as last fragment.
  • 36. Fragment Loss  IP may drop fragment.  What happens to original datagram?  Destination drops entire original datagram.  How does destination identify lost fragment?  Sets timer with each fragment.  If timer expires before all fragments arrive, fragment assumed lost.  Datagram dropped.  Source (application layer protocol) assumed to retransmit.
  • 37. Fragmenting a Fragment  Fragment may encounter subsequent network with even smaller MTU.  Router fragments the fragment to fit.   Resulting sub-fragments look just like original fragments (except for size).   No need to reassemble hierarchically; sub-fragments include position in original datagram.