Document Sample
ip Powered By Docstoc
					IP addressing and IPv6

       Sept. 13, 2004

 TCP/IP Protocol Suite

                        TCP        UDP

               ICMP           IP     IGMP

                    ARP            RARP


Computer Network Lab.
 IP Packet Format

         0             4           8              16           19                      31

             Version       HLen         TOS                          Length

                           Ident                       Flags            Offset

                   TTL                 Protocol                     Checksum



                             Options (variable)                              Pad

Computer Network Lab.
 Fragmentation and Reassembly

    H1                R1                    R2                  R3              H8

      ETH IP (1400)        FDDI IP (1400)        PPP IP (512)        ETH IP (512)

                                                 PPP IP (512)        ETH IP (512)

                                                 PPP IP (376)        ETH IP (376)

Computer Network Lab.
    Ethernet address is flat.
    IP address is hierarchical.

                            7                     24

             (a)   0    Network                  Host

                                  14                     16

             (b)   1    0       Network                 Host

                                          21                   8

             (c)   1    1   0          Network                Host

Computer Network Lab.
 Datagram Forwarding in IP

 For a router
 if (NetworkNum of destination = NetworkNum of one of my interface) then
    deliver packet to destination over that interface
    if (NetworkNum of destination is in my forwarding table) then
        deliver packet to NextHop router
        deliver packet to default router
 For a host
 if (NetworkNum of destination = my NetworkNum) then
    deliver packet to destination directly
    deliver packet to default router

Computer Network Lab.
 ICMP Features

    ICMP: Used by IP to send error and control
    ICMP uses IP to send its messages
    ICMP does not report errors on ICMP messages.
    ICMP message are not required on datagram
     checksum errors. (Some implementations still do)

Computer Network Lab.
 ICMP Message Format

8-bit type of    8-bit error        16-bit checksum
   message           code

            (contents depends on type and code)

Computer Network Lab.
 ICMP: Message Types

               Type     description
               0        echo reply (ping)
               3        destination unreachable
               4        source quench
               5        redirect
               8        echo request (ping)
               9        route advertisement
               10       router discovery
               11       TTL expired
               12       bad IP header
               13       timestamp request
               14       timestamp reply
               15       information request
               16       information reply
               17       address mask request
               18       address mask reply

Computer Network Lab.
 ICMP Messages

  Source Quench: Please slow down! I just dropped one
   of your datagrams.
  Time Exceeded: Time to live field in one of your
   packets became zero. or Reassembly timer expired at
   the destination.
  Fragmentation Required: Datagram was longer than MTU
   and “No Fragment bit” was set.
  Address Mask Request/Reply: What is the subnet mask
   on this net? Replied by “Address mask agent”

Computer Network Lab.
 Destination Unreachable

        code   Meaning

          0    network unreachable
          1    host unreachable
          2    protocol unreachable
          3    port unreachable
          4    fragmentation needed but don’t fragment bit set
          5    source route failed
          6    destination network unknown
          7    destination host unknown
          8    source host isolated
          9    destination network administratively prohibited
         10    destination host administratively prohibited
         11    network unreachable for TOS
         12    host unreachable for TOS

Computer Network Lab.
 Other ICMP Messages
    Redirect: Please send to router X instead of me.
         0   =   Redirect   datagrams   for   the   network
         1   =   Redirect   datagrams   for   the   host
         2   =   Redirect   datagrams   for   the   type of service and net
         3   =   Redirect   datagrams   for   the   type of service and host

    Time Stamp Request/Reply:

type (13 or 14)           code(0)                        checksum

             identifier                               sequence number

                          32-bit originate timestamp

                            32-bit receive timestamp

                            32-bit transmit timestamp

Computer Network Lab.
        IP version 6
- IP Next Generation (IPng)

  Related RFCs
RFC    Title                                                 Date
1752   The recommendation for the IP Next Generation         Jan 1995
1809   Using the flow label in IPv6                          Jun 1995
1881   IPv6 address allocation management                    Dec 1995
1883   IPv6 specification                                    Dec 1995
1884   IPv6 addressing architecture                          Dec 1995
1885   ICMPv6 for the IPv6 specification                     Dec 1995
1886   DNS extensions to support IPv6                        Dec 1995
1887   An architecture for IPv6 unicast address allocation   Dec 1995
1897   IPv6 testing address allocation                       Jan 1996
1924   A compact representation of Ipv6 addresses            Apr 1996
1933   Transition mechanisms for IPv6 hosts and routers      Apr 1996

 Computer Network Lab.
 IPng Considerations
    Addressing
      the two level structure of the IP address is
       convenient but wasteful of address spaces.
      it is general practice to assign a unique network
       number to an IP network whether or not it is
       actually connected to the Internet.
      networks are proliferating rapidly.
      growth of TCP/IP usage in new areas will result in
       a rapid growth in the demand for unique IP
    Performance
      reduced number of fields in the IPv6 packet header
      fixed length of header – extension header
      disabling fragmentation

