Docstoc

Routing

Document Sample
Routing Powered By Docstoc
					                            Routing

       Outline
              Algorithms
              Scalability




Spring 2004                 Computer Networks   1
                          Overview
• Forwarding vs Routing
     – forwarding: to select an output port based on
       destination address and routing table
     – routing: process by which routing table is built
• Network as a Graph




• Problem: Find lowest cost path between two nodes
• Factors
     – static: topology
     – dynamic: load
Spring 2004                Computer Networks              2
                  Distance Vector
• Each node maintains a set of triples
     – (Destination, Cost, NextHop)
• Exchange updates directly connected neighbors
     – periodically (on the order of several seconds)
     – whenever table changes (called triggered update)
• Each update is a list of pairs:
     – (Destination, Cost)
• Update local table if receive a “better” route
     – smaller cost
     – came from next-hop
• Refresh existing routes; delete if they time out
Spring 2004              Computer Networks                3
              Example
                                  B

                                  Destination Cost NextHop
                                      A        1     A
                                      C        1     C
                                      D        2     C
                                      E        2     A
                                      F        2     A
                                      G        3     A




Spring 2004   Computer Networks                          4
Round 1

              Distance to Reach Node                                   Distance to Reach Node

         A     B    C   D      E       F   G                       A    B    C   D      E       F   G

   A     0     1    1    ∞     1       1   ∞                   A   0    1    1    ∞     1       1   ∞
   B     1     0    1    ∞     ∞       ∞   ∞                   B   1    0    1    ∞     2       2   ∞
   C     1     1    0    1     ∞       ∞   ∞                   C   1    1    0    1     2       2   ∞
   D     ∞     ∞    1    0     ∞       ∞   1                   D   ∞    ∞    1    0     ∞       ∞   1
   E     1     ∞    ∞    ∞     0       ∞   ∞                   E   1    2    2    ∞     0       2   ∞
   F     1     ∞    ∞    ∞     ∞       0   1                   F   1    2    2    ∞     2       0   1
   G     ∞     ∞    ∞    1     ∞       1   0                   G   ∞    ∞    ∞    1     ∞       1   0




  A sends a message to B C E F                                     B C E F update




Spring 2004                                Computer Networks                                            5
              Distance to Reach Node                                   Distance to Reach Node

        A      B    C   D      E       F   G                       A    B    C   D      E       F   G

  A     0      1    1    ∞     1       1   ∞                   A   0    1    1    ∞     1       1   ∞
  B     1      0    1    ∞     2       2   ∞                   B   1    0    1    ∞     2       2   ∞
  C     1      1    0    1     2       2   ∞                   C   1    1    0    1     2       2   ∞
  D     ∞      ∞    1    0     ∞       ∞   1                   D   ∞    ∞    1    0     ∞       ∞   1
  E     1      2    2    ∞     0       2   ∞                   E   1    2    2    ∞     0       2   ∞
  F     1      2    2    ∞     2       0   1                   F   1    2    2    ∞     2       0   1
  G     ∞      ∞    ∞    1     ∞       1   0                   G   ∞    ∞    ∞    1     ∞       1   0




 B sends a message to A C                                      AC      update




Spring 2004                                Computer Networks                                            6
              Distance to Reach Node                                      Distance to Reach Node

        A      B    C   D      E       F   G                        A      B    C   D      E       F   G

  A     0      1    1    ∞     1       1   ∞                   A    0      1    1    2     1       1   ∞
  B     1      0    1    ∞     2       2   ∞                   B    1      0    1    2     2       2   ∞
  C     1      1    0    1     2       2   ∞                   C    1      1    0    1     2       2   ∞
  D     ∞      ∞    1    0     ∞       ∞   1                   D    2      2    1    0     3       3   1
  E     1      2    2    ∞     0       2   ∞                   E    1      2    2    ∞     0       2   ∞
  F     1      2    2    ∞     2       0   1                   F    1      2    2    ∞     2       0   1
  G     ∞      ∞    ∞    1     ∞       1   0                   G    ∞      ∞    ∞    1     ∞       1   0




C sends a message to A BD                                          A BD        update




Spring 2004                                Computer Networks                                               7
              Distance to Reach Node                                   Distance to Reach Node

        A      B    C   D      E       F   G                       A    B    C   D      E       F   G

  A     0      1    1    2     1       1   ∞                   A   0    1    1    2     1       1   ∞
  B     1      0    1    2     2       2   ∞                   B   1    0    1    2     2       2   ∞
  C     1      1    0    1     2       2   ∞                   C   1    1    0    1     2       2   2
  D     2      2    1    0     3       3   1                   D   2    2    1    0     3       3   1
  E     1      2    2    ∞     0       2   ∞                   E   1    2    2    ∞     0       2   ∞
  F     1      2    2    ∞     2       0   1                   F   1    2    2    ∞     2       0   1
  G     ∞      ∞    ∞    1     ∞       1   0                   G   3    3    2    1     4       1   0




D sends a message to C G                                       CG      update




Spring 2004                                Computer Networks                                            8
              Distance to Reach Node                                   Distance to Reach Node

        A      B    C   D      E       F   G                       A    B    C   D      E       F   G

  A     0      1    1    2     1       1   ∞                   A   0    1    1    2     1       1   ∞
  B     1      0    1    2     2       2   ∞                   B   1    0    1    2     2       2   ∞
  C     1      1    0    1     2       2   2                   C   1    1    0    1     2       2   2
  D     2      2    1    0     3       3   1                   D   2    2    1    0     3       3   1
  E     1      2    2    ∞     0       2   ∞                   E   1    2    2    ∞     0       2   ∞
  F     1      2    2    ∞     2       0   1                   F   1    2    2    ∞     2       0   1
  G     3      3    2    1     4       1   0                   G   3    3    2    1     4       1   0




  E sends a message to A                                       A update




Spring 2004                                Computer Networks                                            9
              Distance to Reach Node                                     Distance to Reach Node

        A      B    C   D      E       F   G                         A    B    C   D      E       F   G

  A     0      1    1    2     1       1   ∞                   A     0    1    1    2     1       1   2
  B     1      0    1    2     2       2   ∞                   B     1    0    1    2     2       2   ∞
  C     1      1    0    1     2       2   2                   C     1    1    0    1     2       2   2
  D     2      2    1    0     3       3   1                   D     2    2    1    0     3       3   1
  E     1      2    2    ∞     0       2   ∞                   E     1    2    2    ∞     0       2   ∞
  F     1      2    2    ∞     2       0   1                   F     1    2    2    ∞     2       0   1
  G     3      3    2    1     4       1   0                   G     2    3    2    1     3       1   0




  F sends a message to A G                                         A G update




Spring 2004                                Computer Networks                                          10
              Distance to Reach Node                                    Distance to Reach Node

        A      B    C   D      E       F   G                        A    B    C   D      E       F   G

  A     0      1    1    2     1       1   2                   A    0    1    1    2     1       1   2
  B     1      0    1    2     2       2   ∞                   B    1    0    1    2     2       2   ∞
  C     1      1    0    1     2       2   2                   C    1    1    0    1     2       2   2
  D     2      2    1    0     3       3   1                   D    2    2    1    0     3       2   1
  E     1      2    2    ∞     0       2   ∞                   E    1    2    2    ∞     0       2   ∞
  F     1      2    2    ∞     2       0   1                   F    1    2    2    2     2       0   1
  G     2      3    2    1     3       1   0                   G    2    3    2    1     3       1   0




  G sends a message to F D                                         F D update




Spring 2004                                Computer Networks                                         11
Round 2
              Distance to Reach Node                                   Distance to Reach Node

        A      B    C   D      E       F   G                       A    B    C   D      E       F   G

  A     0      1    1    2     1       1   2                   A   0    1    1    2     1       1   2
  B     1      0    1    2     2       2   ∞                   B   1    0    1    2     2       2   3
  C     1      1    0    1     2       2   2                   C   1    1    0    1     2       2   2
  D     2      2    1    0     3       2   1                   D   2    2    1    0     3       2   1
  E     1      2    2    ∞     0       2   ∞                   E   1    2    2    3     0       2   3
  F     1      2    2    2     2       0   1                   F   1    2    2    2     2       0   1
  G     2      3    2    1     3       1   0                   G   2    3    2    1     3       1   0




A sends a message to B C E F                                       B C E F update




Spring 2004                                Computer Networks                                        12
              Distance to Reach Node                                   Distance to Reach Node

        A      B    C   D      E       F   G                       A    B    C   D      E       F   G

  A     0      1    1    2     1       1   2                   A   0    1    1    2     1       1   2
  B     1      0    1    2     2       2   3                   B   1    0    1    2     2       2   3
  C     1      1    0    1     2       2   2                   C   1    1    0    1     2       2   2
  D     2      2    1    0     3       2   1                   D   2    2    1    0     3       2   1
  E     1      2    2    3     0       2   3                   E   1    2    2    3     0       2   3
  F     1      2    2    2     2       0   1                   F   1    2    2    2     2       0   1
  G     2      3    2    1     3       1   0                   G   2    3    2    1     3       1   0




B sends a message to A C                                       AC      update




Spring 2004                                Computer Networks                                        13
                         Routing Loops
• Example 1
     –   F detects that link to G has failed
     –   F sets distance to G to infinity and sends update t o A
     –   A sets distance to G to infinity since it uses F to reach G
     –   A receives periodic update from C with 2-hop path to G
     –   A sets distance to G to 3 and sends update to F
     –   F decides it can reach G in 4 hops via A
• Example 2
     –   link from A to E fails
     –   A advertises distance of infinity to E
     –   B and C advertise a distance of 2 to E
     –   B decides it can reach E in 3 hops; advertises this to A
     –   A decides it can read E in 4 hops; advertises this to C
     –   C decides that it can reach E in 5 hops…
Spring 2004                      Computer Networks                     14
              Loop-Breaking Heuristics

    • Set infinity to 16
    • Split horizon
    • Split horizon with poison reverse




Spring 2004            Computer Networks   15
              RIP format




Spring 2004    Computer Networks   16
                       Link State
• Strategy
     – send to all nodes (not just neighbors)
       information about directly connected links (not
       entire routing table)
• Link State Packet (LSP)
     –   id of the node that created the LSP
     –   cost of link to each directly connected neighbor
     –   sequence number (SEQNO)
     –   time-to-live (TTL) for this packet


Spring 2004              Computer Networks              17
                      Link State (cont)

• Reliable flooding
     – store most recent LSP from each node
     – forward LSP to all nodes but one that sent it
     – generate new LSP periodically
              • increment SEQNO
     – start SEQNO at 0 when reboot
     – decrement TTL of each stored LSP
              • discard when TTL=0


Spring 2004                  Computer Networks         18
                      Route Calculation
• Dijkstra’s shortest path algorithm
• Let
     –   N denotes set of nodes in the graph
     –   l (i, j) denotes non-negative cost (weight) for edge (i, j)
     –   s denotes this node
     –   M denotes the set of nodes incorporated so far
     –   C(n) denotes cost of the path from s to node n
   M = {s}
   for each n in N - {s}
      C(n) = l(s, n)
   while (N != M)
      M = M union {w} such that C(w) is the minimum for
          all w in (N - M)
      for each n in (N - M)
         C(n) = MIN(C(n), C (w) + l(w, n ))

Spring 2004                      Computer Networks                     19
Spring 2004   Computer Networks   20
                         Metrics
• Drawbacks for hop count
     – Does not distinguish links’ latency
     – Does not distinguish links’ capacity
     – Does not distinguish links’ load




Spring 2004               Computer Networks   21
                               Metrics
• Original ARPANET metric
     – measures number of packets enqueued on each link
     – took neither latency or bandwidth into consideration
• New ARPANET metric
     – stamp each incoming packet with its arrival time (AT)
     – record departure time (DT)
     – when link-level ACK arrives, compute
              Delay = (DT - AT) + Transmit + Latency
     – if timeout, reset DT to departure time for retransmission
     – link cost = average delay over some time period
• Fine Tuning
     – compressed dynamic range
     – replaced Delay with link utilization
Spring 2004                    Computer Networks               22
Spring 2004   Computer Networks   23
        The problem when MH moves
• locality of IP address
     – the network-prefix of IP address will represent an
       unique subnet
     – all the packets with the same network-prefix will be
       routed to the same place
• unchange IP address
     – packets will be routed to home network, so loose route
• change IP address
     – connection broken
     – need to update all DNS server
Spring 2004               Computer Networks                   24
                    Mobile IP
• Agent Discovery
• Registration
• Tunneling




Spring 2004          Computer Networks   25
              Terminology




Spring 2004     Computer Networks   26
                  Protocol Overview
• Agent Discovery
     – agent send agent advertisement on the link
     – after received agent advertisement, MH determines whether it is at
       home or foreign
• Registraion
     – while MH away home, it should registers to its home agent with
       new care-of address
• Tunneling
     – datagram send to this MH will be intercepted by HA and tunneled
       to the care-of address
     – FA received and detunneled to MN

Spring 2004                   Computer Networks                         27
              Agent Discovery




Spring 2004       Computer Networks   28
                           Registration

• Registration Message
     – by UDP port 434
     – Registration Request
     – Registration Reply
• Registration Procedure
     –   MH send Registration Request to FA
     –   FA relay this message to HA
     –   HA send Registration Reply to FA
     –   FA relay to MH




Spring 2004                   Computer Networks   29
  Registration Procedure - Request
                 (1)


                                           CN




              Home Network                                   Foreign Network

                                                                         1


                                        Internet
                                                                               MH
                        HA                                      FA
                   140.113.207.86                       140.113.167.206 140.113.207.48




Spring 2004                         Computer Networks                                    30
                              Deregistration

                                            CN




              Home Network                           Foreign Network

       MH        1
                                                                       MH




                         HA                           FA




Spring 2004                      Computer Networks                          31
              Tunneling




Spring 2004    Computer Networks   32
                                Tunneling
• encapsulation type
     – IP-in-IP encapsulation
              • RFC 2003
              • the protocol field in the IP header is 4
     – Minimal encapsulation
              • RFC 2004
              • the protocol field in the IP header is 55
     – GRE(Generic Routing Encapsulation)
              • RFC 1701
              • the protocol field in the IP header is 47

Spring 2004                         Computer Networks       33
              Triangle Routing




Spring 2004       Computer Networks   34
              Extreme Example (solution)




Spring 2004            Computer Networks   35
                           Internet Structure
Recent Past


          Stanford                       NSFNET backbone
                                                                             ISU
                    BARRNET                                      MidNet
                     regional          Westnet                   regional
                                       regional
         Berkeley
                        PARC                               UNL              KU
                                NCAR              UNM

                                          UA




Spring 2004                            Computer Networks                           36
               Global Internet
• The provider networks are built from a large
  number of point2point links (e.g., DS-3 or OC-3)
  that connect to routers.
• The end users (e.g., Standford) consists of
  multiple physical networks connected by routers
  or bridges.
• Autonomous system (AS)


Spring 2004         Computer Networks                37
                     Scaling Issues
• Scalability of routing
     – We need to find ways to minimize the number of
       network numbers that get carried around in routing
       protocols and stored in the routing tables of routers.
• Address utilization
     – Make sure that the IP address space does not get
       consumed too quickly.




Spring 2004                Computer Networks                    38
              How to Make Routing Scale
• Still Too Many Networks
     – routing tables do not scale
     – route propagation protocols do not scale
• Consider class B
     – Big forwarding table  slower to search  degrade
       router performance




Spring 2004               Computer Networks                39
                       Subnetting
• Add another level to address/routing hierarchy: subnet
• Subnet masks define variable partition of host part
• Subnets should be close to each other. Subnets visible only
  within site
               Network number           Host number

                          Class B address

              111111111111111111111111        00000000

                    Subnet mask (255.255.255.0)

               Network number     Subnet ID    Host ID

                         Subnetted address
Spring 2004               Computer Networks                 40
                            Subnet Example
           Subnet mask: 255.255.255.128
           Subnet number: 128.96.34.0

128.96.34.15            128.96.34.1
           H1
                    R1
                               Subnet mask: 255.255.255.128
        128.96.34.130          Subnet number: 128.96.34.128

                                           128.96.34.139
           128.96.34.129
                                      H2
                          R2
  H3
                            128.96.33.1       Forwarding table at router R1
    128.96.33.14
                                              Subnet Number   Subnet Mask       Next Hop
       Subnet mask: 255.255.255.0
       Subnet number: 128.96.33.0
                                              128.96.34.0     255.255.255.128   interface 0
                                              128.96.34.128   255.255.255.128   interface 1
                                              128.96.33.0     255.255.255.0     R2

 Spring 2004                              Computer Networks                             41
              Subnet Example
• If H1 is sending to H2, then (255,255,255,128) ^
  (128,96,34,139)= (128,96,34,128). H1 sends the
  packet to R1.
• In R1, first entry (255,255,255,128) ^
  (128,96,34,139)= (128,96,34,128) not match.
• Next entry (255,255,255,128) ^ (128,96,34,139)=
  (128,96,34,128)  match  Interface two


Spring 2004         Computer Networks                42
              Forwarding Algorithm
D = destination IP address
for each entry (SubnetNum, SubnetMask, NextHop)
   D1 = SubnetMask & D
   if D1 = SubnetNum
      if NextHop is an interface
         deliver datagram directly to D
      else
         deliver datagram to NextHop

•   Use a default router if nothing matches
•   Not necessary for all 1s in subnet mask to be contiguous
•   Can put multiple subnets on one physical network
•   Subnets not visible from the rest of the Internet

Spring 2004               Computer Networks                    43
                 Classless Routing
• Inefficient use of Hierarchical Address Space
     – class C with 2 hosts (2/255 = 0.78% efficient)
     – class B with 256 hosts (256/65535 = 0.39% efficient)




Spring 2004              Computer Networks                    44
                 Supernetting (CIDR)
• Assign block of contiguous network numbers to nearby
  networks
• Called CIDR: Classless Inter-Domain Routing
     –   194.0.0.0/8 (Europe)
     –   198.0.0.0 (North America)
     –   200.0.0.0
     –   202.0.0.0
• Represent blocks with a single pair
      (first_network_address, count)
• Restrict block sizes to powers of 2

Spring 2004                   Computer Networks          45
                Supernet Example
• Use a bit mask (CIDR mask) to identify block size
• All routers must understand CIDR addressing
• Example
     – 194.24.0.0/21 (Cambridge U)
     – 194.24.16.0/20 (Oxford U.)
     – 194.24.8.0/22 (Edinburgh U.)
What happens if comes a packet with 194.24.17.4 ?


Spring 2004              Computer Networks          46
         Route aggregation with CIDR




Spring 2004        Computer Networks   47
              IP forwarding (CIDR)
• It is sometimes possible to have prefixes in the
  forwarding table that “overlap,” in the sense that
  some addresses may match more than one prefix.
• For example, 171.69 (16-bit prefix), 171.69.10
  (24-bit prefix). A packet with destination
  171.69.10.5 (how to forward ?)
• Longest prefix match
• PATRICA tree

Spring 2004          Computer Networks                 48
Spring 2004   Computer Networks   49
Spring 2004   Computer Networks   50
                  Route Propagation
• Know a smarter router
     –   hosts know local router
     –   local routers know site routers
     –   site routers know core router
     –   core routers know everything
• Autonomous System (AS)
     – corresponds to an administrative domain
     – examples: University, company, backbone network
     – assign each AS a 16-bit number
• Two-level route propagation hierarchy
     – interior gateway protocol (each AS selects its own)
     – exterior gateway protocol (Internet-wide standard)
Spring 2004                 Computer Networks                51
Spring 2004   Computer Networks   52
  Popular Interior Gateway Protocols
• RIP: Route Information Protocol
     –   developed for XNS
     –   distributed with Unix
     –   distance-vector algorithm
     –   based on hop-count
• OSPF: Open Shortest Path First
     –   recent Internet standard
     –   uses link-state algorithm
     –   supports load balancing
     –   supports authentication

Spring 2004                 Computer Networks   53
     EGP: Exterior Gateway Protocol
• Overview
     – designed for tree-structured Internet
     – concerned with reachability, not optimal routes
• Protocol messages
     – neighbor acquisition: one router requests that another
       be its peer; peers exchange reachability information
     – neighbor reachability: one router periodically tests if
       the another is still reachable; exchange HELLO/ACK
       messages; uses a k-out-of-n rule
     – routing updates: peers periodically exchange their
       routing tables (distance-vector)

Spring 2004               Computer Networks                      54
    BGP-4: Border Gateway Protocol
• AS Types
     – stub AS: has a single connection to one other AS
              • carries local traffic only (eg., small corporation)
     – multihomed AS: has connections to more than one AS
              • refuses to carry transit traffic (e.g., large Corporation)
     – transit AS: has connections to more than one AS
              • carries both transit and local traffic (e.g., backbone provider)
• Each AS has:
     – one or more border routers
     – one BGP speaker that advertises:
              • local networks
              • other reachable networks (transit AS only)
              • gives path information




Spring 2004                            Computer Networks                           55
                            Internet Structure
Today

                               Large corporation
                                                               Consumer ”
                                                               “        ISP
              Peering
              point
                                   Backbone service provider        Peering
                                                                    point
                        ISP
                Consumer”
                “

                              Large corporation       “       ISP
                                                      Consumer”

                 Small
              corporation




Spring 2004                           Computer Networks                       56
              Interdomain routing is hard
• Reasons
     – Scale (the order of 140000)
     – It is impossible to calculate meaningful path costs for a
       path crosses multiple ASs. (reachability)
     – The issue of trust.
• Policies:
     – Use provider B only to reach these addresses
     – Use the path that crosses the fewest number of Ass.
     – Use AS x in preference to AS y.
Spring 2004                Computer Networks                   57
Spring 2004   Computer Networks   58
                        BGP Example
• Speaker for AS2 advertises reachability to P and Q
     – network 128.96, 192.4.153, 192.4.32, and 192.4.3, can be reached
       directly from AS2
                                                          Customer P   128.96
                                                            (AS 4)     192.4.153
                                  Regional provider A
                                           (AS 2)
                                                          Customer Q   192.4.32
                                                            (AS 5)     192.4.3
              Backbone network
                   (AS 1)
                                                          Customer R   192.12.69
                                                            (AS 6)
                                    Regional provider B
                                          (AS 3)
                                                          Customer S   192.4.54
                                                            (AS 7)     192.4.23


• Speaker for backbone advertises
     – networks 128.96, 192.4.153, 192.4.32, and 192.4.3 can be reached
       along the path (AS1, AS2).
• Speaker can cancel previously advertised paths
Spring 2004                      Computer Networks                                 59
              BGP-4 Example




Spring 2004      Computer Networks   60
                               IP Version 6
• Features
     –   128-bit addresses (classless)
     –   multicast
     –   real-time service
     –   authentication and security
     –   autoconfiguration
     –   end-to-end fragmentation
     –   protocol extensions
• Header
     – 40-byte “base” header
     – extension headers (fixed order, mostly fixed length)
              •   fragmentation
              •   source routing
              •   authentication and security
              •   other options
Spring 2004                          Computer Networks        61
• Features of IPv6
  – Larger Address
        • IPv4: 32 bits.
        • IPv6: 128 bits.
  – Extended Address Hierarchy
        • IPv6 uses the larger address space to create additional levels of
          addressing hierarchy.
  – Flexible Header Format
        • IPv4: a fixed-format datagram.
        • IPv6: a set of optional header.
  – Improved Options.
        • IPv6: new options are provided.
  – Provision for Protocol Extension


 Spring 2004                    Computer Networks                             62
     – Support for resource allocation.
              • IPv6 replaces IPv4’s type-of-service specification with a
                mechanism that permits preallocation of network
                resources.
     – Support for Auto-configuration and Renumbering
              • Allow computers on an isolated network to assign
                themselves addresses and begin communicating without
                depending on a router or manual configuration.
              • Permit a manager to renumber networks dynamically.




Spring 2004                      Computer Networks                      63
• General form of an IPv6 datagram




 Spring 2004         Computer Networks   64
• IPv6 base header format.




  Spring 2004         Computer Networks   65
 – Alignment: 32 bits multiples -> 64 bits multiples.
 – The header length field has been eliminated, and the datagram
   length field has been replaced by a PAYLOAD LENGTH field.
   16bits --> 64k octets.
 – Address : 16 octets
 – Fragmentation information: an extension header
 – TTL --> Hop limit field
 – service type --> traffic class, flow label
 – Protocol --> next header
 – A new mechanism in IPv6 supports resource reservation and
   allows a router to associate each datagram with a given resource
   allocation.



Spring 2004               Computer Networks                      66
• Flow Label
  – 8 bits Traffic class:
  – 20 bits Flow I.d.: the source chooses a flow I.d. when establishing
    the flow (e.g. at random).
        • Routers use to associate a datagram with specific flow and priority.
        • A router uses the combination of datagram source address and flow
          id when associating a datagram with a specific flow.




 Spring 2004                    Computer Networks                          67
