Data Link Layer Switching

Document Sample
Data Link Layer Switching Powered By Docstoc
					                      Internet

            Foreleser: Carsten Griwodz
              Email: griff@ifi.uio.no



10. Mar. 2004             1              INF-3190: Internet
    Internet Protocol Stack
    and Some Well-known Protocols

                                                     Application
                                                           layer

                                                       Transport
                         TCP          UDP                  layer


                             IP                         Network
                           + ICMP                          layer
                           + ARP

                                                  Data link and
                  WANs    LLC & MAC   LANs
                                                  Physical layer
                ATM        physical     MANs


10. Mar. 2004                          2       INF-3190: Internet
    Internet Protocol
   IP
        Defined for the first time in 1981
               J. Postel
               RFC 791, September 1981


   Connectionless service (datagram)
        Provide best-efforts (not guaranteed) way to transport
         datagrams
        From source to destination
        Without regard whether
               these machines are on the same network
               there are other networks in between
        Packet length
               In theory: up to 64 kBytes
               In real life: approx. 1500 Bytes


10. Mar. 2004                                3            INF-3190: Internet
    IP Segmentation/Reassembly



   Transparent segmentation




   Non-transparent segmentation
   Used in the Internet


10. Mar. 2004                      4   INF-3190: Internet
    IPv4 Datagram Format
   4 bits
                                                                     Internet Network
Version
         16 values
                                                                     Layers Headers
                     Protocol specific fields

                0       Not in use
                1       Not in use
                2       Not in use
                3       Not in use
                4       Internet Protocol, version 4
                5       Stream Protocol (ST, ST-II)
                6       Internet Protocol, version 6
                7       IPv77, TP/IX, CATNIP
                8       PIP
                9       TUBA
                                                          Version
                10      Not in use                            IPv4: dominant version
                11      Not in use                            IPv6: upcoming successor to IPv4
                12      Not in use
                13      Not in use
                14      Not in use
                15      Not in use

10. Mar. 2004                                          5                        INF-3190: Internet
     IPv4 Datagram Format
Version   IHL    Type of service                                    Header Length (IHL) (in
                                                                     32 bit words)
                                                                         at least 5 words with 32
                                                                          bit each = 20 bytes
                                                                         at most 15 words with
                                                                          32 bit each = 60 bytes
               D T R C
                                                                    Type of Service
                                      1 bit unused                      Original definition
                                      C (1 bit): low cost
                                      R (1 bit): high reliability
                                      T (1 bit): high throughput
                                      D (1 bit): low delay
                                                                    OLD definition
         Precedence (3 bit)                                             Was ignored by routers
                priority 0 (normal) ...7 (network control)
                                                                          Redefined by DiffServ
           
                                                                      
               influences the queuing scheme (and not
                routing)
10. Mar. 2004                                         6                          INF-3190: Internet
     IPv4 Datagram Format
Version   IHL         DS
                                                             DS Field
                                                                  Differentiated Services
                                                                   Field
                                                                  New definition


                        0 0

         Class selector codepoints
               If of the form xxx000



         Differentiated Services Codepoint                  NEW definition
               xxxxx0 reserved for standardization
               xxxx11 reserved for local use                     DiffServ compliant
               xxxx01 open for local use, may be                 Not widely deployed yet
                standardized later

10. Mar. 2004                                         7                    INF-3190: Internet
     IPv4 Datagram Format
Version    IHL           DS             Total length
          Identification




   Total length
         full length including the data
         stated in bytes
         all hosts must be prepared to accept datagrams of up to 576 bytes
         recommendation:
                send larger datagrams only if assured that destination can handle these
         max. 65.535 byte, often approximately 1500 byte

   Identification
         necessary for destination to determine datagram a fragment belongs to
         all fragments of a datagram contain same identification value


10. Mar. 2004                                          8                          INF-3190: Internet
     IPv4 Datagram Format