Computer Network Lab.
 IPng Considerations
    Network service
      should be possible to associate packets with
       particular services classes – flow label
    Addressing flexibility
      anycast – delivered to just one of a set of nodes
      multicast – improved scalability by a scope filed
    Security capabilities
      providing authentication and privacy

Computer Network Lab.
 IPv6 Packet Header
            0             4                   12    16                24              31
                Version        TrafficClass               FlowLabel

                              PayloadLen                 NextHeader        HopLimit



                                           Next header/data

Computer Network Lab.
 Extension Headers
    Hop-by-hop options header
      defines special options that require hop-by-hop
    Routing header
      provides extended routing, similar to IPv4 source
    Authentication header
      provides packet integrity and authentication
    Encapsulating security payload header
      provides privacy
    Destination options header
      contains optional information to be examined by
       the destination node

Computer Network Lab.
 Priority Field
    One bit for two classes
      congestion controlled traffic
      non-congestion controlled traffic
    Three bits for eight priorities in each class

Computer Network Lab.
 Flow Label
    a flow is a sequence of packets that
      are generated from a single application instance
       from the source’s point of view
      share attributes which affect how they are handled
       from the router’s point of view
    Rules for flow label
      hosts or routers that do not support the flow
       label field must
        • set the field to zero when originating a packet
        • pass the filed unchanged when forwarding a packet
        • ignore the filed when receiving a packet
      all the packets with the same non-zero flow label
       must have the same destination address, source
       address, priority, hop-by-hop options header
       contents and routing header contents.
      the source assigns a flow label to a flow.

Computer Network Lab.
    128 bit address space
    Address notation:

      3        m            n             o            p       125– m– n– o– p

     010   RegistryID   ProviderID   SubscriberID   SubnetID    InterfaceID

Computer Network Lab.
 Address Prefix Assignment

Prefix     Use                 Prefix         Use
0000 0000 Reserved             101            Unassigned
0000 0001 Unassigned           110            Unassigned
0000 001   Reserved for NSAP   1110           Unassigned
0000 010   Reserved for IPX    11110          Unassigned
0000 011   Unassigned          1111 0         Unassigned
0000 1     Unassigned          1111 10        Unassigned
0001       Unassigned          1111 110       Unassigned
001        Unassigned          1111 1110 0    Unassigned
010        Unicast address     1111 1110 10   Link local use
011        Unassigned          1111 1110 11   Site local use
100        Unassigned          1111 1111      Multicast

Computer Network Lab.
 Multicast Address

        8        4     4             112

     11111111   Flags Scope        Group ID

    flags field
      consists of three zeros followed by a T bit with:
        • T = 0 to indicates a permanently assigned or well-
          known multicast address, assigned by the global
          internet numbering authority
        • T = 1 to indicates a nunpermanently-assigned or
          transient multicast address
    Scope field to limit the scope of the multicast
      0:reserved, 1:node-local, 2:link-local, 5:site-
       local, 8:organization-local, 14:global

Computer Network Lab.
    Delivery method:
      unicast: one-to-one
      multicast: one-to-many
      broadcast: one-to-all
      anycast: one-to-one-of-many
    Anycast address: an address assigned to
     multiple hosts
    Restrictions:
      do not use in the source address field
      only assign to routers but not hosts
    Applications of anycast
      server selection
      service location

Computer Network Lab.
 Challenges in Anycast
    Global routing
      anycast defeats the advantages of aggregated
      Global IP Anycast (GIA) has been proposed
    Supporting stateful connections
      anycast is naturally inappropriate for stateful
       connection such as TCP
      proposals:
        • use only stateless connection protocol such as UDP
        • five-way handshake
        • source id option

Computer Network Lab.
 Evaluating IPv6
    Test setup
      Two Intel Pentium III 500 Mhz PCs
      100 Mbps PCI Ethernet adapter
      Both Windows 2000 Professional and Solaris 8.0
    Metrics
      throughput
      round-trip time
      CPU utilization
      socket-creation time
      TCP-connection time
      client-server interactions

Computer Network Lab.

Computer Network Lab.

Computer Network Lab.
 Socket Creation and TCP Connection

Computer Network Lab.

Shared By: