COM 360 - PowerPoint PPT Presentation

1 / 278
About This Presentation
Title:

COM 360

Description:

COM 360 Chapter 4 Internetworking Interconnecting Networks Problem: There s more than one network Problems of Heterogeneity and Scale Heterogeneity- users on one ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 279
Provided by: facultyS84
Learn more at: http://faculty.sjcny.edu
Category:
Tags: com

less

Transcript and Presenter's Notes

Title: COM 360


1
COM 360
2
Chapter 4
  • Internetworking

3
Interconnecting Networks
  • Problem Theres more than one network
  • Problems of Heterogeneity and Scale
  • Heterogeneity- users on one type of network want
    to be able to communicate with users on other
    types of networks.
  • Internet Protocol(IP) and how it is used to build
    heterogeneous, scalable networks.
  • Principle of Routing- finding loop-free paths
  • The problem of the growth of the Internet- going
    from IPv4 to IPv6

4
Simple Internetworking
  • What is an internetwork?
  • Internetworks or internets (with lower case i)
    are large, highly heterogeneous networks with
    reasonably efficient routing.
  • They are a collection of networks that are
    interconnected to provide host-to-host packet
    delivery service.
  • With a capital I the Internet refers to the
    global Internetwork.

5
What is an Internetwork?
  • What is the difference between networks, subnets
    and internets?
  • A network is a directly connected or switched
    network, which uses a single technology (802.5,
    Ethernet, or ATM) and represents a physical
    network.
  • A subnet uses single IP address to denote
    multiple physical addresses.
  • An internet is a collection of networks or
    logical networks, built out of a collection of
    physical networks.

6
A Simple Internetwork
  • An internetwork is referred to as a network of
    networks because it is made up of many smaller
    networks.
  • For example, an internetwork can connect
    Ethernets, FDDI rings and Point-to-links (See
    next slide)
  • The nodes that connect them are called routers
    (and sometimes gateways)
  • The Internet Protocol is the tool used to build
    heterogenous internetworks.

7
A Simple Internetwork
HN host Rn router
8
Internet Protocol (IP)
  • IP is the tool used to build scalable,
    heterogeneous internetworks.
  • Originally called the Kahn-Cerf protocol after
    its inventors.
  • IP runs on all the hosts and routers and defines
    the infrastructure that allows them to function
    as a single network.

9
A Simple Internetwork
Shows Protocol layers used to connect H1 to
H8 ETH is the Protocol that runs over the Ethernet
10
Service Model
  • When you build an internet, start by defining the
    service model, or the host-to-host services that
    you want to provide, over each of the underlying
    physical networks.
  • An addressing scheme, which provides a way to
    identify all hosts in the internet
  • A datagram (connectionless) model of data
    delivery.
  • This service model is called best effort, because
    although IP makes every effort to deliver
    datagrams, it makes no guarantees.

11
Datagram Delivery
  • IP datagram is fundamental to the Internet
    Protocol
  • A datagram is a type of packet that is sent in a
    connectionless manner over a network.
  • Every datagram carries enough information to let
    the network forward the packet to its
    destination.
  • No set up mechanism is needed just send it and
    the network tries to get it to its destination.

12
Best Effort Delivery
  • If something goes wrong and a packet gets lost,
    corrupted or misdelivered, or in any way fails to
    reach its destination, the network does nothing.
    It is called unreliable service.
  • Best-effort, connectionless service is the
    simplest service for an internetwork.
  • Keeping the routers as simple as possible was one
    of the original design goals of IP.
  • The ability of IP to run over anything is its
    most important characteristic.

13
Data Transmission and Frames
  •    IP internet layer
  •  Constructs datagram
  •  Determines next hop
  •  Hands to network interface layer
  • Network interface layer
  •  Binds next hop address to hardware address
  •  Prepares datagram for transmission
  •  But ... hardware frame doesn't understand IP
    how is datagram transmitted?

14
Datagram Encapsulation
  • Network interface layer encapsulates IP datagram
    as data area in hardware frame
  •  Hardware ignores IP datagram format
  •  Standards for encapsulation describe details
  •  Standard defines data type for IP datagram, as
    well as others (e.g., ARP)
  •  Receiving protocol stack interprets data area
    based on frame type

15
Encapsulation in a Hardware Frame
16
Transmission Across an Internet
  • Each router in the path from the source to
    the destination
  •  Unencapsulates incoming datagram from frame
  •  Processes datagram - determines next hop
  • Encapsulates datagram in outgoing frame
  •   Datagram may be encapsulated in different
    hardware format at each hop
  • Datagram itself is (almost!) unchanged

17
Datagram Transmission
18
Datagram Delivery
  • A datagram is fundamental to the IP portocol
  • A datagram is sent in a connectionless manner
    over a network
  • Best effort if something goes wrong, the
    network does nothing.
  • Simples type of service- keeping routers simple
    was one of the design goals
  • Ability of IP to run over anything- main
    advantage (even a network of carrier pigeons!??)

19
IP Packets
  • Part of the IP service model is the type of
    packets it can carry.
  • IP datagram consists of a header followed by the
    number of bytes of data.
  • These are usually represented by 32-bit words,
    where the top word and the leftmost words are
    transmitted first.

20
IPv4 Packet Header
21
Packet Format
  • There are some subtle features of this simple
    model
  • The Version field specifies the current IP
    version, called IPv4. Putting it first makes it
    easy to define everything else.
  • HLEN specifies the length of the header (about 5
    words or 20 bytes).
  • TOS- is the Type of Service field
  • The LENGTH field (in bytes)- length of datagram,
    including the header

22
Packet Format
  • TTL- is the Time to Live field, set to a specific
    number (64 is current default) which the routers
    would then decrement, until it reached 0. It
    purpose is to discard packets that have been
    circling around and to discard them.
  • Protocol field identifies the higher level
    protocol (TCP, UDP) to which this packet should
    be passed.
  • Checksum- add the entire header and take the ones
    complement of the result.

23
Packet Format
  • SourceAddr- Source Address enables a recipient
    to reply
  • DestinationAddr - Destination Address this is
    key to the delivery of the datagram
  • IP defines its own global address space,
    independent of the physical network
  • There are also optional fields, which are rarely
    used.

24
Fragmentation and Reassembly
  • Each network technology has its own maximum
    packet size
  • (Ethernet 1500 bytes, FDDI- 4500 bytes)
  • Two choices for the IP service model
  • Make sure all IP datagams are small enough or
  • Provide a means by which packets can be
    fragmented and reassembled, when they are too big
    to be sent though a network technology

25
Fragmentation and Reassembly
  • Every network has a maximum transmission unit
    (MTU), which is the largest IP datagram that it
    can carry in a frame.
  • This value is smaller than the largest network
    packet size, because it must fit into the payload
    of the data link layer frame.
  • When a host sends a datagram it can choose any
    size. A reasonable choice is the MTU of the
    network to which it is directly attached.

26
Datagram Fragmentation
  • Router uses local MTU to compute the size of each
    fragment and puts part of the original data in
    each fragment and rest of the information in the
    header.

27
Fragmentation and Reassembly
  • Fragmentation will be necessary if the path to
    the destination includes a destination with a
    smaller MTU.
  • Fragmentation typically occurs in a router (in
    IPv4).
  • To enable the fragments to be reassembled at the
    receiver, each datagram carries the same
    identifier in the ident field.
  • The unique identifier is chosen by the sender.
  • If all fragments do not arrive at the receiver,
    it discards all datagram fragments and does not
    attempt to recover them.

28
Fragment Loss
  •   IP may drop fragment
  •   What happens to original datagram?
  •    Destination drops entire original datagram
  •    How does destination identify lost fragment?
  •    Sets timer with each fragment
  •    If timer expires before all fragments arrive,
    fragment assumed lost
  •    Datagram dropped
  •   Source (application layer protocol) assumed to
    retransmit

29
IP Datagram Traversing the Sequence of Physical
Networks
This is what happens when H1 sends a datagram to
H8. Assume 1500 bytes for an Ethernet, 4500 for
FDDI, 532 for PPP. The datagram is broken into 3
fragments at router 2, which are then forwarded.
30
Fragments
  • Each fragment is a self-contained IP datagram
    that is transmitted over physical networks,
    independent of the other fragments.
  • Each IP datagram is re-encapsulated for each
    physical network over which it travels.
  • Fragmentation is done in 8 byte chunks.
  • The router sets the M bit in the FLAGS field to
    indicate there are more fragments, and sets the
    OFFSET field to zero to indicate the first part
    of the datagram.

31
Header Fields Used in IP Fragmentation
a) Unfragmented packet
b) Fragmented packets
32
Fragmentation
  • Fragmentation is done in such a way that it could
    be repeated if a fragment arrived at another
    network with an even smaller MTU.
  • The fragments are easily reassembled independent
    of the order in which they are received.
  • Reassembly is done at the receiving host and not
    at each router. Why?
  • (See p. 243-247 for reassembly code.)

33
Path MTU Discovery
  • IP reassembly is not a simple process and should
    be avoided. ( For example, if a fragment is lost,
    the receiver still tries to reassemble the whole
    datatgram until it finally must discard it.)
  • Instead, hosts are encouraged to perform path
    MTU discovery by sending packets small enough to
    go through the path with the smallest MTU form
    sender to receiver. It first sends large
    datagrams, and if they are not successful, then
    is sends smaller ones, until it discover the
    smallest MTU from sender to receiver.

34
Global Addresses
  • Global uniqueness is the first property of an
    addressing scheme.
  • Ethernet addresses are flat and without
    structure.
  • IP addresses are hierarchical and are made up of
    several parts that correspond to parts of the
    network.
  • IP addresses consist of a network part and a host
    part.

35
Addresses For the Internet
  •   One difference between an internet and a
    physical network is that an internet is an
    abstraction imagined by its designers and created
    by software.
  • Designers choose addresses, packet formats, and
    delivery techniques independent of the hardware.
  •   One key aspect of virtual network is single,
    uniform address format
  •   Each address must be unique
  •   Can't use hardware addresses because different
    technologies have different address formats.

36
IP Addressing Scheme
  •   Addressing in TCP/IP is specified by the
    Internet Protocol (IP)
  •   Each host is assigned a 32-bit number
  • (4 octets, separated by dots) referred to as
    dotted octet ( e.g. 216.72.32.10)
  •   Called the IP address or Internet address
  •   Unique across entire Internet
  • Different from a domain name linux.sjcny.edu

37
IP Address Hierarchy
  •   Each IP address is divided into a prefix and a
    suffix
  •   Prefix identifies network to which computer is
    attached
  •   Suffix identifies computer within that network
  •   Each physical network is assigned a unique
    network number
  •   Address format makes routing efficient
  •  Each computer is assigned a unique address
  •  Network assignments are coordinated globally
    but suffixes can be assigned locally.

38
IP Addresses
  • The network part of the IP address identifies the
    network to which the host is attached
  • All hosts attached to the same network have the
    same network part in their IP address.
  • The host part or suffix, identifies each host
    uniquely on that network.

39
Classes of IP Addresses
  •   Designers chose a compromise - multiple
    address formats that allow both large and small
    prefixes
  •   Original scheme called classful IP addressing,
    divided the IP address space into 3 primary
    classes, where each class had a different size
    prefix and suffix
  •   Each format is called an address class
  • Class of an address is identified by first four
    bits

40
IP Addressing
  •   Octet (8-bit) boundaries are used to
    partition an address into prefix and suffix
  •   Class A, B and C are primary classes
  •   Used for ordinary host addressing
  •   Class D is used for multicast, a limited form
    of broadcast
  •   Internet hosts join a multicast group
  •   Packets are delivered to all members of group
  •   Routers manage delivery of single packet from
    source to all members of multicast group
  •   Used for MBone (multicast backbone)
  •   Class E is reserved ( for future use)

