Chapter 11 Layer 3 Protocols - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

Chapter 11 Layer 3 Protocols

Description:

... range of IP addresses on a DHCP ... contains places for MAC addresses of both destination and source. ... It uses these addresses to direct data toward its ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 35
Provided by: ccc1
Category:

less

Transcript and Presenter's Notes

Title: Chapter 11 Layer 3 Protocols


1
Chapter 11Layer 3 - Protocols
2
Lecture Objective (Week 12)
  • After finishing this lecture, students should be
    able to
  • Assign IP address by using RARP, DHCP, or BOOTP
  • Explain how does ARP work
  • Differentiate Routed protocol, non-routed
    protocol, and routing protocol
  • Describe various routing methods
  • Explain how router works

3
Unique Network Numbers
  • Send data from network A to network B. When data
    (frames), coming from network A, reaches the
    router, the router performs the following
    functions
  • It strips off the data link header, carried by
    the frame.
  • It examines the network layer address to
    determine the destination network.
  • It consults its routing tables to determine which
    of its interfaces it will use to send the data,
    in order for it to reach its destination network.
  • the router determines that it should send the
    data from its interface, with address B1.
  • Before actually sending the data out interface
    B1, the router would encapsulate the data in the
    appropriate data link frame.

4
Router Interface/port
  • A routers attachment to a network is called an
    interface it may also be referred to as a port.
  • In IP routing, each interface must have a
    separate, unique network (or subnetwork) address.

5
Methods for Assigning an IP Address
  • Static Addressing
  • you must go to each individual device and
    configure it with an IP address.
  • keep very meticulous records to avoid duplicated
    IP addresses.
  • Dynamic Addressing
  • Dynamic Host Configuration Protocol (DHCP)
  • a defined range of IP addresses on a DHCP server.
  • As hosts come online they contact the DHCP server
    and request an address.
  • The DHCP server chooses an address and allocates
    it to that host.
  • With DHCP, the entire computers configuration
    can be obtained in one message (e.g. along with
    the IP address, the server can also send a subnet
    mask).
  • Reverse Address Resolution Protocol (RARP)
  • BOOTstrap Protocol (BOOTP)

6
Methods for Assigning an IP Address
  • Reverse Address Resolution Protocol (RARP)
  • binds MAC addresses to IP addresses.
  • A network device such as a diskless workstation
    might know its MAC address, but not its IP
    address.
  • Devices using RARP require that a RARP server be
    present on the network to answer RARP requests.
  • Example
  • the source knows its own MAC address, but is
    unable to locate its own IP address in its ARP
    table.
  • the source initiates a process called a RARP
    request, which helps it detect its own IP
    address.
  • To ensure that all devices see the RARP request
    on the network, it uses a broadcast IP address.
  • The RARP packet format contains places for MAC
    addresses of both destination and source. The
    source IP address field is empty. The broadcast
    goes to all devices on the network therefore the
    destination IP address will be set to all binary
    1s. Workstations running RARP have codes in ROM
    that direct them to start the RARP process, and
    locate the RARP server.

7
Methods for Assigning an IP Address
  • BOOTstrap Protocol (BOOTP)
  • A device uses BOOTstrap protocol (BOOTP) when it
    starts up, to obtain an IP address.
  • A computer uses BOOTP to send a broadcast IP
    datagram (using a destination IP address of all
    1s - 255.255.255.255).
  • A BOOTP server receives the broadcast and then
    sends a broadcast.
  • The client receives a datagram and checks the MAC
    address. If it finds its own MAC address in the
    destination address field, then it takes the IP
    address in that datagram.
  • Like RARP, BOOTP operates in a client-server
    environment, and only requires a single packet
    exchange.
  • However, unlike RARP, which only sends back a 4
    octet IP address, BOOTP datagrams can include the
    IP address, the address of a router (default
    gateway), the address of a server, and a
    vendor-specific field.
  • One of the problems with BOOTP is that it was not
    designed to provide dynamic address assignment.
    With BOOTP you create a configuration file that
    specifies the parameters for each device.

