l9cn : network layer: internet protocol

Upload: ahmad-shdifat

Post on 05-Apr-2018

228 views

Category:

Documents


1 download

TRANSCRIPT

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    1/17

    Internet Protocol

    Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.20.1

    2020--11 INTERNETWORKINGINTERNETWORKING

    connectingconnecting networksnetworks togethertogether toto makemake ananinternetworkinternetwork oror anan internetinternet..

    Topics discussed in this section:Topics discussed in this section:

    Internet as a Datagram Network

    Internet as a Connectionless Network

    20.2

    . n s e ween wo os s

    20.3

    . e wor ayer n an n erne wor

    20.4

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    2/17

    . e wor ayer a e source, rou er, an es na on

    20.5

    . e wor ayer a e source, rou er, an es na on con nue

    20.6

    Note

    w c ng a e ne wor ayer n eInternet uses the datagram approach to

    pac e sw c ng.

    20.7

    Note

    ommun ca on a e ne wor ayer nthe Internet is connectionless.

    20.8

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    3/17

    Two Key Network-Layer Functions

    analo :

    packets from routersinput to appropriate

    routing: process oflannin tri from

    router output

    source to dest

    forwardin : rocess ofroute taken by packetsfrom source to dest.

    getting through singleinterchange

    routing algorithms

    20.9

    Interplay between routing and forwarding

    routing algorithm

    local forwarding table

    header

    value

    output

    link0100 3010101111001

    221

    10111

    value in arrivingpackets header

    23

    20.10

    Router Architecture Overview

    Two key router functions: run routing algorithms/protocol (RIP, OSPF, BGP)

    forwardingdatagrams from incoming to outgoing link

    20.11

    Physical layer:bit-level reception

    given datagram dest., lookup output port

    using forwarding table in input portmemor

    a a n ayer:e.g., Ethernet

    goal: complete input port processing at line

    speed queuing: if datagrams arrive faster than

    forwarding rate into switch fabric

    20.12

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    4/17

    Three types of switching fabrics

    20.13

    Switching Via Memory

    First generation routers:

    traditional computers with switching under direct

    control of CPUpacket copied to systems memory

    per datagram)

    Input OutputMemory

    Port Port

    System Bus

    20.14

    Switc ing Via a Bus

    datagram from input port memoryto output port memory via a sharedbus

    us con en on: sw c ng speelimited by bus bandwidth

    32 Gb s bus Cisco 5600: sufficientspeed for access and enterprise

    routers

    20.15

    Switchin Via An Interconnection Network

    overcome bus bandwidth limitations

    Ban an networks other interconnection nets initialldeveloped to connect processors in multiprocessor

    advanced design: fragmenting datagram into fixed, .

    Cisco 12000: switches 60 Gbps through theinterconnection network

    20.16

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    5/17

    Output Ports

    Bufferingrequired when datagrams arrive from fabric

    Scheduling disciplinechooses among queueddata rams for transmission

    20.17

    Output port queueing

    line speed

    queueing (delay) and loss due to output port bufferoverflow!

    20.18

    How much buffering?

    buffering equal to typical RTT (say 250

    e.g., C = 10 Gps link: 2.5 Gbit buffer

    ecen recommen a on: w ows,buffering equal to RTT C.

    N

    20.19

    Input Port Queuing

    Fabric slower than input ports combined -> queueingmay occur at input queues

    Head-of-the-Line (HOL) blocking: queued datagram at

    front of queue prevents others in queue from moving

    queueing delay and loss due to input buffer overflow!

    20.20

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    6/17

    2020--22 IPvIPv44

    mechanismmechanism usedused byby thethe TCP/IPTCP/IP protocolsprotocols..

    Topics discussed in this section:Topics discussed in this section:

    Fragmentation

    Checksum

    Options

    20.21

    The Internet Network layer

    Host, router network layer functions:

    Routing protocolsIP protocol

    Transport layer: TCP, UDP

    path selection

    RIP, OSPF, BGP

    datagram formatpacket handling conventions

    Networklayer

    orwar ngtable

    ICMP protocol

    error reporting

    router signaling

    Link layer

    physical layer

    20.22

    . os on o v n pro oco su e

    20.23

    . v a agram orma

    20.24

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    7/17

    IP datagram format

    ver length

    32 bitspro oco vers on

    number

    header length(bytes)

    total datagramlength (bytes)

    head.len

    type ofservice

    16-bit identifier

    headerchecksum

    time tolive

    max numberremaining hops

    fragmentation/reassembly

    type of dataflgs

    fragmentoffset

    upperlayer

    32 bit source IP address(decremented at

    each router)

    u er la er rotocol32 bit destination IP address

    data(variable length,

    to deliver payload to Options (if any) E.g. timestamp,

    record routetaken, specifyhow much overhead

    or UDP segment)

    to visit.

    20 bytes of TCP

    20 bytes of IP

    = 40 bytes + app

    layer overhead

    20.25

    . erv ce ype or eren a e serv ces

    20.26

    Note

    e prece ence su e was par oversion 4, but never used.

    20.27

    Table 20.1 Types of service

    20.28

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    8/17

    Table 20.2 Default types of service

    20.29

    Note

    e o a eng e e nes e o alength of the datagram including the

    ea er.

    20.30

    . ncapsu a on o a sma a agram n an erne rame

    20.31

    . ro oco e an encapsu a e a a

    20.32

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    9/17

    Table 20.4 Protocol values

    20.33

    Example 20.1

    An IPv4 packet has arrived with the first 8 bits as

    shown:

    01000010The receiver discards the packet. Why?

    Solution

    There is an error in this acket. The 4 leftmost bits

    (0100) show the version, which is correct. The next 4

    bits (0010) show an invalid header length (2 4 = 8).

    The minimum number of bytes in the header must be20. The packet has been corrupted in transmission.

    20.34

    Example 20.3

    In an IPv4 packet, the value of HLEN is 5, and the

    value of the total len th field is 0x0028. How man

    bytes of data are being carried by this packet?

    Solution

    The HLEN value is 5 which means the total number of

    bytes in the header is 5 4, or 20 bytes (no options).The total length is 40 bytes, which means the packet is

    carrying20bytes of data (4020).

    20.35

    . ax mum rans er un

    20.36

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    10/17

    . s or some ne wor s

    20.37

    IP Fragmentation & Reassembly

    network links have MTU(max.transfer size) - largestpossible link-level frame.

    different link types, differentMTUs

    fragmentation:

    in: one large datagram

    arge a agram v e(fragmented) within net

    one datagram becomesseveral data rams

    reassembled only at finaldestination

    IP header bits used to

    reassembly

    identify, order relatedfragments

    20.38

    . ags use n ragmen a on

    20.39

    IP Fragmentation and Reassembly

    ID=

    offsetfragflaglength=

    One large datagram becomes

    several smaller datagrams

    xamp e

    4000 byte datagram

    MTU = 1500 bytes

    ID=x

    offset

    =0

    fragflag

    =1

    length=1500

    ID

    =xoffset=185

    fragflag=1

    length

    =1500

    data field

    offset =

    ID

    =xoffset=370

    fragflag=0

    length

    =1040

    1480/8

    20.40

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    11/17

    . ragmen a on examp e

    20.41

    Figure 20.12 Detailed fragmentation example

    20.42

    Reassembly

    When the fragments arrive what strategy should be

    used to reassemble them? the ma be out of order

    Solution

    1. The fist fra ment has an offset field value of zero.2. Divide the length of the first fragment by 8. The

    second fragment has an offset value equal to that result.

    . .

    The third fragment has an offset value equal to that result.

    4. Continue the process. The last fragment has a more bit value

    of 0.

    20.43

    . axonomy o op ons n v

    20.44

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    12/17

    2020--33 IPvIPv66

    TheThe networknetwork layerlayer protocolprotocol inin thethe TCP/IPTCP/IP protocolprotocol

    suitesuite isis currentlycurrently IPvIPv44.. AlthoughAlthough IPvIPv44 isis wellwell

    designed,designed, datadata communicationcommunication hashas evolvedevolved sincesince thethe

    ..

    deficienciesdeficiencies thatthat makemake itit unsuitableunsuitable forfor thethe fastfast--

    rowinrowin InternetInternet..

    Topics discussed in this section:Topics discussed in this section:

    AdvantagesPacket Format

    20.45

    Initial motivation: 32-bit address space

    soon to be completely allocated.Additional motivation:

    header format helps speedprocessing/forwarding

    header changes to facilitate QoS

    IPv6 data ram format:

    fixed-length 40 byte header

    20.46

    IPv6 Header (Cont)

    Priority: identify priority among datagrams in flow .

    (concept offlow not well defined).

    Next header:identify upper layer protocol for data

    20.47

    Advantages of IPv6

    1. Better address space

    2. Better header format

    3. New options

    4. Allowance of extension

    5. Support for resource allocation

    6. Support for more security20.48

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    13/17

    . v a agram ea er an pay oa

    20.49

    Figure 20.16 Format of an IPv6 datagram

    20.50

    Other Changes from IPv4

    processing time at each hop

    , ,indicated by Next Header field

    ICMPv6:new version of ICMP

    additional message types, e.g. Packet TooBig

    multicast group management functions

    20.51

    Table 20.6 Next header codes for IPv6

    20.52

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    14/17

    Table 20.7 Priorities for congestion-controlled traffic

    20.53

    . r or es or nonconges on-con ro e ra c

    20.54

    Table 20.9 Comparison between IPv4 and IPv6 packet headers

    20.55

    . x ens on ea er ypes

    20.56

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    15/17

    Table 20.10 Comparison between IPv4 options and IPv6 extension headers

    20.57

    2020--44 TRANSITION FROM IPvTRANSITION FROM IPv44 TO IPvTO IPv66

    BecauseBecause of of thethe hugehuge numbernumber of of systemssystems onon thethe

    n erne ,n erne , e e rans onrans on roro vv oo vv cannocanno

    happenhappen suddenlysuddenly.. ItIt takestakes aa considerableconsiderable amountamount ofof

    fromfrom IPvIPv44 toto IPvIPv66.. TheThe transitiontransition mustmust bebe smoothsmooth toto

    preventprevent anyany problemsproblems betweenbetween IPvIPv44 andand IPvIPv66

    systemssystems..

    Dual Stack

    Tunnelin

    Header Translation

    20.58

    Transition From IPv4 To IPv6

    simultaneous

    How will the network operate with mixed IPv4

    Tunneling:IPv6 carried as payload in IPv4

    20.59

    . ree rans on s ra eg es

    20.60

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    16/17

    . ua s ac

    20.61

    . unne ng s ra egy

    20.62

    Tunneling

    A B E F

    IPv6 IPv6 IPv6 IPv6

    tunnelLogical view:

    Physical view:

    A B E FC D

    IPv6 IPv6 IPv6 IPv6IPv4 IPv4

    Flow: XSrc: ADest: F

    Flow: XSrc: ADest: F

    Src:BDest: E

    Src:BDest: E

    data data

    Flow: XSrc: ADest: F

    data

    Flow: XSrc: ADest: F

    data

    A-to-B: E-to-F:v IPv6- -

    IPv6 insideIPv4

    - -IPv6 inside

    IPv4

    20.63

    . ea er rans a on s ra egy

    20.64

  • 7/31/2019 L9CN : Network Layer: Internet Protocol

    17/17

    Table 20.11 Header translation

    20.65