41
Computing the Class of an Address
  •   IP software computes the class of the
    destination address when it receives a packet.
  •   IP addresses are self-identifying because the
    class can be computed directly from the first few
    bits of the address
  •  The first 4 (leading) bits of the address
    denote the class
  • Class A begins with 0
  • Class B begins with 10
  • Class C begins with 110

42
Computing the Class of an Address
43
IP Address Classes
Prefix designates the network, suffix designates
the host.
44
Primary IP Address Classes
a) Class A
B) Class B
C) Class C
45
Dotted Decimal Notation
  •  Class A, B and C all break between prefix and
    suffix on byte boundary
  •  Dotted decimal notation is a convention for
    representing 32-bit internet addresses in decimal
  •  Convert each byte of address into decimal
    separate octet by periods ("dots'')
  •  Dotted decimal notation treats each octet as an
    unsigned binary integer
  •  Smallest value is 0.0.0.0 and largest is
    255.255.255.255

46
Dotted Decimal Notation
What would SJCs address be in binary (
216.73.32.0)?
47
Classes and Dotted Decimal Notation
  •  While dotted decimal makes separating network
    address from host address easier, determining
    class is not so obvious
  •  Look at first dotted decimal number, and use
    this table to calculate the class

48
Division of Address Space
  • Addressing scheme is flexible and allows networks
    of various sizes to be accommodated efficiently
  • Original idea was that Internet would consist of
    small number of wide area networks (Class A), a
    few site (or campus) sized (Class B) networks,
    and a large number of LANs (Class C)
  • Additional flexibility was needed and removed
    some of the distinction between classes present
    in this classful scheme.

49
Division of Address Space
  •  IP Class scheme does not yield equal number of
    networks in each class
  •  Class A
  •  First bit must be 0
  •  7 remaining bits identify Class A net
  •  27 ( 128) possible class A nets
  •  Number of bits allocated to a prefix or suffix
    determines how many unique numbers can be
    assigned
  •  A prefix of n bits allows 2n unique network
    numbers, while a suffix of n bits allows 2n hosts
    number on a given network

50
Number of Networks and Hosts
51
Authority for Addresses
  • An organization obtains unique network numbers
    from an Internet Service Provider (ISP), which
    coordinates with the Internet Assigned Number
    Authority. A network administrator can assign
    prefixes in a private internet.
  • (See Internic, ICANN, Educause, etc.)

52
Insufficient Addresses
  •  Large organizations may not be able to get as
    many addresses in the Internet as they need
  •  Example - UPS needs addresses for millions of
    computers
  •  One solution - set up private internet and
    allocate addresses from entire 32-bit address
    space
  • Others do not use all their assigned addresses
  • For example, SUNY Stony Brook has a Class B
    license but probably only uses 3000-40,000
  • of its 216 addresses (65,536 possible).

53
A Classful Addressing Scheme
  •   Select address class (usually class C) for
    each network depending on expected number of
    hosts
  •   Chosen by the internet service provider for
    the internet
  •   Chosen by the network administrator in a
    private network
  •   Assign network numbers from appropriate
    classes
  •   Assign host suffixes to form internet
    addresses for all hosts

54
Classful Addressing with Private internets
  • Consider an organization with a private TCP/IP
    with 4 networks, connected by routers.
  •  A prefix is chosen denoting the class (A,B,C)
    depending on the size of the network
  •  In the next example, there is one Class A
    network
  • (prefix 10), two class B prefixes (128.100 and
    128.211) and one class C (192.5.48).
  •  The IP address assigned to the host begins with
    the prefix assigned to the host's physical
    network
  •  Suffixes, which are assigned by the local
    network administrator, can be arbitrary numbers,
    often chosen sequentially.

55
Classful Addressing with Private internets
56
Subnet and Classless Addressing
  • Two mechanism were invented to overcome the
    addressing limitations
  • 1.     Subnet addressing
  • 2.     Classless addressing
  • These are so closely related that they can be
    thought of as a single abstraction instead of
    having 3 distinct address classes, allow the
    division between prefix and suffix to occur on an
    arbitrary bit boundary.

57
Address Masks
  • How can an IP address be divided at an arbitrary
    boundary?
  • It requires an additional piece of information to
    be stored with each address. This information
    specifies the exact boundary between the network
    prefix and the host suffix.

58
Address Masks
  • To use classless or subnet addressing the routers
    must store 2 pieces of information
  • the 32 bit address and
  • another 32 bit value that specifies the boundary
    between the prefix and suffix.
  • This second value is called the called the subnet
    mask and 1 bits mark the network prefix and zero
    bits mark the host portion. This makes
    computation efficient.

59
Routers and Addresses
  • Routers compare the network prefix portion of the
    address to a value in their routing tables.
  • Suppose a router is given a destination address,
    D and a pair (A,M) that represents the 32 bit
    address and the 32 bit subnet mask.
  • To make the comparison, the router tests the
    logical "and" condition to set the host bits of
    address D to zero and then compares the result
    with the network prefix A
  • A ( D M)

60
Routers and Addresses
  • For example consider this 32 bit mask
  • (255.255.0.0 in decimal)
  • 11111111 11111111 00000000 00000000
  •   and the network prefix (128.10.0.0 in decimal)
  • 10000000 00001010 00000000 00000000
  • Now consider the 32 bit destination address
    128.10.2.3 which has the binary equivalent of
  • 10000000 00001010 00000010 00000011
  • The logical "and" between the destination address
    and the address mask produces the result
  • 10000000 00001010 00000000 00000000
  • which is equal to the prefix 128.10.0.0

61
CIDR (Classless Interdomain Routing) Notation
  • Inside the computer each address mask is stored
    as a 32 bit value in binary, which is then
    expressed in dotted octet notation.
  • The new CIDR notation append a slash and the size
    of the mask in decimal notation
  • For example 128.10.0.0/16

62
CIDR Address Block Example
  • Suppose an ISP has a single Class B license
    128.211.00.0. Using a classful address scheme,
    he/she can only assign the prefix to one
    customer, who can have up to 216 host addresses.
  • Using CIDR, the ISP could assign the entire
    prefix to a single organization by using
    128.211.0.0/16
  • Or he could partition the address into three
    pieces (two of them big enough for 2 customers
    with 12 computers each and the remainder
    available for future use.

63
CIDR Address Block Example
  • One customer could be assigned 128.211.0.16/28
  • and the other could be assigned 128.211.0.32/28
  • Both customers have the same mask size (28 bits),
    but the prefixes differ and each has a unique
    prefix. More importantly the ISP retains most of
    the addresses, which can then be assigned to
    other customers.

64
CIDR Host Address
65
Special IP Addresses
  • IP assigned a set of addresses that are reserved
    and never assigned to hosts
  • Network Address
  • IP reserves host address zero and uses it to
    denote a network. (For example,128.211.0.0 is a
    Class B network)
  • Direct Broadcast Address
  • It is formed by adding a suffix consisting of all
    1's to the network prefix (For example,
    128.211.111.111)
  • Limited Broadcast Address
  • A broadcast on a local physical network (or
    limited to a "single wire") is used during system
    startup by a computer that does not yet know the
    network number. The address with all 1's is a
    limited broadcast.

66
Special IP Addresses
  • This Computer Address
  • A computer needs to know its own IP address to
    send or receive internet packets. The TCP/IP
    protocol allows a computer to obtain its address
    automatically but strangely enough, when using
    these startup protocols the computer cannot
    supply a correct IP source address. To handle
    such cases, IP reserves the address that consists
    of all zeroes to mean "this computer".

67
Special IP Addresses
  • Loopback Address
  • A loopback address is used to test network
    applications. IP reserves the network prefix 127
    for use with loopback and programmers usually use
    the host number 1 (forming the address 127.0.0.1)
    for loopback testing.
  • During loopback no packets actually leave the
    machine - the IP software forwards packets from
    one application program to another on the same
    computer. Therefore the loopback address never
    appears in a packet traveling across the network.

68
Summary of Special IP Addresses
  • Special addresses are reserved and should never
    be assigned to host computers.
  • Each special address is restricted to certain
    uses.

69
Datagram Forwarding in IP
  • Forwarding is the process of taking a packet from
    an input and sending it out on the appropriate
    output.
  • Routing is the process of building the tables
    that allow the correct output for a packet to be
    determined.

70
Bridges, Switches, Routers
  • All forward messages form one link to another.
  • Bridges are data link-level nodes and forward
    frames from one link to another (in a LAN).
  • Switches are network layer nodes, which forward
    packets in a switched network.
  • Routers are internet-level nodes which forward
    datagrams from one network to another.
  • Bridges and switches are often called Layer2
    Switches, meaning above the physical and below
    the internet layer.

71
Datagram Forwarding in IP
  • Main ideas needed to forward IP packets
  • Every IP datagram contains the IP address of the
    destination host.
  • The network part of the IP address uniquely
    identifies a single physical network on the
    larger Internet.
  • All hosts and routers that share the same network
    part of their address are connected to the same
    physical network and can communicate by sending
    frames over that network.
  • Every physical network that is part of the
    Internet has at least one router that is also
    connected to at least one other network and can
    exchange packets with hosts or routers on either
    network.

72
Forwarding An IP Datagram
  • IP packets are sent from a source to a
    destination host, possibly passing through
    several routers.
  • Any node (host or router) tries to determine if
    it is connected to the same physical network as
    the destination, by comparing the network address
    part of the destination address with the network
    address part of each interface address. ( Hosts
    have one address, routers have two or more, since
    they are connected to multiple networks.)
  • If there is a match, the destination is on the
    same network and the packet is delivered.

73
Forwarding An IP Datagram
  • If the node is not connected to the same physical
    network as the destination, it sends the datagram
    to a router, called the next hop router.
  • The router finds the correct next hop by
    consulting its forwarding or routing table.
  • The table is primarily a list of (NetworkNum,
    NextHop) pairs.
  • There is usually a default router if none of the
    entries match the destinations network number.

74
Forwarding Algorithm
  • if (Destination NetworkNum NetworkNum
  • of one of my interfaces)
  • deliver packet to destination over the
    interface
  • else if (Destination NetworkNum is in my
  • forwarding table)
  • deliver packet to NextHop router
  • else
  • deliver packet to default router.

75
Forwarding Example
Suppose H1 wants to send a datagram to H2- on
same network sends directly. What about H1 to H8?
(R1, R2, R3)
Routing table for R2
76
Forwarding Tables
  • Simple enough to be manually configured
  • Usually built by routing protocol
  • Routers contain tables that list only a set of
    network numbers, not all the hosts. Sometimes
    they also contain interface information.

77
Routers and IP Addressing
  •   IP address depends on network address
  •   What about routers - connected to two
    networks?
  •   IP address specifies an interface, or network
    attachment point, not a computer
  •   Router has multiple IP addresses - one for
    each interface

78
Principle of Scalability
  • An important principle of building a scalable is
    to reduce the amount of information stored in
    each node.
  • Most common way to do that is a hierarchical
    aggregation. IP uses a 2 level hierarchy, with
    networks at the top level and nodes at the
    bottom.
  • Information is aggregated by letting routers deal
    only with reaching the right network, and the
    information that a router needs is represented by
    a single piece of information.

79
Router Implementation
  • Control processor is responsible for running the
    routing protocols.
  • The switching fabric transfers packets from one
    port to another.
  • Routers differ from switches
  • Must handle variable length packets

80
Block Diagram of a Router
81
Address Translation (ARP)
  • IP addresses are virtual because they are
    maintained by software
  • Neither LAN nor WAN hardware understands the
    relationship between
  • an IP address prefix and a network nor
  • an IP address suffix and a particular computer
  • Upper levels of protocol stack use protocol
    addresses
  • Network hardware must use hardware address for
    eventual delivery

82
Address Translation (ARP)
  • Protocol address must be translated into hardware
    address for delivery and there are three methods
  • Used with WAN hardware- uses table look up
  • Uses a mathematical function to translate the
    addresses
  • Uses a distributed system in which two computers
    exchange messages

83
Protocol Addresses and Packet Delivery
  • An application places the data in a packet, which
    contains the protocol address of the destination
  • Software in the host or router uses the
    destination address to select the next hop for
    the packet and transfers the packet.
  • Both the next hop and the destination address are
    IP addresses.
  • But there is a problem with this!

84
Protocol Addresses and Packet Delivery
  • Problem The physical hardware does not
    understand IP addressing and addresses in a
    frame must be physical addresses.
  • Solution Protocol addresses of next hop must be
    translated into hardware addresses

85
Address Translation
  • Address TranslationUpper levels use only
    protocol addresses
  • "Virtual network" addressing scheme
  • Hides hardware details
  • Translation occurs at data link layer
  • Upper layer hands down protocol address of
    destination
  • Data link layer translates into hardware address
    for use by hardware layer

86
Address Resolution
  • Finding or mapping or translating hardware
    address for protocol address
  • Called address resolution
  • Data link layer resolves protocol address to
    hardware address
  • Resolution is local to a network
  • Network component only resolves address for other
    components on same network

87
Address Resolution
88
Address Resolution Techniques
  • Three techniques are used for address resolution
    depending on the protocol
  • Table lookup
  • Bindings or mappings are stored in a table memory
    with protocol address as key
  • Data link layer looks up protocol address to find
    hardware address
  • Closed-form computation
  • Protocol address based on hardware address
  • Data link layer computes the hardware address
    from protocol address by using basic Boolean and
    arithmetic operatons
  • Simply choose hardware address to be hostid and
    any host can determine hardware address as
  • hardware_address ip_address 0xff
  • Dynamic Message Exchange
  • Network messages used for "just-in-time"
    resolution
  • Data link layer sends message requesting hardware
    address destination responds with its hardware
    address

89
Address Resolution
  • A resolves protocol address for B for protocol
    messages from an application on A sent to an
    application on B
  • A does not resolve a protocol address for F
  • Through the internet layer, A delivers to F by
    routing through R1 and R2
  • A resolves R1 hardware address and sends packet
    to router.
  • Software on R1 resolves the address for R2
  • R2 receives the packet and resolves the address
    for F
  • Network layer on A passes packet containing
    destination protocol address F for delivery to R1
    which forwards it to R2 and then to F

90
Address Translation (ARP)
  • IP datagrams contain IP addresses, but the host
    or router to which it is sent only understands
    network addresses.
  • Need to translate the IP addresses to link-level
    addresses.
  • One solution is to map an IP address to a
    physical address by encoding the hosts physical
    address into the host part of the IP address.
  • More general solution is for each host to
    maintain a table of address pairs and to map an
    IP address to a physical address.
  • Better approach each host dynamically learns
    the contents of the table using the network and
    ARP.

91
Address Translation (ARP)
  • Goal of Address Resolution Protocol (ARP) is to
    enable each host on the network to build a table
    of mappings between IP addresses and data link
    level addresses.
  • Set of mappings stored in a host is called the
    ARP cache or ARP table.
  • ARP takes advantage of the fact that many
    technologies support broadcast.

92
ARP Packet Format
Used to map IP addresses into Ethernet Addresses
93
ARP Message Delivery
  • ARP request message dropped into hardware frame
    and broadcast
  • Uses separate protocol type in hardware frame
    (ethernet 806)
  • Sender inserts IP address into message and
    broadcast
  • Every other computer examines request
  • Computer whose IP address is in request responds,
    others discard it
  • Puts hardware address in response
  • Unicasts to sender
  • Original requester can then extract hardware
    address and send IP packet to destination

94
ARP Message Exchange
95
ATMARP
  • ARP procedure will not work with an ATM network
    because it depends on the fact that ARP packets
    can be broadcast to all hosts on a single
    network.
  • On solution is to use LAN emulation, which makes
    an ATM network behave like a shared media LAN.
  • LAN can be inefficient in a wide area ATM
    network.
  • There is a different ARP procedure called ATMARP
    that does not depend on LAN emulation or
    broadcast.
  • ATMARP relies on a server to resolve addresses.

96
Logical IP Subnets
  • A large ATM can be subdivided into several
    smaller subnets, which behaves like a single
    network.
  • All nodes on the same subnet have the same IP
    network number and can communicate directly.
  • An advantage of the LIS model is that we can
    connect a large number of hosts and routers to a
    big ATM network with out necessarily giving them
    all addresses from the same IP network.
  • This makes it easier to manage address assignment
    and improves scalability

97
Logical IP Subnets
An example of an ATP network divided into two
LIS. One has an IP address of 10 and the other
is 12.
98
Summary of Basic IP Mechanisms
  • Heterogeneity-IP defines best effort service
    based on unreliable datagrams
  • Uses a common packet format with fragmentation
    and reassembly
  • Uses a common global address space and ARP for
    identifying all hosts
  • Scalability-IP hierarchical aggregation reduces
    the amount of information needed to forward
    packets. IP addresses are partitioned into
    network and host components. Packets are routed
    first to a network and then delivered to the
    correct host on that network.

99
Host Configuration (DHCP)
  • Ethernet addresses are configured into the NIC
    card by the manufacturer and assures that these
    addresses are unique.
  • IP addresses, by contrast, must be unique on an
    internetwork, and also must reflect the structure
    of that network with a network part and a host
    part.
  • A host also needs the address of a default
    router- the place to which it can send packets.
  • Dynamic Host Configuration Protocol (DHCP)

100
Host Configuration (DHCP)
  • Most operating systems provide a way to manually
    configure the IP information needed by a host,
    but there are disadvantages to this
  • This is a lot of work
  • It is error prone, since every host must get a
    unique number
  • Usually automated methods are required, using a
    protocol called Dynamic Host Configuration
    Protocol (DHCP).
  • There is at least one DHCP server that is the
    central repository for the host configuration
    information.

101
Host Configuration (DHCP)
  • DHCP relies on a server that is responsible for
    providing configuration information to hosts.
  • Configuration information for each host is stored
    in the server and automatically retrieved when it
    is booted or connected to the network.
  • Administrator can assign addresses or allow the
    DHCP server to maintain an available pool of
    addresses that it provides to hosts on demand.

102
Host Configuration (DHCP)
  • First problem faced by DHCP server is that of
    server discovery.
  • To contact an DHCP server, a newly booted or
    attached host sends a DHCPDISCOVER message to a
    special IP address (25.255.255.255) that is an IP
    broadcast address.
  • It is received by all hosts an routers on the
    network. (Routers do not forward these packets
    beyond this network.)
  • The server would reply to the host and the other
    nodes would ignore it.

103
Relay Agent
  • Since requiring a DHCP server on every network
    would need a large number of servers, the DHCP
    uses the concept of a relay agent.
  • There is at least one relay agent on each network
    and it is configured with just one piece of
    information- the IP address of the DHCP server.
  • When it receives a DHCPDISCOVER message, it
    unicasts to the DHCP server and waits for the
    response which it sends back to the requesting
    client.

104
DHCP
A DHCP relay agent receives a broadcast
DHCPDISCOVER message from a host and sends a
unicast DHCPDISCOVER message to the DHCP server.
105
DHCP Packet
  • A DHCP packet is actually sent using a protocol
    called UDP (User Datagram Protocol) that runs
    over IP.
  • The UDP packet provides a demultiplexing key that
    says This is a DHCP packet.
  • Client puts its address in the chaddr field.
  • DHCP server responds by filling in the yiaddr
    field (your IP address). These addresses are
    leased and the host needs to renew the lease if
    it is still connected.
  • Other information such as the default router can
    be included in the options field.

106
DHCP Packet Format
107
DHCP Management
  • By allowing network managers to configure a range
    of IP addresses per network rather than one IP
    address per host, DHCP improves the manageability
    of the network.
  • DHCP may also introduce some more complexity to
    the network since it makes binding between
    physical hosts and IP addresses more dynamic.
  • This makes the managers job more difficult when
    it is necessary to locate a malfunctioning host.

108
Error Reporting (ICMP)
  • How does the Internet treat errors?
  • IP drops datagrams when a fragment fails to
    arrive at a destination.
  • It has a companion protocol, called the Internet
    Control Message Protocol (ICMP), that defines a
    collection of error messages that are sent back
    to the source when an router or host is unable
    to process a datagram successfully.
  • Examples host is unreachable, TTL is 0, header
    checksum failed, etc.

109
ICMP Messages
110
Error Reporting (ICMP)
  • ICMP also defines other control messages that a
    router can send back to a source host.
  • ICMP-Redirect tells the source host that there is
    a better route to the destination.
  • The source host adds this new route to its
    forwarding table and uses it for future datagrams
    addressed to that destination.

111
ICMP Transport
  •   ICMP uses IP to transport an error message
  •   Router creates the datagram and encapsulates
    the ICMP message in the datagram.

112
Using ICMP Messages to Test Reachability
  •  An internet host, A, is reachable from another
    host, B, if datagrams can be delivered from A to
    B
  •  The ping program tests reachability - sends
    datagram from B to A that A echoes back to B
  •  Ping uses ICMP echo request and echo reply
    messages
  • Internet layer includes code to reply to incoming
    ICMP echo request messages

113
Using ICMP To Trace a Route
  •   List of all routers on path from A to B is
    called the route from A to B
  •   traceroute uses UDP (User Datagram Protocol)
    to non-existent port and TTL field to find route
    via expanding ring search
  •   Sends ICMP echo messages with increasing TTL
  •   Router that decrements TTL to 0 sends ICMP
    time exceeded message, with router's address as
    source address
  •   First, with TTL 1, gets to first router, which
    discards and sends time exceeded message
  •   Next, with TTL 1, gets through first router to
    second router
  •   Continue until message from destination
    received
  •   traceroute must accommodate varying network
    delays
  • Must also accommodate dynamically changing routes

114
Using ICMP For Path MTU Discovery
  •  Fragmentation should be avoided
  •  How can source configure outgoing datagrams to
    avoid fragmentation?
  •  Source determines path MTU - smallest network
    MTU on path from source to destination
  •  Source probes path using IP datagrams with
    don't fragment flag
  •  Router responds with ICMP fragmentation
    required message
  • Source sends smaller probes until destination
    reached

115
Virtual Networks and Tunnels
  • On most internets, it is possible for nodes to
    communicate with other nodes on different
    networks.
  • There are situations, where controlled
    connectivity s required- these are virtual
    private networks (VPN).
  • Communication is restricted to take place only
    among these sites (often of a corporation),
    providing security.

116
Virtual Private Networks
  • To make a private network virtual, the leased
    transmission lines, that are not shared, are
    replaced by some sort of shared network.
  • A Virtual Circuit is a reasonable replacement
    because it provides a logical point-to-point
    connection between two sites.

117
Virtual Private Networks
a) Two separate private networks
b) Two virtual private networks sharing common
switches
118
Virtual Private Networks and Tunnels
  • Two separate corporations may migrate to a
    virtual circuit network.
  • The limited connectivity of a private network is
    maintained, but since the networks share
    switches, we say that two virtual private
    networks have been created.
  • An ATM or Frame Relay can provide the
    connectivity or an IP network can be used by
    providing a tunnel.

