Docstoc

The Network Layer _ Routing

Document Sample
The Network Layer _ Routing Powered By Docstoc
					                           application
                           transport
                            network                       network
                            data link        network       data link
                            physical                       physical          network
                                             data link                       data link
                                             physical                        physical
                                                         network


The Routing &
                                                          data link
                                                          physical
                                                                         network
                                                                         data link
                                                                         physical


   the IP                      application
                               transport
                                             network
                                             data link
                                                         network
                                                                 network
                                                                 data link
                                                                 physical
                                             physical
                                network                  data link
                                data link                physical               application
                                physical                                        transport
                                                                                network
                                                                                 data link
                                                                                 physical



The network layer moves transport layer segments
from host to host in the network, to deliver them to
their destination. This layer involves each and every
host and router in the network. We will study the
key principles and algorithms of routing, with a focus
on the Internet Protocol (IP) service model.
     OSI vs. TCP/IP
   OSI model         TCP/IP protokol stack
Application layer

Presentation layer      Application layer



  Session layer

 Transport layer        Transport layer


 Network layer           Network layer


                      Network Access layer
 (Data)link layer

  Physical layer         Physical layer
                  Network layer functions

 transport packet from           application
  sending to receiving hosts      transport
                                   network
 network layer protocols in       data link
                                   physical
                                                               network
                                                               data link
  every host, router
                                                network                          network
                                                data link      physical          data link
                                                physical                         physical

three important functions:                                     network
                                                               data link
 path determination: route                                    physical      network
                                                                             data link
   taken by packets from source                                              physical

   to destination - routing                      network
                                                                     network
                                                                     data link
  algorithms                                     data link
                                                 physical
                                                                     physical

 switching: move packets from                               network
                                                             data link       application
  router‘s input to appropriate                              physical        transport

  router output
                                                                              network
                                                                              data link
                                                                              physical
 call setup: some network
  architectures require router
  call setup along path before
  data flows
          Datagram networks:                  the Internet model

 Datagram: an independent, self-contained network message whose
  arrival, arrival time, and content are not guaranteed
 no call setup at network layer
 routers: do not maintain state for the end-to-end connections
      no network-level concept of a ―connection‖
 packets are typically routed using only destination host ID which is
  carried in the packet
      packets between same source-destination pair may take different paths



  application
                                                                    application
  transport
                                                                    transport
   network
                                                                     network
   data link 1. Send data                           2. Receive data
                                                                     data link
   physical
                                                                     physical
           The Internet Network layer
  Host, router network layer functions… three major
  components:
                         Transport layer: TCP, UDP

            Routing protocols              IP protocol
            •path selection                •addressing conventions
            •RIP, OSPF, BGP                •datagram format
Network                                    •packet handling conventions
   layer                        routing
                                 table     ICMP protocol
                                           •error reporting
                                           •router ―signaling‖

                                   Link layer

                                  Physical layer
            The Internet Protocol: ―IP‖
 The Internet is a large network of computers spread
  across the globe
    According  to the Internet Systems Consortium, there were over
     353 million computers as of July 2005
    In principle, every host can speak with every other one under the
     right circumstances
 IP Packet: a network packet on the internet
 IP Address: a 32-bit integer used as the destination of an
  IP packet
    Often written as four dot-separated integers, with each integer
     from 0—255 (thus representing 8x4=32 bits)
    Example file server is: 169.229.60.83  0xA9E53C53
 Internet Host: a computer connected to the Internet
    Host has one or more IP addresses used for routing
      • Some of these may be private and unavailable for routing
    Not   every computer has a unique IP address
      • Groups of machines may share a single IP address
      • In this case, machines have private addresses behind a ―Network
        Address Translation‖ (NAT) gateway
             IP Addressing: introduction

 IP address: 32-bit                     223.1.1.1

  identifier for host or                                           223.1.2.1
  router interface                       223.1.1.2
                                                223.1.1.4     223.1.2.9
 interface: connection
  between host or                       223.1.1.3     223.1.3.27
                                                                   223.1.2.2
  router and the
  physical link
      routers typically have
       multiple interfaces                223.1.3.1                223.1.3.2

      hosts typically have
       only one
      IP addresses are
       associated with the      dotted-decimal notation:
       interface, not the       223.1.1.1 = 11011111 00000001 00000001 00000001
       host or the router
                                             223          1          1         1
                     IP Addressing

 IP address:                     223.1.1.1

    network part (high                                     223.1.2.1
                                  223.1.1.2
     order bits)                         223.1.1.4    223.1.2.9
    host part (low order
     bits)                       223.1.1.3     223.1.3.27
                                                             223.1.2.2

   What‘s a network ?
                                                       LAN
    (from the IP address
    perspective)                   223.1.3.1                 223.1.3.2
      device interfaces with
       the same network part
       of their IP address
                                Example: network consisting of 3 IP
      hosts can physically
                                networks (for IP addresses starting
       reach each other         with 223, the first 24 bits are the
       without an intervening   network address – more later)
       router
                       Address Subnets
 Subnet: A network connecting a set of hosts with related
  destination addresses
 With IP, all the addresses in subnet are related by a
  prefix of bits
    Mask:   The number of matching prefix bits
       • Expressed as a single value (e.g., 24) or a set of ones in a 32-bit value
         (e.g., 255.255.255.0)

 A subnet is identified by 32-bit value, with the bits which
  differ set to zero, followed by a slash and a mask
    Example:128.32.131.0/24 designates a subnet in which all the
     addresses look like 128.32.131.XX
    Same subnet: 128.32.131.0/255.255.255.0

 Difference between subnet and complete network range
    Subnet is always a subset of address range
    Once, subnet meant single physical broadcast wire; now, less clear
     exactly what it means (virtualized by switches)
                                IP Addresses
Given the notion of a ―network‖, let‘s look closer at IP
addresses:
―classful‖ addressing -
  class
                                                                                   1.0.0.0 to
    A     0 network                         host (24 bits)
          27 = 127 networks
                                                                                   127.255.255.255
                                           224 = 16.8 million+ hosts

    B                   network                                                    128.0.0.0 to
          10                                           host (16 bits)
                   214 = 16,384 networks            216 = 65,536 hosts
                                                                                   191.255.255.255
                                                                                   192.0.0.0 to
    C     110                 network                          host (8 bits)
                                                                                   223.255.255.255
                        221 = 2 million+ networks                 28 = 256 hosts

                                                                                   224.0.0.0 to
    D     1110                 multicast address                (28 bits)
                                                                                   239.255.255.255
          24 = 16 networks                 228 = 268.4 million+ hosts

                                     32 bits

        What is the address space size (number of hosts) for each class?
 Abbreviated Format of the Address
              Ranges
      224.0.0.0 - 239.255.255.255            224/4


 The minimum & maximum values of the range:
 11100000.00000000.00000000.000000002
                          11101111.11111111.11111111.111111112
 E0.00.00.0016 … EF.FF.FF.FF16
 The first part of the abbreviation is the common byte(s)
  in the range
 The second part of the abbreviation is the number of
  bits, which are common for the all members of the range
  The different classes of the IP
            addresses
 IP address space divided into prefix-
  delimited ranges
 IP Address = NSAP (between network &
  transport layers)

  Name         Purpose               Addresses             Abbreviated form
 A-class    Large networks    1.0.0.0 - 126.255.255.255           -
 B-class   Medium networks   128.0.0.0 - 191.255.255.255        128/2
 C-class    Small networks   192.0.0.0 - 223.255.255.255        192/3
 D-class      Multicast      224.0.0.0 - 239.255.255.255        224/4
 E-class      Reserved       240.0.0.0 - 255.255.255.254        240/4
         The private address ranges

 Used locally
   Never used in the Internet
   Gateways do not forward the packets addressed to
    private addresses
 The network, which uses the private address
  range can be connected to the Internet by the
  NAT (Network Address Translation)
      Name   Start of the range   End of the range   Subnet mask
   Class A        10.0.0.0        10.255.255.255       255.0.0.0
   Class B      172.16.0.0        172.31.255.255      255.255.0.0
   Class C      192.168.0.0       192.168.255.255    255.255.255.0
                   Reserved addresses
   Address of the default gateway: x.y.z.1 (in most
    cases)
       The packets are going in/out through this
   Network address:
       E.g. in a class C subnet: 255.255.255.0, but it can also be
        other, if the network x.y.z/24 is divided into smaller parts
 Addressing of the own host in booting: 0.0.0.0
 Broadcast address: 0.0.0.255, ill. 255.255.255.255
       The second address is theoretically broadcast, since the
        routers in the Internet discard of the packets addressed to
        that address
   Loopback address: 127.0.0.1
       Using this the network software can be tested without
        Ethernet card
              IP addressing: CIDR

 classful addressing:
     inefficient use of address space, address space exhaustion
     e.g., class B network is allocated enough addresses for 65K
      hosts, even if only 2K hosts exist in that network
 CIDR: Classless InterDomain Routing
     network portion of address of arbitrary length
     address format: a.b.c.d/x, where x is # bits in the network
      portion of an address

                    network                     host
                      part                      part
      11001000 00010111 00010000 00000000
                       200.23.16.0/23
      IP addresses: how to get one?


Hosts (host portion):
 hard-coded by system admin in a file
 DHCP: Dynamic Host Configuration Protocol:
 dynamically get address (RFC 2131): ―plug-and-play‖
   host broadcasts ―DHCP discover‖ msg
   DHCP server responds with ―DHCP offer‖ msg
   host requests IP address: ―DHCP request‖ msg
   DHCP server sends address: ―DHCP ack‖ msg
                        IP datagram format
IP protocol version
            number                        32 bits               total datagram
     header length           head. type of                      length (bytes)
            (bytes)      ver.               datagram length
                              len. service                       for
     ―type‖ of data                              fragment
                         16-bit identifier flgs                  fragmentation/
                                                   offset        reassembly
     max number of       time to                 header
     remaining hops                protocol
                           live                 checksum
   (decremented at
       each router)              32 bit source IP address

upper layer protocol            32 bit destination IP address
to deliver payload to                                           e.g. timestamp,
                                      Options (if any)
  (e.g. TCP, UDP, …                                             record route
       see RFC 1700)                        data                taken, specify
                                      (variable length,         list of routers
                                       typically a TCP          to visit (field is
                                      or UDP segment)           rarely used in
                                                                practice).
ICMP
Internet Control Message Protocol (ICMP)


 ICMP is a signalling protocol
 It provides troubleshooting facilities and
  error reporting for packets that are
  undeliverable
 For example, if IP is unable to deliver a
  packet to the destination host, ICMP sends
  a Destination Unreachable message to the
  source host
 The next slide shows the most common
  ICMP messages
                Common ICMP messages

ICMP Message                                           Function


                 Troubleshooting message used to check IP connectivity to a desired host. The ping
Echo Request
                                    utility sends ICMP Echo Request messages.


 Echo Reply                             Response to an ICMP Echo Request.


   Redirect     Sent by a router to inform a sending host of a better route to a destination IP address.


                Sent by a router to inform a sending host that its IP datagrams are being dropped due
Source Quench        to congestion at the router. The sending host then lowers its transmission rate.
                    Source Quench is an elective ICMP message and is not commonly implemented.


 Destination    Sent by a router or the destination host to inform the sending host that the datagram
  Unreachable                                      cannot be delivered.
   Common ICMP Destination Unreachable
               Messages

   Destination
    Unreachable                                         Description
      Message
     Network           Sent by an IP router when a route to the destination network can not be found.
     Unreachable                                  This message is obsolete.

 Host Unreachable     Sent by an IP router when a route to the destination IP address can not be found.


     Protocol         Sent by the destination IP node when the Protocol field in the IP header cannot be
     Unreachable                        matched with an IP client protocol currently loaded.

 Port Unreachable       Sent by the destination IP node when the Destination Port in the UDP header
                                       cannot be matched with a process using that port.

  Fragmentation       Sent by an IP router when fragmentation must occur but is not allowed due to the
   Needed and DF               source node setting the Don't Fragment (DF) flag in the IP header.
        Set
Source Route Failed   Sent by an IP router when delivery of the IP packet using source route information
                                           (stored as source route option headers) fails.
ARP, RARP
   Address Resolution Protocol (ARP)

 Although every machine on the Internet has one
  (or more) IP addresses, these cannot actually by
  used for sending packets because the data link
  layer hardware does not understand Internet
  addresses
 The host are attached to a LAN by an interface
  card that only understand LAN addresses
 E.g., every Ethernet card ever manufactured
  comes equipped with an individual 48-bit Ethernet
  address (called: ―Hardware Address‖)
 The problem is to map the IP addresses onto data
  link layer addresses
                ARP (Cont.)

 In computer networking, the Address
  Resolution Protocol (ARP) is the method
  for finding a host's hardware address
  when only its network layer address is
  known
 Due to the overwhelming prevalence of
  IPv4 and Ethernet, ARP is primarily used to
  translate IP addresses to Ethernet MAC
  addresses.
          LAN Addresses and ARP

32-bit IP address:
   network-layer address
 used to get a datagram to a destination network
    (recall IP network definition)

LAN (or MAC, or physical) address:
 used to get datagram from one interface to
  another physically-connected interface (same
  network)
 48 bit MAC address (for most LANs): permanent
  address, burned into the adapter ROM

           How many possible LAN/Physical addresses?
         LAN Address (more)

 MAC address allocation administered by
  IEEE
 manufacturer buys a portion of the MAC
  address space (to assure uniqueness)
 MAC flat address => portability
    can move LAN card from one LAN to
     another
 IP hierarchical address NOT portable
    depends on network to which one
     attaches
                        ARP

Question: how can we           Each IP node (Hosts &
determine the MAC address       Routers) on a LAN has
of B given B‘s IP address?      an ARP module and table
                               ARP Table: IP/MAC
                                address mappings for
                                some LAN nodes
                               < IP address; MAC address; TTL>
                                    TTL (Time To Live): time
                                     after which address
                                     mapping will be forgotten
                                     (typically < 20 minutes)
          ARP protocol (RFC 826)

 A knows B's IP address, wants to learn physical
  address of B
 A broadcasts ARP query packet, containing B's IP
  address
    all machines on LAN receive ARP query
 B receives the ARP packet, replies to A with its
  (B's) physical layer (MAC) address
 A caches (saves) IP-to-physical address pairs until
  information becomes old (times out: TTL)
    soft state: information that times out (goes
     away) unless refreshed
                                ARP

 Solution is for a host to output a broadcast packet onto
    the Ethernet asking:
       Who owns IP address 152.66.72.101?
 The broadcast will arrive on Ethernet 152.66.72.0, and
    each one will check its IP address
   Only the right host responds with its own Ethernet
    address
   In this way these two hosts learn mapping each other‘s IP
    address onto the appropriate Ethernet address
   The protocol for asking this question and getting the
    reply is called Address Resolution Protocol (ARP)
   Almost every machine on the Internet runs it
                                ARP

 Message format:
   HW     Upper HW Up    Mess   Source   Source   Dest     Destin
   Type   Type LEN LEN   Type   HW Add   Up Add   HW Add   Up Add




 Send Request
   for 139.78.149.26
   to HW 00:00:00:00:00:00 (broadcast)
   from 139.78.149.26
   HW xx:xx:xx:xx:xx:xx (source MAC)
                              ARP

 Interpret Broadcast
   Compare  Destination IP with own IP
   Update its own ARP table
       • Map 139.78.149.26 to xx:xx:xx:xx:xx:xx
     Send Response
       • Same format except message type
 Source Updates ARP table
 Send Packets using HW address
Reverse Address Resolution Protocol
             (RARP)

    ARP solves the problem of finding
     out which Ethernet address
     corresponds to a given IP address
    The of problem of finding the
     corresponding IP address to a
     known Ethernet address is solved
     by the RARP
      Such a problem arises when a machine
       get the binary image of its operating
       system from a remote file server
      But how does it learn its IP address?
            Automatic Configuration

 The disadvantage of RARP is that it uses the
  broadcast address to reach the RARP server
     However, such broadcasts are not forwarded by
      routers, so a RARP server is needed on each network
 To get around this problem, the automatic
  configuration methods have been invented:
   Bootstrap (BootP)
   Dynamic Host Configuration Protocol (DHCP)
                      BootP & DHCP

 Originally developed for diskless workstations
 Needed only basic IP, UDP, tftp (read from ROM
   Client broadcast a UDP request
   Server returns IP address and file location
   Client uses tftp to download s/w and executes it

 Unlike RARP the BootP uses UDP messages, which
  are forwarded over routers
     It also provides a diskless workstation with additional
      information, including:
       • IP address of the file server holding the memory image,
       • the IP address of the default router, and
       • the subnet mask to use
  DHCP ( Dynamic Host Configuration
             Protocol)
 DHCP's purpose is to enable individual computers on
  an IP network to extract their configurations from a
  server (the 'DHCP server') or servers
      in particular, servers that have no exact information about
       the individual computers until they request the information
 The overall purpose of this is to reduce the work
  necessary to administer a large IP network
 The most significant piece of information distributed
  in this manner is the IP address
Routing
                                 Routing
 Routing: the process of forwarding packets hop-by-hop
  through routers to reach their destination
    Need   more than just a destination address!
       • Need a path
    Post   Office Analogy:
       • Destination address on each letter is not
         sufficient to get it to the destination
       • To get a letter from here to Florida, must route to local post office,
         sorted and sent on plane to somewhere in Florida, be routed to post
         office, sorted and sent with carrier who knows where street and
         house is…
 Internet routing mechanism: routing tables
    Each router does table lookup to decide which link to use to get
     packet closer to destination
    Don‘t need 4 billion entries in table: routing is by subnet
    Could packets be sent in a loop? Yes, if tables incorrect
 Routing table contains:
    Destination address range  output link closer to destination
    Default entry (for subnets without explicit entries)
                            Routing

 Routing protocol
Goal: determine a ―good‖ path                      5
 (sequence of routers) thru
the network from the source                        B   3       C
                                               2                   5
      to the destination
                                       A           2                   F
                                                               1
                                                           3
Graph abstraction for                      1
                                                   D           E   2
  routing algorithms:                                  1
 graph nodes are routers
 graph edges are physical            ―good‖ path:
  links                                  typically means minimum

      link cost: delay, distance,        cost path
       # of hops, rate structure         other definitions also
       or congestion level = $$           possible
      Other costs??
                 Hierarchical Networking
 How can we build a network with millions of hosts?
      Hierarchy
         • Not every host connected to every other one
      Use a network of Routers to connect subnetworks together
         • Routing is often by prefix: e.g. first router matches first 8 bits of address,
           next router matches more, etc.

                                    Other
                                   subnets

           subnet1
                                                 Transcontinental
                                   Router              Link

                                          Router

                                      Other
                                     subnets     Router          subnet3
              subnet2
          Internet AS Hierarchy

  Inter-AS border (exterior gateway) routers




Intra-AS interior (gateway) routers
    Hierarchical Architecture of the
                Internet
                                 Legend
                                          router
Inter-AS level                     border router
                                     connection
                                      host
                                      LAN
  Intra Domain
                                   intra domain
    level (AS)
                                   network (AS)
                                     inter AS
                                     network
                     LAN level
                Hierarchical Routing

      Our routing study thus far – an idealization
               all routers are identical
                 the network is ―flat‖
                … not true in practice

                             Why?
scale: with 55 million+          administrative autonomy
  destination hosts:              internet = network of
                                   networks
 can‘t store all destinations
  in routing tables!              each network admin may
                                   want to control routing in its
 routing table exchange
                                   own network
  would swamp links!
                 Hierarchical Routing

 aggregate routers into          gateway routers
  regions, called                  special   routers in AS
  ―autonomous systems‖             run intra-AS routing
  (AS)                              protocol with all other
                                    routers in AS
 routers in same AS run
                                   also responsible for
  same routing protocol             routing to destinations
      ―intra-AS‖ routing           outside AS
       protocol
                                      run inter-AS routing
      routers in different AS          protocol with other
       can run different intra-         gateway routers
       AS routing protocol
         Intra-AS and Inter-AS routing
         C.b                                      Gateways:
                                B.a
                                                    •perform inter-AS
                    A.a                             routing amongst
          b               A.c             c         themselves
a    C                           a
                                              b     •perform intra-AS
                     a                B
                                                    routers with other
                d          c                        routers in their
               A     b
                                                    AS

                                                      network layer
    inter-AS, intra-AS                                data link layer
             routing in
           gateway A.c                                  physical layer
 Intra-AS and Inter-AS routing
                              Inter-AS
             C.b               routing
                              between    B.a
                      A.a     A and B                      Host
              b               A.c                  c         h2
  a      C                                a
                                                       b
                        a                      B
  Host              d          c          Intra-AS routing
  h1                     b
                   A                      within AS B
                   Intra-AS routing
                   within AS A


 We‘ll examine specific inter-AS and intra-AS
  Internet routing protocols shortly
      Internet inter-AS routing: BGP


 BGP (Border Gateway Protocol):   the de facto
  standard
 Path Vector protocol:
    similar to Distance Vector protocol
    each Border Gateway broadcasts to neighbors
     (peers) the entire path (I.e, sequence of ASs)
     to destination
    E.g., Gateway X may send its path to destination
           Z:
              Path (X,Z) = X,Y1,Y2,Y3,…,Z
       Internet inter-AS routing: BGP

Suppose: gateway X send its path to peer gateway W
 W may or may not select a path offered by X
    cost, policy (don‘t route via competitors AS), loop
     prevention reasons.
 If W selects a path advertised by X, then:
                Path (W,Z) = W, Path (X,Z)
 Note: X can control incoming traffic by controlling its
  route advertisements to peers:
    e.g., don‘t want to route traffic to Z -> don‘t
     advertise any routes to Z
      Internet inter-AS routing: BGP

 BGP messages exchanged using TCP.
 BGP messages:
   OPEN: opens TCP connection to peer and
    authenticates sender
   UPDATE: advertises new path (or withdraws old)
   KEEPALIVE keeps connection alive in absence of
    UPDATES; also ACKs OPEN request
   NOTIFICATION: reports errors in previous
    message; also used to close connection
    Why different Intra- and Inter-AS routing ?


Policy:
 Inter-AS: admin wants control over how its traffic is
  routed, who routes through its net.
 Intra-AS: single admin, so no policy decisions needed
Scale:
 hierarchical routing saves table size, reduces update
  traffic
Performance:
 Intra-AS: can focus on performance
 Inter-AS: policy may dominate over performance
 Intra-AS Routing Protocols

 The routing protocols are part of the
  network protocols (e.g. IP)
      Also known as Interior Gateway Protocols (IGP)
 In practice the most frequently used:
    Distance-vector routing protocols
        • RIPv2: Routing Information Protocol
        • EIGRP: Enhanced Interior Gateway Routing
          Protocol (proprietary – Cisco Systems)
      Link-state routing protocols
        • Open Shortest Path First (OSPF)
             Setting up Routing Tables
 How do you set up routing tables?
    Internet has no centralized state!
       • No single machine knows entire topology
       • Topology constantly changing (faults, reconfiguration, etc)
    Need   dynamic algorithm that acquires routing tables
       • Ideally, have one entry per subnet or portion of address
       • Could have ―default‖ routes that send packets for unknown subnets to
         a different router that has more information
 Possible algorithm for acquiring routing table
    Routing table has ―cost‖ for each entry
       • Includes number of hops to destination, congestion, etc.
       • Entries for unknown subnets have infinite cost
    Neighbors   periodically exchange routing tables
       • If neighbor knows cheaper route to a subnet, replace your entry with
         neighbors entry (+1 for hop to neighbor)
 In reality:
    Internet has networks of many different scales
    Different algorithms run at different scales
Distance-vector routing algorithm (DVR)
  The different names of the background
   mathematical algorithm:
    Backward search algorithm
    Bellman-Ford algorithm

  Goal: search the smallest delay paths for the
   traffic
  For this reason in each router a table is created,
   which contains:
    The interface to the smallest delay path to every node
    The estimated delay of each path

  This table is called   distance vector
The link state tables of an example
              network
                                    A

                                            1
                    5           2                           Legend
                        4       B                               router
        C                       3           D                   physical link
                                                1
    1                               1       E
                6
G                           F
            1                           4


                                                    A   B   C         D         E   F   G
                                                A   0   2   5         1               
                                                B   2   0   4                        
                                                C   5   4   0         3         1   6   1
                                                D   1      3         0         1      
                                                E         1         1         0   4   
                                                F         6                  4   0   1
                                                G         1                     1   0
                                                                 Bellman-Ford algorithm
                     Routing tables (Step 1)
  Router         A           B           C           D           E           F           G
                   Inter      Inter     Inter     Inter     Inter     Inter     Inter
Destination CA,j         CB,j face CC,j face CD,j face CE,j face CF,j face CG,j face
                   face
    A                    2       A   5       A   1       A          -          -          -
    B        2       B               4       B          -          -          -          -
    C        5       C   4       C               3       C   1       C   6       C   1       C
    D        1       D          -   3       D               1       D          -          -
    E               -          -   1       E   1       E               4       E          -
    F               -          -   6       F          -   4       F               1       F
    G               -          -   1       G          -          -   1       G




                             Distance                    Modified                Unmodified
                              vector                      entry                    entry
                                                                     Step 1
                                                                                 Bellman-Ford algorithm
 Shortest paths in
                                                    A
the routing table of                                                                            Legend
    the router A                                        CA,D=1
                                                                                                     Router
                                                  CA,B=2
                   CA,C =5                                                                           Physical link
                                             B
                           C                                D                                  Temporarily step
                                                                                                of the algorithm
              CA,G =                                       E
                                         F                                                      Least
                       G                                        CA,E=                          cost path
                               CA,F=             h=1


          h CA,B Path CA,C        Path       CA,D Path CA,E Path CA,F              Path       CA,G      Path
          0       -              -                   -            -             -                   -
          1   2   A-B      5      A-C         1     A-D              -            -                   -
          2   2   A-B      4     A-D-C        1     A-D         2   A-D-E 11      A-C-F        6       A-C-G
          3   2   A-B      3    A-D-E-C       1     A-D         2   A-D-E 6      A-D-E-F       5      A-D-C-G
                                                                                                      A-D-E-C-
          4   2   A-B      3    A-D-E-C       1     A-D         2   A-D-E   5   A-D-E C-G-F    4
                                                                                                         G
                                                                                                      A-D-E-C-
          5   2   A-B      3    A-D-E-C       1     A-D         2   A-D-E   5   A-D-E-C-G-F    4
                                                                                                         G
                                                                                          Bellman-Ford algorithm
                      Routing tables (Step 2)
  Router          A            B                  C                   D                   E                       F                   G
Destination CA,j Path CB,j Path CC,j Path CD,j Path CE,j Path CF,j Path CG,j Path
    A                     2        A          4       D           1       A           2           D       11          C           6       C
    B        2        B                       4       B           3       A           5           C       10          C           5       C
    C        4        D   4        C                              2       E           1           C        2          G           1       C
    D        1        D   3        A          2       E                               1           D        5          E           4       C
    E        2        D   5        C          1       E           1       E                                4          E           2       C
    F        11       C   10       C          5       E           5       E           4           F                               1       F
    G        6        C   5        C          1       G           4       C           2           C       1           G
                                     Router           A           B           C               D           E               F           G
                                                      Inter      Inter     Inter     Inter     Inter     Inter     Inter
                                   Destination CA,j         CB,j face CC,j face CD,j face CE,j face CF,j face CG,j face
                                                      face
Routing tables                         A                      2       A   5       A       1       A          -              -          -
resulted from                          B          2       B               4       B              -          -              -          -
 the previous                          C          5       C   4       C                   3       C   1       C       6       C   1       C
                                       D          1       D          -   3       D                   1       D              -          -
     step
                                       E                 -          -   1       E       1       E                   4       E          -
                                       F                 -          -   6       F              -   4       F                   1       F
                                       G                 -          -   1       G              -          -       1       G
                                                Step 2
                                                                       Bellman-Ford algorithm


                        A
                                      CA,D=1                Shortest paths in
                                CA,B=2                     the routing table of
       CA,C =4
         C                  B                                  the router A
                                        D

CA,G =6                                 E
                        F
   G                                    CA,E=2
              CA,F=11        h=2

          h CA,B Path CA,C       Path     CA,D Path CA,E Path CA,F       Path       CA,G     Path
          0       -              -            -         -             -                 -
          1   2   A-B   5         A-C       1   A-D        -            -                  -
          2   2   A-B   4        A-D-C      1   A-D   2   A-D-E 11      A-C-F        6      A-C-G
          3   2   A-B   3       A-D-E-C     1   A-D   2   A-D-E 6      A-D-E-F       5     A-D-C-G
                                                                                           A-D-E-C-
          4   2   A-B   3       A-D-E-C     1   A-D   2   A-D-E   5   A-D-E C-G-F    4
                                                                                              G
                                                                                           A-D-E-C-
          5   2   A-B   3       A-D-E-C     1   A-D   2   A-D-E   5   A-D-E-C-G-F    4
                                                                                              G
                                                                                       Bellman-Ford algorithm
                     Routing tables (Step 3)
  Router         A           B                C                    D                   E                   F                        G
Destination CA,j Path CB,j Path CC,j Path CD,j Path CE,j Path CF,j Path CG,j Path
    A                    2       A      3         E            1       A           2       D       6           G            5           C
    B        2       B                  4         B            3       A           4       D       6           G            5           C
    C        3       D   4       C                             2       E           1       C       2           G            1           C
    D        1       D   3       A      2         E                                1       D       4           G            3           C
    E        2       D   4       A      1         E            1       E                           3           G            2           C
    F        6       D   9       C      2         G            5       E           3       C                                1           F
    G        5       D   5       C      1         G            3       E           2       C       1           G

                              Router          A            B               C           D           E                F               G
                             Destination CA,j Path CB,j Path CC,j Path CD,j Path CE,j Path CF,j Path CG,j Path
                                 A                    2        A       4       D   1       A   2       D       11       C       6       C
Routing tables                   B       2        B                    4       B   3       A   5       C       10       C       5       C
resulted from                    C       4        D   4        C                   2       E   1       C        2       G       1       C
 the previous                    D       1        D   3        A       2       E               1       D        5       E       4       C
                                 E       2        D   5        C       1       E   1       E                    4       E       2       C
     step                                11       C   10       C       5       E   5       E   4       F                        1       F
                                 F
                                 G       6        C   5        C       1       G   4       C   2       C       1        G
                                                                                         Bellman-Ford algorithm
                         Routing tables (Step 4)
   Router            A           B               C                   D               E                    F                   G
 Destination CA,j Path CB,j Path CC,j Path CD,j Path CE,j Path CF,j Path CG,j Path
     A                       2       A       3           E       1       A       2        D           5       G       4           C
     B           2       B                   4           B       3       A       4        D           6       G       5           C
     C           3       D   4       C                           2       E       1        C           2       G       1           C
     D           1       D   3       A       2           E                       1        D           4       G       3           C
     E           2       D   4       A       1           E       1       E                            3       G       2           C
     F           5       D   6       C       2           G       4       E       3        C                           1           F
     G           4       D   5       C       1           G       3       E       2        C           1       G

                                      Router             A           B           C            D               E           F               G
                                     Destination CA,j Path CB,j Path CC,j Path CD,j Path CE,j Path CF,j Path CG,j Path
                                         A                       2       A   3       E    1       A       2       D   6       G       5       C
Routing tables                           B           2       B               4       B    3       A       4       D   6       G       5       C
resulted from                            C           3       D   4       C                2       E       1       C   2       G       1       C
 the previous                            D           1       D   3       A   2       E                    1       D   4       G       3       C
                                         E           2       D   4       A   1       E    1       E                   3       G       2       C
     step                                F           6       D   9       C   2       G    5       E       3       C                   1       F
                                         G           5       D   5       C   1       G    3       E       2       C   1       G
                                   Step 3-4
                                                                      Bellman-Ford algorithm
                                              Shortest paths in
                        A                    the routing table of                  A
                                     CA,D =1     the router A                              CA,D =1
                        B CA,B =2                                                  B CA,B =2
          CA,C =3                                                  CA,C =3
                                        D                                                          D

CA,C =5       C                              CA,E=2         CA,C =4      C                       E
                        F                                                          F
    G                                       E                  G                                       CA,E=2
              CA,F =6        h=3                                        CA,F =5         h=4

    h CA,B Path CA,C        Path   CA,D Path CA,E Path CA,F            Path      CA,G     Path
    0         -            -              -         -               -                -
    1     2   A-B   5     A-C       1       A-D        -               -                -
    2     2   A-B   4    A-D-C      1       A-D   2   A-D-E 11         A-C-F      6      A-C-G
    3     2   A-B   3   A-D-E-C     1       A-D   2   A-D-E 6         A-D-E-F     5     A-D-C-G
                                                                                        A-D-E-C-
    4     2   A-B   3   A-D-E-C     1       A-D   2   A-D-E   5    A-D-E C-G-F    4
                                                                                           G
                                                                                        A-D-E-C-
    5     2   A-B   3   A-D-E-C     1       A-D   2   A-D-E   5    A-D-E-C-G-F    4
                                                                                           G
                                                                                                 Bellman-Ford algorithm
                         Routing tables (Step 5)
  Router             A           B               C                       D                       E               F                    G
                     Inter         Inter             Inter               Inter                   Inter               Inter                Inter
Destination CA,j face CB,j face CC,j face CD,j face CE,j face CF,j face CG,j face

     A                       2       A      3         E          1           A           2           D       5        G           4           C
     B           2       B                  4         B          3           A           4           D       6        G           5           C
     C           3       D   4       C                           2           E           1           C       2        G           1           C
     D           1       D   3       A      2         E                                  1           D       4        G           3           C
     E           2       D   4       A      1         E          1           E                               3        G           2           C
     F           5       D   6       C      2         G          4           E           3           C                            1           F
     G           4       D   5       C      1         G          3           E           2           C       1        G
                                  Router         A               B               C               D           E            F               G
                                 Destination CA,j Path CB,j Path CC,j Path CD,j Path CE,j Path CF,j Path CG,j Path
Routing tables                       A                       2       A       3       E       1       A   2       D    5       G       4       C
resulted from                        B       2       B                       4       B       3       A   4       D    6       G       5       C
 the previous                        C       3       D       4       C                       2       E   1       C    2       G       1       C
                                     D       1       D       3       A       2       E                   1       D    4       G       3       C
     step                            E       2       D       4       A       1       E       1       E                3       G       2       C
                                     F       5       D       6       C       2       G       4       E   3       C                    1       F
                                     G       4       D       5       C       1       G       3       E   2       C    1       G
                                                                                Bellman-Ford algorithm
              Step 5 and the final result
                                       A                                                   A
 Shortest paths in
                                               CA,D =1                                                     CA,D =1
the routing table of
                                       B CA,B =2                                           B CA,B =2
    the router A CA,C =3                                                    CA,C =3
                                                       D                                                   D
                            C                   CA,E=2                            C                        E   CA,E =2
              CA,G =4                                                CA,G =4
                                       F                                                   F
                  G                                        E                G
                            CA,F =5         h=5                                  CA,F =5        h=6

          h CA,B Path CA,C      Path       CA,D Path CA,E Path CA,F              Path      CA,G       Path
          0       -            -                -            -                -                  -
          1   2   A-B   5      A-C          1     A-D           -                -                -
          2   2   A-B   4     A-D-C         1     A-D      2   A-D-E 11          A-C-F      6      A-C-G
          3   2   A-B   3    A-D-E-C        1     A-D      2   A-D-E 6          A-D-E-F     5     A-D-C-G
                                                                                                  A-D-E-C-
          4   2   A-B   3    A-D-E-C        1     A-D      2   A-D-E    5   A-D-E C-G-F     4
                                                                                                     G
                                                                                                  A-D-E-C-
          5   2   A-B   3    A-D-E-C        1     A-D      2   A-D-E    5   A-D-E-C-G-F     4
                                                                                                     G
          Distance Vector: link cost changes

 Link cost changes:
  node detects local link cost change   1
                                                 Y
  updates distance table (line 15)          4        1
                                         X                Z
  if cost change in least cost path,
                                                 50
    notify neighbors (lines 23,24)

                                                          algorithm
                                                          terminates
―good
news
travels
fast‖
     Distance Vector: link cost changes


Link cost changes:
                                     60
 good news travels fast                     Y
                                         4        1
 bad news travels slowly -
                                     X                Z
  ―count to infinity‖ problem!               50

         Y            Y          Y
                                                          algorithm
                                                          continues
                                                                 on!
         Distance Vector: poisoned reverse

If Z routes through Y to get to X :
                                               60
 Z tells Y its (Z‘s) distance to X is                     Y
                                                   4            1
  infinite (so Y won‘t route to X via Z)
                                               X                    Z
 will this completely solve count to                      50
  infinity problem?
                                                                        algorithm
                  Y            Y           Y           Y                terminates
          The problem defined

 When only one routing path exists to a
  specific host, if severed, the routers will
  not update correctly due to system lag.
 Example follows
The problem defined


      A         B            C             D

          3              2             2



          A         B            C             D
  A        -        2,-          5,B           7,C
  B       3,-        -           2,-           4,C
  C       5,B       2,-           -            2,-
  D       7,B       4,C          2,-            -
The problem defined


      A         B             C             D

                         2              2

                             Update 1

          A         B             C             D
  A       -         -,-           5,B           7,C
  B       -,-        -            2,-           4,C
  C       -,-       2,-            -            2,-

  D       -,-       4,C           2,-            -
The problem defined


      A         B             C             D

                         2              2

                             Update 2

          A         B             C             D
  A       -         7,C           5,B           7,C
  B       -,-        -            2,-           4,C
  C       -,-       2,-            -            2,-
  D       -,-       4,C           2,-            -
The problem defined


      A         B             C             D

                         2              2

                             Update 3

          A         B             C             D
  A       -         7,C           9,B           7,C
  B       -,-        -            2,-           4,C
  C       -,-       2,-            -            2,-
  D       -,-       4,C           2,-            -
The problem defined


      A         B              C             D

                          2              2

                              Update 4

          A          B             C              D
  A       -         11,C           9,B           11,C
  B       -,-         -            2,-           4,C
  C       -,-        2,-            -             2,-
  D       -,-       4,C            2,-             -
The problem defined


      A         B             C              D

                         2               2

                             Update 5

          A          B             C              D
  A       -         11,C          13,B           11,C
  B       -,-        -             2,-           4,C
  C       -,-       2,-             -            2,-
  D       -,-       4,C            2,-            -
          The Problem Defined

 The process will continue until having 16
  ―hops‖, which is considered to be infinity.
 VERY slow convergence, packet loss
 Multiple solutions exist, one of them is the
  Poisoned Reverse
            Poisoned Reverse

 Implemented in the sender router
 Announces infinite weight to informing
   router for a specific path
(if Router B learned about a path from
   Router A, then its impossible that Router
   A could access that path through Router
   B, thus Router B announces infinity to
   Router A)
Poisoned Reverse


    A         B            C             D

        3              2             2



        A         B            C             D
A        -        2,-          5,B           7,C
B       3,-        -           2,-           4,C
C       5,B       2,-           -            2,-
D       7,B       4,C          2,-            -
Poisoned Reverse


    A         B            C             D

                       2             2



        A         B            C             D
A        -        -,-          5,B           7,C
B       -,-        -           2,-           4,C
C       -,-       2,-           -            2,-
D       -,-       4,C          2,-            -
      Poisoned Reverse


             A            B              C             D

                                     2             2



                    A           B            C             D
         A           -          -,-          5,B           7,C
         B          -,-          -           2,-           4,C
         C          -,-         2,-           -            2,-
         D          -,-         4,C          2,-            -



                            It C will announce
   For the path to A, router will announce to D the stored path to A,
infinite to B, since its router for that path is B of 5
                                          with cost
Poisoned Reverse


     A            B            C             D

                           2             2



            A          B           C             D
 A          -         -,-          -,-           7,C
 B          -,-        -           2,-           4,C
 C         -,-        2,-           -            2,-
 D          -,-       4,C          2,-            -



When B updates, C will update its own routing
table to infinity for the path to router A
          RIP ( Routing Information Protocol)



 Distance vector algorithm
 Included in BSD-UNIX Distribution in 1982
    RFC 1058 (version 1), RFC 1723 (version 2)

 Distance metric: # of hops (max = 15 hops)
 Distance vectors: exchanged every 30
  seconds via Response Message
     (also called advertisement)
 Each advertisement: routing info for
  maximum of 25 destination nets within the
  AS
                RIP Table processing


 RIP routing tables managed by application-level
  process called route-d (UNIX daemon)
 advertisements sent in UDP packets, periodically
  repeated
         Link-state routing algorithm

 The different names of the background
  mathematical algorithm:
      Forward search
      Dijkstra algorithm
      Shortest path (SP)
 The SP is the optimal path, however, this is not
  obviously the geometrically shortest path
 Other factor, which can be taken into account:
      Number of routers in the path
      delay
      cost
      Average traffic
      Reliability of the links in a certain path
               Dijkstra‘s algorithm

 Dijkstra's algorithm, named after its inventor the Dutch
  computer scientist Edsger Dijkstra, solves a shortest path
  problem for a directed and connected graph G(V,E) which
  has nonnegative (>=0) edge weights
 Dijkstra's algorithm is known to be a good algorithm to
  find a shortest path
                                     Dijkstra’s algorithm
                 The method…

 Finds the shortest path between a source node
  and the rest
 Finds routes between nodes by cost precedence
 Assumes every cost is a positive number
 Supports directed or bidirectional communication
                                   Dijkstra’s algorithm
    Initialisation – Example network

                     A


                 CA,B=2
                          CA,D=1
    CA,C=5       B
                          D
      C                   E
G
             F
                  M={A}
                                          Step 1                                Dijkstra’s algorithm

           Node                 B         C         D       E       F       G         Least cost
Cost of the least cost path     2         5         1                              new node: D
           Path                A-B       A-C       A-D      -       -       -

Node     Expression    Value            Evaluation           Resulted action
 B        CA,D+LD,B    1+=               >2                   No change
 C        CA,D+LD,C    1+3=4               4<5                   New path
 E        CA,D+LD,E    1+1=2               2<                   New path
 F        CA,D+LD,F    1+=              =                    No change
 G        CA,D+LD,G    1+=              =                    No change

                                                        A


                                               B    CA,B=2 CA,D=1
                               CA,C=4
                                                             D

                          G         C                        E CA,E=2
                                               F
                                                   M={A,D}
                                       Step 2                                    Dijkstra’s algorithm
                                                                                           Least cost
            Node                   B      C         D        E         F         G
                                                                                           new node
 Cost of the least cost path       2      4         1        2                  
                                                                                           (with smaller
            Path                   A-B A-D-C A-D A-D-E                 -         -
                                                                                           IP address) : B
Node     Expression      Value         Evaluation           Resulted action
 C        CA,B+LB,C      2+4=6            6>4                    No change
 E        CA,B+LB,E      2+=            >2                    No change
 F        CA,B+LB,F      2+=            =                    No change
 G        CA,B+LB,G      2+=            =                    No change

                          A                                                  A



                   B    CA,B=2 CA,D=1                              B       CA,B=2 CA,D=1
         CA,C=4                                     CA,C=3
                               D                                                  D

            C                  E CA,E=2                 C                         E CA,E=2
                                                G
     G             F                                              CA,F=6
                       M={A,B,D}                             F         M={A,B,D,E}
                                       Step 3                               Dijkstra’s algorithm

           Node                   B      C       D        E         F       G          Least cost
Cost of the least cost path       2      4       1        2                          new node: E
           Path                   A-B A-D-C A-D A-D-E               -       -

Node    Expression       Value         Evaluation         Resulted action
 C       CA,E+LE,C       2+1=3            3<4                 New path
 F       CA,E+LE,F       2+4=6            6<                 New path
 G       CA,E+LE,G       2+=           =                  No change




                         A                                              A



                  B    CA,B=2 CA,D=1                           B    CA,B=2 CA,D=1
       CA,C=4                                    CA,C=3
                              D                                             D

          C                   E CA,E=2               C                      E CA,E=2
                                             G
  G               F                                           CA,F=6
                      M={A,B,D}                           F        M={A,B,D,E}
                                                     Step 4                                  Dijkstra’s algorithm
           Node                     B           C         D       E         F            G              Least cost
Cost of the least cost path 2     3     1    2      6                                                  new node: C
           Path            A-B A-D-E-C A-D A-D-E A-D-E-F                                 -



    Node     Expression           Value             Evaluation        Resulted action
     F          CA,C+LC,F        3+6=9                 9>6              No change
     G          CA,C+LC,G        3+1=4                 4<              New path




                                        A                                                A



                                B CA,B=2 CA,D=1                                  B CA,B=2 CA,D=1
                  CA,C=3                                          CA,C=3
                                            D                                                D
                   C
                                            E CA,E=2                    C                    E CA,E=2
            G                  CA,F=4                         G                 CA,F=4
                           F      M={A,B,C,D,E}                             F      M={A,B,C,D,E,G}
                                           Step 5                               Dijkstra’s algorithm
              Node                     B     C             D       E            F        G
Cost of the least cost path          2        3     1    2      6        4
           Path                     A-B    A-D-E-C A-D A-D-E A-D-E-F A-D-E-C-G

                                   Least cost
                                   new node: G


         Node       Expression     Value      Evaluation               Resulted action
          F            CA,G+LF,G   4+1=5             5<6                    New path
                           A                                                    A



                   B    CA,B=2 CA,D=1                                   B    CA,B=2 CA,D=1
    CA,C=3                                            CA,C=3
                               D                                                    D
     C
                               E CA,E=2                        C                    E CA,E=2
G                 CA,F=4                         G                     CA,F=4
              F        M={A,B,C,D,E}                               F        M={A,B,C,D,E,G}
                                                                  Dijkstra’s algorithm

                  Step 6 (final result)
        Node                B           C          D       E      F        G
Cost of the least cost
                            2           3          1       2      4        4
        path
        Path               A-B    A-D-E-C A-D A-D-E A-D-E-C-G-F A-D-E-C-G


                                               A



                                       B    CA,B=2 CA,D=1
                         CA,C=3
                                                       D

                            C                          E CA,E=2
                 G                    CA,F=4
                                  F         M={A,B,C,D,E,F,G}
         Dijkstra’s algorithm
Step 1
Step 2   Dijkstra’s algorithm
         Dijkstra’s algorithm
Step 3
         Dijkstra’s algorithm
Step 4
         Dijkstra’s algorithm
Step 5
         Dijkstra’s algorithm
Step 6
         Dijkstra’s algorithm
Step 7
         Dijkstra’s algorithm
Step 8
         Dijkstra’s algorithm
Step 9
          Dijkstra’s algorithm
Step 10
          Dijkstra’s algorithm
Step 11
          Dijkstra’s algorithm
Step 12
       OSPF ―advanced‖ features (not in RIP)


 Security: all OSPF messages are authenticated (to
  prevent malicious intrusion); TCP connections used
 Multiple same-cost paths allowed (only one path in
  RIP)
 For each link, multiple cost metrics for different
  Types Of Service (e.g., satellite link cost set ―low‖
  for best effort; high for real time)
 Integrated uni- and multicast support:
      Multicast OSPF (MOSPF) uses same topology data base as
       OSPF
 Hierarchical OSPF in large domains.
Hierarchical OSPF
              Hierarchical OSPF

 Two-level hierarchy: local area and backbone.
    link-state advertisements only in local area
    each node has detailed area topology; only know
     direction (shortest path) to nets in other areas.
 Area border routers: ―summarize‖ distances to nets
  in own area, advertise to other Area Border routers.
 Backbone routers: run OSPF routing, limited to
  backbone.
 Boundary routers: connect to other ASs. (Note:
  synonymous with the ―gateway routers‖)
Differences between the forward and
   the backward search algorithms

   Forward search (Dijkstra algorithm)
      It increases the scope of the search in each
       step with including new node
   Backward search (Bellman-Ford algorithm)
      It increases the scope of the search in each
       step with including new hop
  Comparison of the distance-vector and
        the link-state algorithms
 Distance vector:
    Each router sends distance-vector, but to its neighbours
    The distance-vector contains the estimated distance to all other
     nodes
    Older method
    Problem of the „count-to-infinity‖ due to the fact, that the bad
     news are distributed too slowly
 Link-state:
    Each router sends link-state distance-vector to all others
    The link-state distance-vector contains the distance to the
     neighbours, only
    The distance value to the neighbour (called link-state) is accurate
    Recent method
           Comparison of LS and DV algorithms


Message complexity               Robustness: what happens
 LS: with n nodes, E links,       if router malfunctions?
  O(nE) msgs sent/broadcast
 DV: exchange between
                                 LS:
  neighbors only                       node can advertise
    convergence time varies            incorrect link cost
                                       each node computes only
Speed of Convergence                    its own table
 LS: O(n2) algorithm requires
  O(nE) msgs                     DV:
    may have oscillations             DV node can advertise
 DV: convergence time varies           incorrect path cost
    may be routing loops              each node‘s table used by
    count-to-infinity problem          others
       • poisoned reverse is             • errors propagate
         sometimes successful              through the network
        Router Architecture Overview
Two key router functions:
 run routing algorithms/protocol (RIP, OSPF, BGP)
   switch datagrams from incoming to outgoing link
                                                     Router architecture

                       Input Port Functions




     Physical layer:
bit-level reception
   Data link layer:        Decentralized switching:
    e.g., Ethernet          given datagram dest., lookup output port
                             using routing table in input port memory
                            goal: complete input port processing at
                             ‗line speed‘
                            queuing: if datagrams arrive faster than
                             forwarding rate into switch fabric (i.e.,
                             the packet is ―blocked‖)
                                           Router architecture
               Input Port Queuing

 If routing fabric is slower than input ports combined
  -> queuing may occur at input queues
 Head-of-the-Line (HOL) blocking: queued datagram
  at front of queue prevents others in queue from
  moving forward
   queuing delay and loss due to input buffer overflow!
                           Router architecture
Three types of switching fabrics




                        (interconnection
                        network)
                                              Router architecture
          Switching Via Memory
First generation routers:
 packet copied by system‘s (single) CPU
 speed limited by memory bandwidth (2 system bus
 accesses per datagram)
            Input     Memory         Output
            Port                     Port
                    DMA        DMA




                                              System Bus


Modern routers:
 input port processor performs lookup, copy into
shared memory
 Cisco Catalyst 8500
                                          Router architecture
               Switching Via Bus

 datagram from input port memory
  to output port memory via a shared
  bus
 bus contention: switching speed
  limited by bus bandwidth (only one
  packet at a time can use bus)
 1 Gbps bus - Cisco 1900: sufficient speed for access
  and enterprise routers (not regional or backbone)
                                       Router architecture
                     Output Ports




 Buffering required when datagrams arrive from
  the fabric faster than the transmission rate
 Scheduling discipline chooses among queued
    datagrams for transmission
                                            Router architecture
               Output port queuing




 buffering when arrival rate via switching fabric
    exceeds output line speed
   queuing (delay) and loss due to output port buffer
    overflow!
                       IPv6
 Initial motivation: 32-bit address space
  completely allocated by 2008 (maybe sooner…
  maybe later!)
 Additional motivation:
    header format changes were needed to improve
     speed of processing and forwarding
    header changes were required to facilitate QoS
    a new ―anycast‖ address was needed: route to
     ―best‖ of several replicated servers
 IPv6 datagram format:
    fixed-length 40 byte header (32 for addresses)
    no fragmentation allowed
                                                          IPv6
                  IPv6 Header

Priority: identify priority among datagrams in flow
Flow Label: identify datagrams in same ―flow.‖
           (concept of ―flow‖ not well defined).
Next header: identify upper layer protocol for data
  ver.   class         flow label             8 bytes



                                               32 bytes
                                                      IPv6
       Other Changes from IPv4

 Fragmentation: not allowed/supported
 Checksum: removed entirely to reduce
  processing time at each hop
 Options: allowed, but outside of header,
  indicated by ―Next Header‖ field
 ICMPv6: new version of ICMP
   additional message types, e.g. ―Packet Too Big‖
   multicast group management functions (IGMP)
                                                     IPv6
      Transition From IPv4 To IPv6

 Not all routers can be upgraded simultaneous
     How will the network operate with mixed IPv4 and
      IPv6 routers?
 Two proposed approaches (RFC 1933):
     Dual Stack: some routers with dual stack (v6, v4)
    can ―translate‖ between formats
   Tunneling: IPv6 carried as payload in IPv4
    datagram among IPv4 routers
                      IPv6
Dual Stack Approach
                                     IPv6
Tunneling


     IPv6 inside IPv4 where needed
                                                IPv6
                 Early 1990


• Concerns arose that major overhaul is needed to
  accommodate expected growth of the Internet
• Reports calling for :
     a. Guaranteed or Improved Quality of Services
     b. Better Security
     c. Range of Other Enhancement




• Internet Engineering Task Force (IETF)
  -------> IP version 6
                                                         IPv6
• But, however,
 a. The world is still being nicely served by IPv4
 b. Absolute barrier of address exhaustion has been
    delayed after 2010
 c. Effective speeds increased
 d. QOS & Security are now available from variety of vendors


• That’s why
 During the last year, the demands of a major Internet
 overhaul, have diminished
                                                IPv6

• But in reality :
    a. Rational users will only adopt new protocol
       when its benefit outweigh those of version 4
    b. Roll out off IPv6 very slowly

    c. The development of security and quality
       of service for version 6 were found can be
       applied directly to version 4

• Three majors recognized critical areas for
  improvements Internet Protocol are :
     - Scalability
     - Security
     - Quality of Service
                                                         IPv6
                     Scalability

• Major issue motivating development of the next generation
  Internet Protocol is the expected address exhaustion on IPv4

• But in 1990, InterNIC changed its policies on network number
  allocation to preserve the existing address space

• The absolute barrier of address exhaustion has been delayed
  until sometime after the year 2010
                                                        IPv4
                      Security

• The IPv4 specification does not explicitly include
  any security. Why?
  Early Internet was intended for information sharing between
  the few connected parties, so network layer security was not
  required

• Increasing commercial use and heightened awareness
 of electronic transmissions threats have increased
 development of security mechanism

• And IP Security Architecture (IPSec) was created
            IP Security Architecture



• Required by the IPv6
• Creating authenticated and encrypted connections
  with its three principal components :
   - Authentically Header (AH)
   - Encapsulating Security Payload (ESP)
   - Internet Key Exchange (IKE)

• But, it was found that this concept can be
implemented directly to IPv4
                                                       IPv6
                    Summary


- The move to version 6 is the classical chicken and
  egg dilemma
-Until enough others have already found value in
 making the switch
   -there is little motivation to migrate from IPv4

-Time and great effort is needed to mature the
  IPv6 technology in the three critical areas

-Currently IPv6 traffic is <~ 1/100 of IPv4 traffic

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:3
posted:9/20/2011
language:English
pages:129