8
DHCP Initialization Sequence
  • initialize state
  • sends DHCPDISCOVER broadcast messages, which are
    UDP packets with the port number set to the BOOTP
    port.
  • select state
  • collects DHCPOFFER responses from DHCP server.
  • The client then selects the first response it
    receives and negotiates lease time (the length of
    time it can keep the address without renewing it)
    with the DHCP server by sending a DHCPREQUEST
    packet.
  • request state
  • The DHCP server acknowledges a client request
    with a DHCPACK packet.
  • bound state
  • begin using the address

9
IP Key Components
  • ARP
  • can automatically obtain the MAC address of the
    computer that is associated with an IP address.
  • Note
  • The basic unit of data transfer in IP is the IP
    packet. Packet processing occurs in software,
    which means that content and format are not
    hardware dependent.
  • A packet is divided into two major components
    the header, which includes source and destination
    addresses and the data.
  • Internet Control Message Protocol (ICMP)
  • used by a device to report a problem to the
    sender of a message.
  • E.g. echo-request/echo-reply, which is a
    component that tests whether a packet can reach a
    destination by pinging the destination.

10
Function of the ARP
  • A data packet must contain both a destination MAC
    address and a destination IP address.
  • After devices determine the IP addresses of the
    destination devices, they can add the destination
    MAC addresses to the data packets. 

11
Determination of the destination MAC address
  • keep tables that contain all the MAC addresses
    and IP addresses of other devices that are
    connected to the same LAN. They are called
    Address Resolution Protocol (ARP) tables, and
    they map IP addresses to the corresponding MAC
    addresses.
  • ARP tables are sections of RAM memory, in which
    the cached memory is maintained automatically on
    each of the devices.
  • Each computer on a network maintains its own ARP
    table.
  • Whenever a network device wants to send data
    across a network, it uses information provided by
    its ARP table.

12
ARP Operation Within a Subnet
  • If it is unable to locate a MAC address for the
    destination in its own ARP table, the host
    initiates a process called an ARP request to
    discover the destination MAC address.
  • A host builds an ARP request packet and sends it
    to all devices on the network. To ensure that all
    devices see the ARP request, the source uses a
    broadcast MAC address (FF-FF-FF-FF-FF-FF).
  • all devices on the local network receive the
    packets and pass them up to the network layer for
    further examination. If the IP address of a
    device matches the destination IP address in the
    ARP request, that device responds by sending the
    source its MAC address. This is known as the ARP
    reply.

13
Default Gateway
  • In order for a device to communicate with another
    device on another network, you must supply it
    with a default gateway.
  • A default gateway is the IP address of the
    interface on the router that connects to the
    network segment on which the source host is
    located.
  • The default gateways IP address must be in the
    same network segment as the source host.
  • The computer that sends the data does a
    comparison between the IP address of the
    destination and its own ARP table. If it finds no
    match, it must have a default IP address to use.
  • Without a default gateway, the source computer
    has no destination MAC address, and the message
    is undeliverable communication is possible
    only on the devices own logical network segment.

14
How ARP Sends Data to Remote Networks
  • ARP uses broadcast packets to accomplish its
    function.
  • Routers, however, do not forward broadcast
    packets.
  • The source host compares the destination IP
    address and its own IP address to determine if
    the two IP addresses are located on the same
    segment.
  • If the receiving host is not on the same segment,
    the source host sends the data to the default
    gateway.

15
Proxy ARP
  • intermediate device (e.g. router) sends an ARP
    response, on behalf of an end node, to the
    requesting host.
  • Routers running proxy ARP capture ARP packets.
    They respond with their MAC addresses for those
    requests in which the IP address is not in the
    range of addresses of the local subnet.
  • data is sent to a host on a different subnet and
    the source host does not have a default gateway
    configured
  • it sends an ARP request.
  • All hosts on the segment, including the router,
    receive the ARP request
  • The router compares the IP destination address
    with the IP subnet address to determine if the
    destination IP address is on the same subnet as
    the source host.
  • If the subnet address is the same, the router
    discards the packet.
  • If the subnet address is different, the router
    will respond with its own MAC address for the
    interface that is directly connected to the
    segment on which the source host is located.
  • Then the router can forward the data packets
    (based on the destination IP address) to the
    proper subnet for delivery.