119
Tunnels
  • An IP tunnel is a virtual point-to-point link
    between a pair of nodes that are separated by an
    arbitrary number of networks.
  • This virtual link is created within the router at
    the entrance by providing it with the IP address
    of the router at the far end of the tunnel.

120
Routing Through a Tunnel
  • When a router at the entrance wants to send a
    packet over this virtual link, it encapsulates
    the a packet inside an IP datagram.
  • The destination address is the address of the
    router at the end of the tunnel, and the source
    address is the router at the entrance.
  • The virtual link, looks similar to a normal link
    in the routing table.

121
A Tunnel Through an Internetwork
1
0
virtual
R1 has two physical interfaces Interface 0
connects to Network 1, interface 1 connects to
the Internetwork and is the default. It also has
a virtual interface to the tunnel.
122
Tunneling
  • Suppose a tunnel has been configured from R1 to
    R2 and assigned a virtual interface number of 0.
    The forwarding table might look like this

123
Tunneling Example
  • Suppose R1 receives a packet from Network 1 that
    is addressed to network 2.
  • To send it out on the virtual interface, the
    router adds an IP header addressed to R2 and then
    proceeds to forward the packet as I it had been
    received.
  • R2s address is 10.0.0.1 since the network number
    of this address is 10 not 1 or 2
  • When R2 receives the packet it removes the IP
    header and processes it.

124
Why Tunnels?
  • Why create a tunnel?
  • Greater security- it becomes a private link
    across a public network.
  • R1 and R2 have properties like multicast routing
    and by connecting them with a tunnel, all these
    routers appear to be connected. This is how the
    MBone (multicast backbone ) is built.
  • Tunnels can carry packets from protocols other
    than IP across an IP network. As long as the
    routers can handle other protocols, the IP tunnel
    looks to them like a point-to-point link over
    which they can send non-IP packets.
  • Tunnels also provide a mechanism by which we can
    force a packet to be delivered to a particular
    place.

125
Disadvantages of Tunnels
  • It increases the length of packets causing a
    waste of bandwidth for short packets.
  • Routers at the endpoints must also do more work
    as they add and remove tunnel headers.
  • There is also a management cost to set up the
    tunnels and and make sure they are correctly
    handled by the routing protocols.

126
Routing
  • A switch or router needs to be able to look at a
    packets destination address and then to
    determine which of the output ports is the best
    one for that destination.
  • In datagram networks, including IP networks,
    routing is an issue for every packet.
  • In virtual circuits routing is an issue only for
    the connection request packets all subsequent
    packets follow the same path.
  • The switch makes a decision by consulting a
    forwarding table.

127
Forwarding and Routing
  • The fundamental problem of routing is How do
    switches and routers acquire the information in
    their forwarding tables?
  • Forwarding consists of taking a packet,
    consulting a table and sending the packet in the
    direction determined by the table. This is a
    relatively simple and well-defined process
    performed locally at a node.
  • Routing is the process by which the forwarding
    tables are built. This depends on complex
    distributed algorithms that continue to evolve.

128
Forwarding and Routing Tables
  • Forwarding table and routing table are sometimes
    used interchangeably but there is a distinction.
  • The forwarding table is used when a packet is
    being forwarded and must contain enough
    information to accomplish that task. This
    requires that a row in the table must contain the
    mapping from a network number to an outgoing
    interface and some MAC information, such as the
    Ethernet address of the next hop.
  • The routing table, built up by the routing
    algorithm as a precursor to the forwarding table,
    contains mappings from network numbers to next
    hop and information about how this was learned.

129
Forwarding and Routing Tables
  • There are reasons for implementing these tables
    as separate data structures
  • The forwarding table needs to be structured to
    optimize the process of looking up a network
    number when forwarding a packet.
  • The routing table needs to be optimized for
    calculating changes in topology.
  • The forwarding table is sometimes implemented in
    specialized hardware, but this is rarely done
    with the routing table.

130
Routing and Forwarding Tables
b) A Forwarding Table- the MAC Address is
provided by the Address Resolution Protocol (ARP)
a) A Routing Table
131
Scalability
  • Key question in building a mechanism for the
    Internet is Does this solution scale?
  • The answer for the previous algorithms and
    protocols is NO, since they are designed for
    networks of modest size(lt 100) nodes.
  • These do serve as building blocks for a
    hierarchical infrastructure that is used in the
    Internet today.