Version    IHL           DS               Total length
          Identification         DM        Fragment offset




   Flags
         1 bit unused
         DF (1 bit): don’t fragment
                Routers must be able to handle packets with 576 or fewer bytes
         MF (1 bit): more fragments
                last fragment marked 0
   Fragment offset
         offset of this fragment, i.e. the position within a datagram
         stated in multiples of 8 bytes (elementary frament unit)
         13 bits  max. 8192 fragments / datagram  max. datagram len. 65536 bytes


10. Mar. 2004                                          9                          INF-3190: Internet
       IPv4 Datagram Format
Version     IHL           DS            Total length
           Identification         DM     Fragment offset
    Time to live       Protocol




     Time To Live (TTL)
           life cycle in seconds, max. 255 sec
           when 0: drop packet, feedback to sender
           must be decremented per hop, in practical use: counts hops (not seconds)
     Protocol type of higher level protocol for transmission
           1–   ICMP       Internet Control Message Protocol
           2–   IGMP       Internet Group Management Protocol
           3–   GGP        Gateway to Gateway Protocol
           4–   IP         IP in IP tunneling
           5–   ST         ST-II in IP tunneling
           6–   TCP        TCP
           …
10. Mar. 2004                                       10                  INF-3190: Internet
       IPv4 Datagram Format
Version     IHL           DS                  Total length
           Identification             DM       Fragment offset
    Time to live       Protocol            Header checksum
                            Source address
                          Destination Address



     Header Checksum
           to detect errors generated by bad memory words inside an IS
           observed each time when datagram is received (both in IS and ES)
            if necessary datagram is dropped
           certain summation of the header words
                 addition of all 16-bit halfwords in one’s complement arithmetic
                  and use one’s complement of result (assume this field as zero upon arrival)
           must be recomputed at each hop (due to change in Time-to-Live field)
     Source Address
           sender’s IP address
     Destination Address
           receiver’s IP address

10. Mar. 2004                                             11                        INF-3190: Internet
       IPv4 Datagram Format
Version     IHL     Type of service
                    PRE      ToS              Total length           Example options
           Identification             DM       Fragment offset         security: security degree, exclusion
                                                                        of routes, ignored in practice
    Time to live       Protocol            Header checksum
                                                                       strict source routing: sender
                            Source address                              specifies exact route
                          Destination Address                          loose source routing: sender
                                                                        specifies list of routers to visit
                        Options (0 or more)
                                                           Padding     record route: store IP addresses of
                                                                        routers
                                Data                                   timestamp: like record route, but
                                                                        also timestamp added at router

     Options
           options for routing, testing and debugging
           conceptual design: as an enhancement for future versions
           variable length: each begins with 1-byte identification code
     Padding
           fill up to the word limit
     Data
           field for user data


10. Mar. 2004                                             12                          INF-3190: Internet
        IPv4 Datagram Format
      Example option: record route

              128.2.3.4     128.7.1.3
                                                            128.10.4.12    128.9.12.4
128.2.14.16                             128.7.8.9

                                                      128.10.4.2                    128.9.3.17

  Sender
                                                                                            Receiver

                            IS


 Options           P 128.2.14.16    empty
                                   128.2.3.4        128.7.8.9
                                                     empty         empty
                                                                 128.10.4.12     empty
                                                                               128.9.3.17     empty

 Payload           Record Route Option


   10. Mar. 2004                                       13                            INF-3190: Internet
    Internet Control Message Protocol (ICMP)
   History
        J. Postel
        RFC 792, Sept. 1981

   Purpose
        to communicate network layer information
               mostly error reporting
                e.g. in ftp, telnet, http appears "destination network unreachable"
               ICMP origin, e.g.:
                     a router was unable to find the given destination address
                     router sent back ICMP (Type 3) packet
                     sending host received the packet, returned error code to TCP
                     TCP returned error code to application (e.g. ftp, telnet, http)
        between hosts, routers (and gateways)

   ICMP messages are sent as IP packets
        i. e. the first 32 bits of the IP data field are ICMP headers