16
Routable and Non-routable Protocols
  • Protocols that provide support for the network
    layer are called routed or routable protocols.
  • IP
  • IPX/SPX
  • AppleTalk.
  • Protocols that do not support Layer 3 are classed
    as non-routable protocols.
  • NetBEUI is a small, fast, and efficient protocol
    that is limited to running on one segment.

17
Characteristics of a Routable Protocol
  • routable protocol it must provide the ability to
    assign a network number, as well as a host
    number, to each individual device.
  • IPX
  • only require that you assign a network number,
    because they use a host's MAC address for the
    physical number.
  • IP
  • require that you provide a complete address, as
    well as a subnet mask. The network address is
    obtained by ANDing the address with the subnet
    mask.

18
Routing Protocols
  • Routing protocols (Note Do not confuse with
    routed protocols.) determine the paths that
    routed protocols follow to their destinations.
  • Examples
  • Routing Information Protocol (RIP)
  • Interior Gateway Routing Protocol (IGRP)
  • Enhanced Interior Gateway Routing Protocol
    (EIGRP)
  • Open Shortest Path First (OSPF)
  • Routing protocols enable routers that are
    connected to create a map, internally, of other
    routers in the network or on the Internet.
  • Routers use routing protocols to exchange routing
    tables and to share routing information.
  • This allows routing (i.e. selecting the best
    path, and switching) to occur. Such maps become
    part of each router's routing table.

19
Routing Information Protocol (RIP)
  • RIP enables routers to update their routing
    tables at programmable intervals, usually every
    30 seconds.
  • Distance-Vector
  • calculates distances to a destination host in
    terms of how many hops (i.e. how many routers) a
    packet must pass through
  • the path with the least number of hops would be
    the path chosen by the router.
  • Because hop count is the only routing metric (a
    measurement for making decisions) used by RIP, it
    doesnt necessarily select the fastest path to a
    destination.
  • RIP are very popular due primarily to the fact
    that it was one of the earliest routing protocols
    to be developed.
  • problem posed by the use of RIP
  • they are constantly connecting to neighboring
    routers to update their routing tables, thus
    creating large amounts of network traffic.
  • When using RIP, the maximum number of hops that
    data can be forwarded through is fifteen. The
    destination network is considered unreachable if
    it is more than fifteen router hops away.

20
Routing Encapsulation Sequence
  • At the data link layer, an IP datagram is
    encapsulated into a frame.The datagram, including
    the IP header, is treated as data.
  • A router receives the frame, strips off the frame
    header, then checks the destination IP address in
    the IP header.
  • The router then looks for that destination IP
    address in its routing table, encapsulates the
    data in a data link layer frame, and sends it out
    to the appropriate interface.
  • If it does not find the destination IP address,
    it may drop the packet.

21
Multi-protocol Routing
  • Routers are capable of concurrently supporting
    multiple independent routing protocols, and of
    maintaining routing tables for several routed
    protocols.
  • This capability allows a router to deliver
    packets from several routed protocols over the
    same data links.

22
Connectionless Connection-oriented Network
Services
  • connectionless delivery system (packet switched)
  • treat each packet separately, and send it on its
    way through the network.
  • packets may take different paths to get through
    the network, but are reassembled when they arrive
    at the destination.
  • the destination is not contacted before a packet
    is sent. A good analogy for a connectionless
    system is a postal system.
  • connection-oriented systems (circuit switched)
  • a connection is established between the sender
    and the recipient before any data is transferred.
    An example of a connection-oriented network is
    the telephone system.

23
Connectionless and Connection-oriented Network
Processes
  • Connectionless network processes
  • packets pass from source to destination, they can
    switch to different paths, as well as (possibly)
    arrive out of order. Devices make the path
    determination for each packet based on a variety
    of criteria. Some of the criteria (e.g. available
    bandwidth) may differ from packet to packet.
  • Connection-oriented network processes
  • establish a connection with the recipient, first,
    and then begin the data transfer. All packets
    travel sequentially across the same physical
    circuit, or more commonly, across the same
    virtual circuit.
  • The Internet is one huge connectionless network
    in which all packet deliveries are handled by IP.
  • TCP (Layer 4) adds connection-oriented services
    on top of IP (Layer 3). TCP provides
    connection-oriented session services to reliably
    deliver data.