132
Domains
  • These protocols collectively are called
    intradomain routing protocols or interior gateway
    protocols(IGPs).
  • A routing domain is an internet in which all the
    routers are under the same administrative control
    (e.g. Single campus or single ISP)
  • For now, we are considering the problem of
    routing in a small to midsize network, not the
    full Internet.

133
Network as a Graph
  • Routing in essence is a problem of graph theory.
  • The nodes may be hosts, switches, routers or
    networks.
  • The edges of the graph correspond to the network
    links. Each edge has an associated cost, which
    indicates the desirability of sending traffic
    over that link.

134
Network Represented as a Graph
135
The Routing Problem
  • The basic problem of routing is finding the
    lowest cost path between any two nodes, where the
    cost of a path equals the sum of the cost of all
    the edges on the path.
  • For a simple path calculate all the shortest
    paths and store them on each node.
  • Such a static approach has shortcomings
  • It does not deal with node or link failures
  • It does not consider the addition of new nodes or
    links
  • It implies that edge costs do not change

136
Routing Protocols
  • Routing is achieved by running protocols among
    the nodes. These protocols provide a distributed,
    dynamic way to solve the problem of finding the
    lowest cost path in the presence of link and node
    failures and changing edge costs.
  • It is difficult to make centralized solutions
    scalable so the widely used protocols are
    distributed and are areas of challenges and
    research.

137
Distributed Protocols
  • Distributed algorithms raise the possibility that
    two routers will at one instant have different
    ideas about the shortest path to some
    destination.
  • Packets can become stuck in a loop if each router
    thinks the other one is closer to the
    destination. This discrepancy must be resolved as
    soon as possible.
  • Assume the edge costs in a network are known.
  • The two main classes of routing protocols are
    distance vector and link state.

138
Distance Vector (RIP)
  • RIP ( Routing Information Protocol) dynamically
    builds a routing table using the distance vector
    algorithm.
  • The idea behind the distance vector algorithm is
    that each node constructs a one dimensional array
    (vector) containing the distances (costs) to all
    other nodes and distributes that vector to its
    immediate neighbors.
  • Each node knows the cost of its directly
    connected neighbors.
  • A link that is down is assigned an infinite cost.