10. Mar. 2004                                       14                              INF-3190: Internet
    Internet Control Message Protocol (ICMP)
   Header structure                    Type        Code         Checksum



   Type
        16 types, a. o.
               destination or port or protocol unreachable
               fragmentation necessary but DF (don’t fragment) DF is set
               source route failed, redirect (for routing)
               echo-request and echo-reply (e.g. for "ping" program)
               source quench (packet for congestion control)


   Code
        states cause if type is "destination unreachable"
               e. g. net, host, protocol, port unreachable or
               fragmentation needed, source route failed

10. Mar. 2004                                  15                 INF-3190: Internet
    Internet Addresses and
    Internet Subnetworks
   Original global addressing concept for the Internet
        For addressing end systems and intermediate systems
        each network interface (not ES) has its own unique address
        5 classes

                        7                               24
           A    0    Network                           Host
                                 14                               16
           B    10             Network                           Host
                                           21                            8
           C    11 0                     Network                        Host
                                                    28
                1 11 0                       Multicast address
                                                    28
                1 1 11                           Reserved



   ICANN (Internet Corporation for Assigned Numbers and Names)
        manages network numbers
        delegates parts of the address space to regional authorities

10. Mar. 2004                                        16                        INF-3190: Internet
    Internet Address and
    Internet Subnetworks
   Networks grow and should be somehow structured
        several networks instead of one preferable
        but getting several address areas is hard
               since address space is limited
               e.g., university may have started with class B address, doesn’t get second
                one
   Problem
        class A, B, C refer to one network, not collection of LANs

 Allow a network to be split into several parts
        for internal use
        still look like single network to outside world




10. Mar. 2004                                  17                         INF-3190: Internet
            Internet Address and
            Internet Subnetworks
          Idea
                 local decision for subdividing host share
                  into subnetwork portion and end system portion

                                14               6        16   10
                  10          Network          Subnet    Host Host          To write down subnet address
  e.g. address
                                                                            with subnet mask use either
    129.8.7.2:    1 00 0 0 00 1 0 00 0 1 00 0 0 00 0 0 11 10 0 0 00 0 1 0
  Subnet mask:
                                   &                           &
                  1 11 1 1 11 1 1 11 1 1 11 1 1 11 1 1 10 00 0 0 00 0 0 0
                                                                             129.8.4.0/255.255.252.0
                                                                            or
Subnet address:   1 00 0 0 00 1 0 00 0 1 00 0 0 00 0 0 10 00 0 0 00 0 0 0    129.8.4.0/22


          Use “subnet mask” to distinguish network and subnet part from
           host part
          Routing with 3 levels of hierarchy
                 Algorithm in router
                  (by masking bits: AND between address and subnet mask):
                      packet to another network (yes, then to this router)
                      packet to local end system (yes, then deliver packet)
                      packet to other subnetwork (yes, then reroute to appropriate router)

      10. Mar. 2004                                     18                        INF-3190: Internet
    CIDR: Classless InterDomain Routing
   Subnetting not good enough
        Too many organizations require addresses
               in principle many addresses due to 32-bit address space
               but inefficient allocation due to class-based organization
                     class A network with 16 million addresses too big for most cases
                     class C network with 256 addresses is too small
                     most organizations are interested in class B network, but there are only 16384 (in
                      reality, class B too large for many organizations)
        Large number of networks leads to large routing tables

 Introduction of CIDR (Classless InterDomain Routing) (RFC1519)

   CIDR Principle
        to allocate IP addresses in variable-sized blocks
               (without regard to classes)
        e.g., request for 2000 addresses would lead to
               assignment of 2048 address block starting on 2048 byte boundary
   but, dropping classes makes forwarding more complicated

10. Mar. 2004                                       19                            INF-3190: Internet
    CIDR: Classless InterDomain Routing
   Search for longest matching prefix
        if several entries with different subnet mask length may match
               then use the one with the longest mask
        i.e., AND operation for address & mask must be done for each table
         entry

   Entries may be aggregated to reduce routing tables

                                      194.24.0.0/21     Router
                                                  194.24.8.0/22
                                                                   Router
      194.24.0.0/19    Router
                                                         Unassigned   194.24.12.0/22

                                      194.24.16.0/20      Router