24
Comparing Router ARP Tables With ARP Tables Kept
by Other Networking Devices
  • a typical device contains mapping information
    pertaining only to devices on its own network. It
    knows very little about devices beyond its LAN.
  • Routers build tables that describe all networks
    connected to them. ARP tables kept by routers can
    contain IP addresses and MAC addresses of devices
    located on more than one network.
  • In addition to mapping IP addresses to MAC
    addresses, router tables also map ports IP
    addresses to network addresses.

25
Other Router Issues
  • In addition to IP addresses and MAC addresses of
    devices located on networks to which it connects,
    a router also possesses IP addresses and MAC
    addresses of other routers. It uses these
    addresses to direct data toward its final
    destination.
  • If a router receives a packet whose destination
    address is not in its routing table, it forwards
    it to the address of another router that most
    likely does contain information about the
    destination host in its routing table.
  • When a router does not know the MAC address of
    the next-hop router, the source router (router
    that has the data to be sent on) issues an ARP
    request. A router that is connected to the same
    segment as the source router receives the ARP
    request. This router issues an ARP reply to the
    router that originated the ARP request. The reply
    contains the MAC address of the non-local router.
  • Can a device on one subnetwork find the MAC
    address of a device on another subnetwork? The
    answer is yes, provided the source directs its
    question to the router. Working through a third
    party is called proxy ARP, and it allows the
    router to act as a default gateway.

26
Indirect Routing
  • To obtain the services of a default gateway, a
    source encapsulates the data so that it contains
    the destination MAC address of the router.
  • A source uses the destination IP address of the
    host device, and not that of a router, in the IP
    header, because it wants the data delivered to
    the host device and not to a router.
  • When a router picks up data, it strips off the
    data link layer information that is used in the
    encapsulation.
  • It then passes the data up to the network layer
    where the router examines the destination IP
    address. It compares the destination IP address
    with information contained in its routing tables.
  • If the router locates the mapped destination IP
    address and the MAC address, and learns that the
    location of the destination network is attached
    to one of its ports, it encapsulates the data
    with the new MAC address information, and
    forwards it to the correct destination.
  • If the router cannot locate the mapped
    destination address and MAC address of the device
    of the final target device, it locates the MAC
    address of another router that can perform this
    function, and forwards the data to that router.
    This type of routing is referred to as indirect
    routing.

27
Interior Gateway Protocols (IGP) and Exterior
Gateway Protocol (EGP)
  • Exterior Gateway Protocols route data between
    autonomous systems.
  • BGP (Border Gateway Protocol) used in the
    Internet.
  • Interior Gateway Protocols route data in an
    autonomous system.
  • OSPF(open shortest path first)uses several
    criteria to determine the best route to a
    destination. These criteria include cost metrics,
    which factor in such things as route speed,
    traffic, reliability, and security. actually
  • RIP
  • IGRP (developed by Cisco proprietary routing
    protocols )
  • used for routing in large multi-vendor networks
  • is a distance-vector protocol however, when
    determining the best path, it also takes into
    consideration such things as bandwidth, load,
    delay, and reliability. Network administrators
    can determine the importance given to any one of
    these metrics, or, allow IGRP to automatically
    calculate the optimal path.
  • EIGRP is an advanced version of IGRP
  • provides superior operating efficiency and
    combines the advantages of link-state protocols
    with those of distance-vector protocols.

28
Static Routing
  • The network administrator can manually enter the
    route information in the router.
  • useful whenever a network administrator wants to
    control which path a router will select.
  • For example, routing tables that are based on
    static information could be used to test a
    particular link in the network, or to conserve
    wide area bandwidth.
  • Static routing is also the preferred method for
    maintaining routing tables when there is only one
    path to a destination network.
  • prevent routers from trying to find another way
    to this stub network if its connection fails.

29
Dynamic or Adaptive Routing
  • Routes learned automatically
  • routers send periodic routing update messages to
    each other. Each time a router receives a message
    containing new information, it recalculates the
    new best route, and sends the new updated
    information to other routers.
  • By using dynamic routing, routers can adjust to
    changing network conditions.
  • Dynamic routing eliminates the need for network
    administrators or vendors to manually enter
    information into routing tables.
  • It works best when bandwidth and large amounts of
    network traffic are not issues.
  • RIP, IGRP, EIGRP, and OSPF are all examples of
    dynamic routing protocols because they allow this
    process to occur.
  • Without dynamic routing protocols, the Internet
    would be impossible.

30
How Routers Route Data Through a Network
  • You have a Class B network that is divided into
    eight subnetworks that are connected by three
    routers.
  • Host A has data it wants to send to host Z.

31
How Routers Route Data Through a Network
  • When the data reaches the network layer, source A
    uses its own IP address and the destination IP
    address of host Z
  • At the data link layer, source A places the
    destination MAC address of the router1(default
    gateway), to which it is connected, and its own
    MAC address in the MAC header.
  • The data packet continues along subnetwork 1
    until it reaches router 1.
  • Router 1 picks the packet up, because it
    recognizes that its own MAC address is the same
    as the destination MAC address.
  • Router 1 strips off the MAC header of the data
    and passes the data up to the network layer where
    it looks at the destination IP address in the IP
    header.
  • The router then searches its routing tables in
    order to map a route for the network address of
    the destination, to the MAC address of the router
    that is connected to subnetwork 8.
  • The router is using RIP as its routing protocol,
    therefore, it determines that the best path for
    the data is one that places the destination only
    three hops away.

32
How Routers Route Data Through a Network
  • Then, the router determines that it must send the
    data packet through the port attached to
    subnetwork 4, in order for the data packet to
    reach its destination via the selected path.
  • The router passes the data down to the data link
    layer, where it places a new MAC header on the
    data packet. The new MAC header contains the
    destination MAC address of router 2, and the MAC
    address of the first router that became the new
    source. The IP header remains unchanged.
  • The first router passes the data packet through
    the port that it selects, and on to subnetwork 4.
  • The data packet continues along subnetwork 4
    until it reaches router 2.
  • Router 2 picks the data packet up because it
    recognizes that its own MAC address is the same
    as the destination MAC address.
  • At the data link layer, the router strips off the
    MAC header and passes the data up to the network
    layer. There, it examines the destination network
    IP address and looks in its routing table.
  • The router, using RIP as its routing protocol,
    determines that the best path for the data is one
    that places the destination only two hops away.

33
How Routers Route Data Through a Network
  • the router determines that it must send the data
    packet through the port attached to subnetwork 5,
    in order for the data packet to reach its
    destination via the selected path.
  • The router passes the data down to the data link
    layer where it places a new MAC header on the
    data packet. The new MAC header contains the
    destination MAC address of router 2, and the MAC
    address of the first router becomes the new
    source MAC. The IP header remains unchanged.
  • The router 2 passes the data packet through the
    port that it selects and on to subnetwork 5.
  • The data packet continues along subnetwork 5
    until it reaches router 3.
  • Router 3 picks the data packet up because it
    recognizes that its own MAC address is the same
    as the destination MAC address.
  • At the data link layer, the router strips off the
    MAC header and passes it up to the network layer.
    There, it sees that the destination IP address in
    the IP header matches that of a host that is
    located on one of the subnetworks to which it is
    attached.

34
How Routers Route Data Through a Network
  • the router determines that it must send the data
    packet through the port attached to subnetwork 8
  • It places a new MAC which contains the
    destination MAC address of host Z, and the source
    MAC address of router 3 on the data.
  • The IP header remains unchanged. Router 3 sends
    the data through the port that is attached to
    subnetwork 8.
  • The data packet travels along subnetwork 8 and
    reaches host Z
  • Host Z picks it up because it sees that its MAC
    address matches the destination MAC address
    carried in the MAC header of the data packet.
  • Host Z strips off the MAC header and passes the
    data to the network layer.
  • At the network layer, host Z sees that its IP
    address, and the destination IP address carried
    in the IP header, match. Host Z strips off the IP
    header and passes the data up to the transport
    layer of the OSI model.
  • Host Z continues to strip off the layers that
    encapsulate the data packet and then passes the
    data to the next layer of the OSI model. This
    continues until the data finally arrives at the
    application layer of the OSI model.
Write a Comment
User Comments (0)
About PowerShow.com