• IPv6 Extension Header
  – Routing (43) : extended routing ( like IPv4 source routing)
  – Fragmentation (44): F & R.
  – Authentication (51): Integrity & Authentication.
  – Security Encapsulation (50): confidentiality
  – hop-by-hop option (0) : Special options which require processing
    at every node.
  – Destination option (60): Optional information to be examined by
    the destination node only.
  – TCP (6), UDP (17), ICMPv4 (1), ICMPv6 (58)
  – IPv6 extension headers are similar to Ipv4 options. Each
    datagram includes extension headers for only those facilities that
    the datagram uses.




 Spring 2004                Computer Networks                      68
• Parsing an IPv6 datagram




 Spring 2004         Computer Networks   69
• IPv6 Fragmentation and Reassembly
  – In IPv6, fragmentation is restricted to the original source. Before
    sending traffic, the sources either use the guaranteed min MTU of
    1280 octets or perform a path MTU discovery technique to
    identify the minimum MTU along the path to the destination
  – Thus, fragmentation is end-to-end; no fragmentation needs to
    occur in intermediate routers.




 Spring 2004                Computer Networks                      70
• The End-to-End Fragmentation
  – The motivation for using end-to-end fragmentation lies in
    its ability to reduce overhead in routers and permit each
    router to handle more datagrams per unit time.
  – Fragmentation any time is flexibility in IPv4; In Ipv6,
    however, routes can not be change as easily because a
    change in a route can also change the path MTU. If the path
    MTU along a new route is less than the path MTU along the
    original route, either an intermediate router must fragment
    the datagram or the original source must be informed.
  – To solve the problem of route changes that affect the path
    MTU, IPv6 includes a new ICMP error message. Router
    (ICMP) source node; Source preforms another MTU
    discovery for a new path.



 Spring 2004             Computer Networks                  71
Spring 2004   Computer Networks   72
• IPv6 Source Routing
  – IPv6 retains the ability for a sender to specify a loose source route. Only the
    loose source routing is defined (routing type=0)
  – Type-specific data is a list of addresses of routers.
  – Seg left specifies the number of addresses remaining in the list
  – HDR EXT LEN: the size of header




 Spring 2004                      Computer Networks                                   73
• Size of address space
   – 2^128 =
     340,282,366,920,938,463,463,374,607,431,768,211,456.
   – Notation
   140.230.140.100.255.255.255.255.0.0.17.128.150.10.255.255
   68E6:8c64:ffff:ffff:0:1180:960a:ffff.
   – Zero compression is useful when used with the proposed
     address assignment scheme because many addresses will
     contain contiguous string zero.
   – Colon hex notation incorporates dotes decimal suffixes; we
     will see that such combinations are intended to used during
     the transition from IPv4 to IPv6.
   – Example, ff05:0:0:0:0:0:0:b3 => ff05::b3.
               0:0:0:0:0:0:128.10.2.1 => ::128.10.2.1
  Spring 2004             Computer Networks                  74
• Three basic IPv6 address types
   – IPv6 also retains the IPv4 address hierarchy in which a
     physical network is assigned a prefix.
   – IPv6 permits multiple, simultaneous addresses assigned to a
     given network, and allows computer to have multiple,
     simultaneous addresses assigned to a given interface.
   – In general, a destination address on a datagram falls into
     one of three categories:
   – Unicast:
   – Anycast: a set of computers that all share a single address
     prefix. The datagram is delivered to exactly one member of
     the group.
   – Multicast:

  Spring 2004             Computer Networks                  75
• Proposed IPv6 Address Space Assignment
  – How to manage address assignment ?
  – The large address space in IPv6 permits a multi-level
    hierarchy or multiple hierarchies.
  – How to map an address to a route ?
  – Independent of the hierarchy of authority that assigns
    addresses, a router must examine each datagram and choose
    a path to the destination. To keep the cost of high-speed
    routers low, the processing time required to choose a path
    must be kept small.
  – In IPv6, although the first eight bits of an address is
    sufficient to identify its type, the address space is not
    partitioned into sections of equal size.


 Spring 2004             Computer Networks                 76
