Chap 3 Layer 3 Protocol

Download Report

Transcript Chap 3 Layer 3 Protocol

Chap 11 Layer 3 Protocol
Andres, Wen-Yuan Liao
Department of Computer Science and Engineering
De Lin Institute of Technology
[email protected]
http://www.cse.dlit.edu.tw/~andres
Layer 3 Devices
Routers
Layer 3 addresses
Unique network
numbers
Router interface/port
Routers
Two addressing schemes
MAC
address: data link (L2)
IP address: network layer (L3)
A router: Layer 3 addresses
Layer 3 addresses
Bridges and switches:
Physical, or MAC addresses
Routers: IP or logical
addresses
The network administrator
usually assigns IP addresses.
Layer 3 addresses
Bridges and switches are
primarily used to connect
segments of a network
Routers are used to connect
separate networks and to
access the worldwide Internet
Unique network numbers
Each network of must have a
unique network number
The unique network number is
incorporated into the IP address
that is assigned to each device
attached to that network
Router interface/port
Interface/port
A
router’s attachment to a
network
Each interface must have a
separate, unique network (or
subnetwork) address
Network-to-Network Comm.
Methods for assigning an IP
address
DHCP initialization sequence
IP key components
Function of the address resolution
protocol (ARP)
ARP operation within a subnet
Assigning an IP address
Static Addressing
 Go
to each individual device and
configure it with an IP address
Dynamic Addressing
 Assign
IP addresses
dynamically
Dynamic Addressing
Reverse Address
Resolution Protocol (RARP)
BOOTstrap Protocol
(BOOTP)
Dynamic Host
Configuration Protocol
(DHCP)
RARP
Binds MAC addresses to IP
addresses
Diskless workstation
A RARP server be present on the
network to answer RARP
requests
BOOTP
Like RARP in a client-server
The IP address, default
gateway, the address of a
server, and a vendor-specific
field
DHCP
A successor to BOOTP
A defined range of IP
addresses on a DHCP server
The entire computer’s
configuration can be obtained
in one message
IP key components
ARP
 The
sender need both the IP and
MAC addresses of the destination
 IP address -> MAC address
ICMP
 Report
a problem to the sender of a
message
Function of ARP
ARP tables
Map
IP addresses to MAC
addresses
Each computer maintains
its own ARP table
ARP within a subnet
If it is unable to locate a
MAC address for the
destination, the host initiates
a process called an ARP
request
Use a broadcast destination
MAC address
Advanced ARP Concepts
Default gateway
Problems with sending
data to nodes on different
subnets
How ARP sends data to
remote networks
Proxy ARP
Default gateway
To communicate with another
device on another network
IP address of the interface
on the router that connects
to the network segment on
which the source host is
located
Default gateway
Be in the same network
segment as the source host
If no default gateway is defined,
communication is possible only
on the device’s own logical
network segment.
Sending data to nodes on
different subnets
The first is obtaining the MAC
address of the destination host
The second is transferring the
data packets from one network
segment to another, to get to
the destination host
Sending data to
remote networks
The source device
sends the data to a
default gateway
Proxy ARP
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
Routable Protocols
Routed protocols
Other routed protocols
Non-routable protocols
Characteristics of a
routable protocol
Routed protocols
IP is a network layer
protocol, and because of
that, it can be routed
over an internetwork
IPX/SPX and AppleTalk
Non-routable protocols
NetBEUI is a small,
fast, and efficient
protocol that is limited
to running on one
segment
Routing Protocols
Examples of routing protocols
Definition of routing protocol
Routing encapsulation sequence
Multi-protocol routing
Routing protocols
Determine the paths
Create routing table
RIP
IGRP
EIGRP
OSPF
Definition of routing protocol
Routers use routing protocols to
exchange routing tables and to
share routing information
The most common protocol: RIP
Interior Gateway Protocol (IGP)
 Calculates
distances to a
destination host in terms of how
many hops
Distance-vector
 RIP
allows routers to determine
which path to use to send data.
Hop count: the no. of routers
The destination network is
considered unreachable if it is
more than fifteen router hops
away
Other Network Layer Services
Connectionless network services
Connection-oriented network
services
Comparing connectionless and
connection-oriented network
processes
IP and the transport layer
Connectionless network services
In a connectionless system the
destination is not contacted before
a packet is sent
Treat each packet separately, and
send it on its way through the
network
Postal system
Connection-oriented
network services
In connection-oriented systems,
a connection is established
between the sender and the
recipient before any data is
transferred
Telephone system
Comparisons
Connectionless network
processes are often referred
to as packet switched
Connection-oriented
network processes are
often referred to as circuit
switched
IP and the transport layer
IP relies on the transport
layer protocol to
determine whether
packets have been lost,
and to request
retransmission
ARP Tables
Internetworking devices that have
ARP tables
Comparing router ARP tables with
ARP tables kept by other
networking devices
Other router table addresses
ARP requests and ARP replies
Proxy ARP
Indirect routing
Internetworking devices that
have ARP tables
The router interface
connected to the network has
an IP address for that network
Build ARP tables that map IP
addresses to MAC addresses
Router & local ARP table
A typical device contains
mapping information pertaining
only to devices on its own
network
Routers build tables that
describe all networks
connected to them
Other router table addresses
What happens if a data packet
reaches a router that is destined
for a network to which it is not
connected?
it forwards it to the address of
another router that most likely
does contain information about
the destination host in its
routing table.
ARP requests and ARP replies
When a router does not
know the MAC address of
the next-hop router, the
source router issues an ARP
request
Indirect routing
If the router cannot locate the
mapped destination address
and MAC address of the final
target device, it locates the
MAC address of another
router, and forwards the data
to that router
IGP and EGP
Routed and routing protocols
IGPs and EGPs
RIP, IGRP and EIGRP, OSPF
How routers recognize networks
Static routing, Dynamic routing
How routers use RIP to route data
through a network
Routed protocols and
routing protocols
Because IP is routed over an
internetwork, it is called a routed
protocol. (IPX, and Appletalk)
Routers use routing protocols to
exchange routing tables and
share routing information
IGPs and EGPs
Exterior Gateway Protocols:
route data between
autonomous systems
 BGP
(Border Gateway Protocol)
Interior Gateway Protocols:
route data in an autonomous
system
 RIP,IGRP,EIGRP,OSPF
RIP
The most common method to
transfer routing information
between routers
Determine which path it will use
to send data, based on a
concept known as distancevector
IGRP and EIGRP
Be developed by Cisco
Systems, Inc: proprietary
routing protocols
IGRP: distance-vector protocol
EIGRP: link-state protocols
OSPF
Open shortest path first
A better description, however,
might be "determination of
optimum path"
How routers recognize networks
Static routes
 Manual
entries in routing
tables
Dynamic routes
 Routes
learned automatically
Static routing
A network administrator
wants to control which path a
router will select
There is only one path to a
destination network
Stub
network
Less overhead
Dynamic routing
Routers send periodic
routing update messages to
each other
By using dynamic routing,
routers can adjust to
changing network conditions
Dynamic Routiny
Eliminates the need for
network administrators or
vendors to manually enter
information into routing
tables
How routers use RIP to route
data through a network
The destination IP
address never changes
The MAC address
changes at each router
Summary
Internetworking functions
ARP
RARP or BootP
Default gateway
Routed protocols vs. routing
protocols
Distance-vector routing