10. Mar. 2004                                20                         INF-3190: Internet
    IP Version 6 (IPv6)
   Motivation for IPv6: problems with IPv4
        Too few addresses
        Bad support for QoS
        Bad support for mobility
        Many other shortcomings …
   Background & Status
        1990:     Call for Proposals
        1992:     21 variants, with 7 possible candidates
        1993:     combination of 2 candidates:
                   S. Deering and Francis (Xerox, Palo Alto)
        result:   RFC 1883-87 protocol, addressing, ICMP,
                   RFC 1825-29, newer ones appeared later
                   (RFC2460-2466)
        since 2000: possibility to expand but still debate about its future
   Status of IPv6 at IFI
        First IPv6-capable routers installed
        Should work in summer


10. Mar. 2004                             21                      INF-3190: Internet
    IPv6 Objectives
   To support billions of end systems
        longer addresses
   To reduce routing tables                 Scalability
   To simplify protocol processing
        simplified header

   To increase security
        security means integrated
   To support real-time data traffic        Addressing IPv4
        flow label, traffic class           limitations
   To provide multicasting
   To support mobility (roaming)

   To be open for change (future)
        extension headers                   Coexistance
   To coexist with existing protocols

10. Mar. 2004                           22                 INF-3190: Internet
     IPv6 vs. IPv4
Version
                                                                     Internet Network
                                                                     Layers Headers
                 Protocol specific fields

                              0       Not in use
                              1       Not in use
                              2       Not in use
                              3       Not in use
                              4       Internet Protocol, version 4
                              5       Stream Protocol (ST, ST-II)
   4 bits                    6       Internet Protocol, version 6
         16 values           7       IPv77, TP/IX, CATNIP
                              8       PIP
                              9       TUBA
                              10      Not in use
                              11      Not in use
                              12      Not in use
                              13      Not in use
                              14      Not in use
                              15      Not in use

10. Mar. 2004                                       23                          INF-3190: Internet
       IPv6 vs. IPv4
Version     IHL     Type of service
                    PRE      ToS               Total length
                                                                                IPv4 Header
           Identification             DM        Fragment offset
    Time to live       Protocol             Header checksum
                        Source address (32 bit)
                      Destination Address (32 bit)                               Protocol  Next Header
                                                                                      contains identification
                                                                                                Either transport layer protocol
                          Options (0 or more)                                            

                                                                                               Or first option



     Total Length  Payload Length
           length including the data (but
            without the 40 byte header)           Version Priority                       Flow label
                  actually a maximum of 65.535           Payload length                Next header             Hop Limit
                   byte (plus 40 byte header)
           min. 576 byte
           possibly extension via                                             Source address
            "Jumbogram" options (but then                                         (128 bit)
            no fragmentation)
           a maximum of 65.535 byte may
            not be enough for a major data
            transmission                                               Destination Address
                                                                            (128 bit)
                       IPv6 Header

10. Mar. 2004                                               25                                        INF-3190: Internet
    IPv6 vs. IPv4
          IHL             ToS
                                                             Constant header length
         Identification         DM      Fragment offset      IPv4 Type of Service
                                     Header checksum
                                                          Precedence replaced by
                                                              

                                                          priority
                   Options (0 or more)                   D T R C-Bits (QoS)
                                                          eliminated and replaced
   Identification, flags, fragment offset                by "Flow label"
      if still too large packet is sent, then error message
               L4 should then take over this task and
               transfer the PDU with the appropriate size to L3

   Header checksum
        L2 and L4 have sufficient mechanisms
        Communication channels better nowadays, at the expense of the
         performance

10. Mar. 2004                                      26                  INF-3190: Internet
    IPv6 vs. IPv4
          IHL               ToS
         Identification              DM       Fragment offset
                                           Header checksum




                          Options (0 or more)




   IPv6 options
                                                Version Priority                   Flow label
        Are not part of the                            Payload length            Next header    Hop Limit
         header
                                                                         Source address
        Follow the header                                                  (128 bit)
               Indicated by “next
                header” field
                                                                     Destination Address
                                                                          (128 bit)




10. Mar. 2004                                             27                               INF-3190: Internet
         IPv6 Header Fields
Version Priority                   Flow label
                                                                      IPv6 Header
        Payload length            Next header     Hop Limit
                                                                      Priority
                                                                           differentiation of sources
                         Source address
                                                                           lower number < lower
                                                                            priority

                     Destination Address



With flow control                               Without flow control
  0      Not characterized                       8
  1      Filler                                  9
  2      Unattended                              10
  3      Reserved                                11
                                                        Continuous rate traffic
  4      Attended bulk transfer                  12
  5      Reserved                                13
  6      Interactive                             14
  7      Internet management                     15


   10. Mar. 2004                                         28                           INF-3190: Internet
          IPv6 Header Fields
Version Priority                   Flow label
        Payload length            Next header   Hop Limit
                                                               TIME to live = Hop limit
                         Source address                             life cycle in number of
                                                                     hops, max. 255
                                                                     this may not be sufficient,
                                                                     presently usually approx.
                     Destination Address
                                                                     32 hops


    Flow Label
         Definition may still change (experimental)
         Flow = Tupel (source ID, dest ID, No.)
         Pre-defined
         Handling defined by external auxiliary protocol


    10. Mar. 2004                                      29                      INF-3190: Internet
          IPv6 Header Fields
                                                               Example options
Version Priority                   Flow label                      Hop-by-hop options
        Payload length            Next header   Hop Limit
                                                                        miscellaneous information
                                                                         for routers
                         Source address                            Routing
                                                                        full or partial route to
                                                                         follow
                                                                   Fragmentation
                     Destination Address
                                                                        management of datagram
                                                                         fragments
                                                                   Authentication
                                                                         verfication of the sender’s
     Next Header
                                                                     
                                                                        identity
         contains either                                          Encrypted security payload
          transport layer protocol                                      information about
                                                                         encrypted content
          identification
                                                                   Description options
         Or                                                            additional information for
          options                                                        the destination


    10. Mar. 2004                                      30                        INF-3190: Internet
    IPv6 Addresses
                Prefix (binary)              Usage               Fraction
                0000 0000          Reserved (including IPv4)     1/256
                0000 0001                   Unassigned           1/256
                0000 001                OSI NSAP address         1/128
                0000 010          Novell Netware IPX addresses   1/128
                0000 011                    Unassigned           1/128
                0000 1                      Unassigned            1/32
                0001                        Unassigned            1/16
                001                         Unassigned             1/8
                010                 Provider-based addresses       1/8
                011                         Unassigned             1/8
                100               Geographic-based addresses       1/8
                101                         Unassigned             1/8
                110                         Unassigned             1/8
                1110                        Unassigned            1/16
                1111 0                      Unassigned            1/32
                1111 10                     Unassigned            1/64
                1111 110                    Unassigned           1/128
                1111 1110 0                 Unassigned           1/512
                1111 1110 10         Link local use addresses    1/1024
                1111 1110 11          Site local use address     1/1024
                1111 1111                    Multicast           1/256
10. Mar. 2004                                        31                     INF-3190: Internet
    IPv6 Addresses and Anycast
   Provider based: approx. 16 mio. companies allocate addresses
   Geographically based: allocation as it is today
   Link, site-used: address has only local importance (security, Firewall
    concept)
        Should make NAT (network address translation) useless

   Anycast definition
        previously
               unicast, broadcast and multicast
        now (new)
               anycast
        send data to one member of a group
               for example to the member which is the nearest one geographically
               i.e. a system within a pre-defined group is to be accessed


   Anycast application
        To search for the nearest web-server
        To locate the nearest router of a multicast group
               in order to participate in group communication


10. Mar. 2004                                      32                          INF-3190: Internet

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:5
posted:10/4/2011
language:Norwegian
pages:31