cs460 - ch21

Upload: jay-mishra

Post on 02-Jun-2018

244 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 CS460 - CH21

    1/26

  • 8/11/2019 CS460 - CH21

    2/26

    2

    Introduction Previous chapter:

    IP datagram format

    Routing

    This chapter:

    IP datagram transmission

  • 8/11/2019 CS460 - CH21

    3/26

    3

    Datagram Transmission IP software selects the next hop to

    Transmit the datagram across the

    physical network Network hardware does not understand

    datagram format or internet addressing

    Hardware understands frames Frames may differ from network to

    network

  • 8/11/2019 CS460 - CH21

    4/26

  • 8/11/2019 CS460 - CH21

    5/26

    5

    EncapsulationFigure 21.1 - An IP datagram encapsulated in ahardware frame. The entire datagram resides in theframe data area. In practice, the frame format used

    with some technologies includes a frame trailer as wellas frame header.

  • 8/11/2019 CS460 - CH21

    6/26

    6

    Encapsulation How does a receiver know whether the

    data area in an incoming frame contains

    an IP datagramor other data?

    Answer: The sender and receiver agreeon the value used in the frame type

    field.Aspecial value is reserved for IP.

  • 8/11/2019 CS460 - CH21

    7/267

    Encapsulation In addition to placing a datagram in the data

    area of a frame, encapsulation requires the

    sender to supply the physical address of thenext computer

    Address binding: computes the appropriatehardware address (ARP - chapter 19)

    The binding translatesthe IP addressof thenext hop intoan equivalent hardwareaddress.

  • 8/11/2019 CS460 - CH21

    8/268

    SummaryA datagram is encapsulated in a frame

    The destination address in the frame isthe address of the next hop

    The destination of the next hop isobtained by translating the IP address

    of the next hop to an equivalenthardware address.

  • 8/11/2019 CS460 - CH21

    9/269

    Transmission Across An

    Internet

    Figure 21.2 - An IP datagram as it appears at each step during a tripacross an internet. Whenever it travels across a physical network, thedatagram is encapsulated in a frame appropriate to the network.

  • 8/11/2019 CS460 - CH21

    10/2610

    Transmission Across An

    Internet Encapsulation applies to one transmission at

    a time

    After the sender selects a next hop, thesender encapsulates the datagram in a frameand transmits the result across the physicalnetwork to the next hop.

    When the frame receives the next hop, thereceiving software removes the IP datagramand discards the frame.

  • 8/11/2019 CS460 - CH21

    11/2611

    Transmission Across An

    Internet Frame headers do not accumulate during a

    trip through the internet.

    Before a datagram is transmitted across agiven network, the datagram is encapsulated

    When the frame arrives at the next hop, thedatagram is removed from the incomingframe, before being routed and encapsulatedin an outgoing frame.

  • 8/11/2019 CS460 - CH21

    12/26

  • 8/11/2019 CS460 - CH21

    13/26

    13

    MTU, Datagram Size, and

    Encapsulation MTU is the Maximum Transmission Unitthe maximum amount of data that a

    frame can carry. In an Internet that connects

    heterogeneous networks, MTU

    restrictions can cause a problem

  • 8/11/2019 CS460 - CH21

    14/26

    14

    MTU, Datagram Size, and

    Encapsulation

    Figure 21.3 - An example of a router that connects two networks withdifferent MTU values. A frame that travels across the network 1 cancontain 1500 octets of data, while a frame that travels across network 2

    can contain at most 1000 octets of data.

  • 8/11/2019 CS460 - CH21

    15/26

    15

    MTU, Datagram Size, and

    EncapsulationAn IP router uses a technique known as

    fragmentationto solve the problem of

    heterogeneous MTUs. When a datagram is larger than the

    MTU, the router divides the datagram

    into smaller pieces called fragments. Each fragment is sent separately.

  • 8/11/2019 CS460 - CH21

    16/26

    16

    MTU, Datagram Size, and

    Encapsulation A bit in the FLAGS fieldindicate whether a

    datagram is a fragment or a complete

    datagram. A fragment has the same format as the other

    datagrams.

    The FRAGMENT OFFSETfield in the header ofa fragment specifies where in the originaldatagram the fragment belongs.

  • 8/11/2019 CS460 - CH21

    17/26

    17

    MTU, Datagram Size, and

    Encapsulation

    Figure 21.4 - An IP datagram divided into threefragments. Each fragment carries some data from theoriginal datagram, and has an IP header similar to the

    original datagram.

  • 8/11/2019 CS460 - CH21

    18/26

    18

    SummaryA datagram cannot be larger than the

    MTU of a network over which it is sent.

    A router divides the datagram intosmaller pieces called fragments.

    Each fragment uses the IP datagram

    format, but carries only parts of thedata.

  • 8/11/2019 CS460 - CH21

    19/26

    19

    Reassembly The process of creating a copy of the original

    datagram from fragments is calledreassembly.

    All fragments have the same destinationaddress as the original datagram.

    The fragment that carries the final piece of

    data has an additional bit set in the header. A receiver performing reassembly can tell

    whether all fragments have arrivedsuccessfully.

  • 8/11/2019 CS460 - CH21

    20/26

    20

    Reassembly

    Figure 21.5 - An example internet in which hosts can generate datagramsthat require fragmentation. Once a datagram has been fragmented, thefragments are forwarded to the final destination, which reassembles them.

  • 8/11/2019 CS460 - CH21

    21/26

  • 8/11/2019 CS460 - CH21

    22/26

  • 8/11/2019 CS460 - CH21

    23/26

    23

    Fragment Loss Recall that IP does not guarantee datagram

    delivery Some fragments may be delayed or lost Datagrams with lost fragments cannot be

    reassembled Fragments may be saved temporarily. IP specifies a maximum time to hold

    fragments. After a timer expires, saved fragments are

    discarded.

  • 8/11/2019 CS460 - CH21

    24/26

    24

    Fragmenting a Fragment If a fragment reaches another network that

    has a smaller MTU, it is possible to further

    fragment a fragment. IP does not distinguish between original

    fragments and sub fragments.

    The advantage of making all fragments thesame is that a receiver can performreassembly without first reassembling subfragments.

  • 8/11/2019 CS460 - CH21

    25/26

    25

    Summary An IP datagram is encapsulated in a network

    frame for transmission across a hardware

    network. To encapsulate a datagram, the sender

    places the entire datagram in the data area ofa network frame.

    Each network technology defines themaximum amountof data (MTU)accepted.

  • 8/11/2019 CS460 - CH21

    26/26

    26

    Summary When a router receives a datagram that

    is larger than the network MTU, the

    router divides the datagram intofragments.

    Each fragment travels to the ultimate

    destination, which is responsible forreassembling fragments into theoriginal datagram.