139
Distance Vector Routing
  • In the next graph, the cost of each link is set
    to 1, so that the least cost path is simply the
    one with the fewest hops.
  • We represent each nodes knowledge as a table.
  • Note that each node only knows the information
    in on row of the table (the one in the left
    column that bears its name)
  • The global view is not available at any single
    point in the network.

140
Distance Vector Routing
141
Global View of Initial Distances
142
Initial Routing Table at Node A
143
Routing At Node A
  • Initially the routing table at each node reflects
    the beliefs that a packet can reach a connected
    node in one hop and that others are unreachable.
  • The next step in distance-vector routing is that
    every node sends a message to its directly
    connected neighbors containing its list of
    distances.
  • The router learns the new paths and can update
    its table with the new costs for next hops.
  • It takes only a few exchanges before each node
    has a complete routing table.

144
Final Routing Table At Node A
145
Final Routing Tables
  • The process of getting constant routing
    information to all the nodes is called
    convergence.
  • There is no one node in the network that has all
    the information in this next table.
  • Each node knows only the content of its own
    routing table.
  • This distributed algorithm enables all nodes to
    achieve a consistent view of the network without
    a centralized authority.

146
Final Distances Stored at Each Node (Global View)
147
Other Distance Vector Issues
  • When does a given node send a routing update to
    its neighbors?
  • Periodic update sends every so often (several
    seconds to several minutes) even if nothing
    changes. Lets others know it is still running.
  • Triggered update- sent when a node receives an
    update from a neighbor that causes a change in
    its routing table.

148
Other Distance Vector Issues
  • What happens when a link or node fails?
  • The nodes, that notice the failure, send a new
    list of distances to their neighbors and tables
    are updated.
  • How does a node detect a failure?
  • Nodes test links by sending control packets and
    wait for an acknowledgement.
  • Nodes determine a link is down when it does not
    receive a periodic update.

149
Count to Infinity Problem
  • Sometimes the network does not stabilize.
  • ( See example p. 278) Each node advertises an
    unreachable link and the hop count increases on
    each router table in a cycle.
  • Partial solution uses a relatively small number s
    an approximation to infinity.
  • Split horizon solution- when a node sends an
    update, it does not include those it learned from
    a neighbor
  • back to the neighbor.
  • These solutions do not work for large routing
    tables.

150
Routing Information Protocol (RIP)
  • Use is widespread since it was distributed with
    Berkely Unix.
  • It s also simple and based on the distance-vector
    algorithm.
  • Routing in internetworks differ slightly.
  • In an internetwork, the goal of the routers is to
    learn how to forward packets to other networks.
  • Instead of advertising the cost of reaching other
    routers, they advertise the cost of reaching
    other networks.

151
Example Network Running RIP
Router C advertises to router A that it can reach
networks 2,3 at a cost of 0 networks 5,6 at a
cost of 1, and network 4 at a cost of 2.
152
RIP Packet Format
153
RIP
  • RIP is a straightforward implementation of
    distance-vector routing and one of the most
    widely used.
  • Built on distance-vector algorithm.
  • Routers running RIP send their advertisements
    every 30 seconds.
  • A router sends an update message when its table
    changes.
  • RIP supports multiple address families, not just
    IP
  • It tries to find the minimum hop route.
  • Valid distances are 1-15, with 16 representing
    infinity, which limits it t running on fairly
    small networks.

154
Link State (OSPF)
  • Open Shortest Path First Protocol (OSPF) is the
    most widely used link-state routing protocol.
  • Link-state routing is the second major class of
    intradomain routing protocols.
  • Assumptions are similar to distance-vector
    routing. Each node knows the state and the cost
    of the link to its neighbors.
  • Need to provide each node with enough information
    to find the least cost path to any destination.

155
Link State (OSPF)
  • Basic idea Every node knows how to reach its
    neighbor and if this knowledge is disseminated to
    every node, then every node will have enough
    knowledge of the network to build a complete map
    of the network.
  • This is a sufficient condition for finding the
    shortest path to any point in the network.

156
Link State (OSPF)
  • Link-state routing protocols rely on two
    mechanism
  • Reliable dissemination of link-state information
  • The calculation of routes from the sum of all the
    accumulated link-state knowledge.

157
Reliable Flooding
  • Reliable flooding is the process of making sure
    that all the nodes participating in the routing
    protocol get a copy of the link-state information
    form all other nodes.
  • Basic idea is for a node to send information out
    on all of its directly connected links, with each
    receiving node forwarding it out on all its
    links.

158
Reliable Flooding
  • Each node creates an update packet, called a link
    state packet (LSP) that contains the following
    information
  • The ID of the node that created the LSP
  • A list of directly connected neighbors of that
    node, with the cost of each one
  • A sequence number
  • A time to live for this packet

159
Reliable Flooding
  • First two ( node ID and list of neighbors) are
    needed to enable route calculation
  • Last two (sequence number and time to live (TTL)
    for this packet) are needed to make the process
    of flooding the packet to all nodes reliable.
  • Reliability includes making sure that you have
    the most recent copy of the information, since
    there may be multiple contradictory LSPs.
  • Making the flooding reliable is quite difficult.

160
Link State Packet Flooding
a) LSP arrives at node X
b) X floods LSP to A and C
c) A and C flood LSP to B but not X
d) Flooding is complete
161
Link State Packets
  • Like RIP, each node generates LSPs
  • When a periodic timer expires
  • When there is a change in topology
  • The newest information must be flooded to all
    nodes as quickly as possible, while old
    information must be removed and not allowed to
    circulate.

162
Goals For LSPs
  • Minimize the total amount of routing traffic
  • Avoid generating LSPs unless necessary by using
    very long timers. Assume messages saying no
    change do not need to be sent often.
  • Make sure that old information is replaced by
    newer information by inserting sequen
Write a Comment
User Comments (0)
About PowerShow.com