Spring 2004   Computer Networks   77
• IPv4 address encoding and transition
   – The designers plan to use a small fraction of address to encode
     IPv4 address. That is, the prefix 0000 0000 is reserved for
     encoding IPv4.
   – Address (128 bits): 80 bits :0, 16 bits : 0 or 1, 32bits v4 IP
     address.




   – The encoding will be needed during a transition from IPv4 to
     IPv6 for two reasons. 1) Upgrade from IPv4 to IPv6 before
     receiving a valid IPv6 address. 2) A computer running IPv6 may
     need to communicate with a computer running IPv4.
  Spring 2004                Computer Networks                     78
• Unspecified address
    0: 0: 0: 0: 0: 0: 0: 0
     – It is only used as a source address during bootstrap by a computer that has
       not yet learned its address.
• Loopback address
    0: 0: 0: 0: 0: 0: 0: 1
• Unicast address hierarchy
     – IPv6 extends the concept of address hierarchy with three levels as




Spring 2004                      Computer Networks                              79
     – Level 3 corresponds to a single attachment between a computer
       and a network.
     – Level 2 corresponds to a set of computers and networks located at
       a site, which implied both contiguous physical connectivity and a
       single organization that owns and operates the equipment.
     – Level 1 is labeled public topology, is not precisely defined.
              • Two types of public topology are envisioned.
                  – ISP
                  – Exchange
                      » NAP (Network Access Point) to interconnect ISP
                      » Exchange will also service individual subscribers




Spring 2004                         Computer Networks                       80
• Aggregatable Global Unicast Address Structure
     – Each top-level organization is assigned a unique prefix.
     – When an organization becomes a subscriber of a top-level ISP, the
       organization is assigned a unique number for its site.
     – A manager must assign a number to each network connection




Spring 2004                  Computer Networks                         81
     – P (format prefix): 001
     – TLA (Top Level Aggregation) ID: ISP or Exchange’s
       address (13 bits)
     – NLA (Next-Level Aggregation) ID: subscribe ID (24
       bits)
     – SLA (Site -Level Aggregation) ID: Site ID (16bits) is
       used much like an IPv4 subnet field. To create a one-
       level hierarchy at the site, the organization must use a
       prefix to identify the group and a suffix to identify a
       particular network in the group.




Spring 2004                Computer Networks                      82
     –        Interface Identifiers
              •   A direct encoding of the interface hardware address
                  1. IPv6 uses a neighbor discovery protocol (ICMP) allow a
                     node to determine which computers are its directly
                     connected neighbors.
                  2. To guarantee interoperability, all computers must use the
                     same encoding for a hardware address.
              •   Two cases for encoding
                  – IEEE EUI-64 address: inverting bit 6 for globally
                     unique.
                  – IEEE 802
     –        Additional hierarchy: NLA ID, SLA ID



Spring 2004                       Computer Networks                         83
Spring 2004   Computer Networks   84
     – Local Addresses
              • IPv6 includes prefixes for unicast addresses that have local
                scope.
                  – Site-local address
                  – Link-local address
              • Routers honor the scoping rules; they do not forward
                datagrams containing locally-scoped addresses outside the
                specified scope.
                  – Link-local address : For example, an IPv6 node uses a
                    link-local address to perform neighbor discovery.
                    Computers connected to an isolated network can use link-
                    local addresses to communicate.
                  – Site-local address: private or nonroutable addresses (in
                    IPv4)


Spring 2004                       Computer Networks                        85
• Auto-configuration and renumbering
     – Serverless autoconfiguration (stateless autoconfiguration): allows
       computers to communicate without requiring a manager to specify
       an address.
     – Link-local address and embeded interface identifiers
     – A computer uses 1111 1110 10 + 54 zero bits + 64-bit interface id
        send a router solicitation
     – Router  router advertisement to inform its prefixes. The
       computer uses it as its default router.
     – A flag in advertisement tells whether to rely on auto-configuration
       or DHCP.
     – Renumbering: IPv6 allows routers to limit the time a computer can
       retain a prefix. (preferred lifetime or valid lifetime)




Spring 2004                   Computer Networks                         86
                   ICMPv6
• Comparison of network layers in v4 and v6




Spring 2004         Computer Networks         87
Spring 2004   Computer Networks   88

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:15
posted:7/14/2011
language:English
pages:88