[go: up one dir, main page]

0% found this document useful (0 votes)
33 views66 pages

FoN Ch4

Uploaded by

Nasis Dereje
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views66 pages

FoN Ch4

Uploaded by

Nasis Dereje
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

Wolkite University

College of Computing and Informatics


Software Engineering Department

Fundamentals of Networking

Chapter 4: The Network Layer


May 8, 2022
Bekretsyon B. (MSc.)
The Network Layer Introduction

The Network Layer


The network layer is responsible for carrying a packet from one
computer to another; it is responsible for host-to-host delivery
position of the network layer

2 / 66
The Network Layer Internetworking

Internetworking
Internetworking refers to the logical gluing of heterogeneous physical
networks together to look like a single network to the upper transport and
application layers

The above internetwork is made up of 5 networks: 4 LANs and 1 WAN


Si : switch or router; Fi : interface
Data sent from A to D passes through 3 links
Nomenclature:
The source and the destinations are usually referred to as hosts
A host or a router is referred to as a hop
3 / 66
The Network Layer Internetworking

Cont..

In each link, 2 physical and data link layers are involved


Problem
When data arrives at S1 , how does it know that it should be sent to S3 ?
The physical and data link layers do not help S1
The frame does not carry any routing information, it contains the MAC
addresses of A as the source and that of S1 as the destination (for a LAN or
a WAN, delivery means carrying the frame through one link, not beyond)

The network layer is responsible for host-to-host delivery and for routing
the packets through the routers or switches

4 / 66
The Network Layer Internetworking

Cont..
Network layer at source
Receives data from the transport layer
Adds the universal addresses of A and D
Makes sure the packet is of correct size for passage through the next link,
fragment it if necessary
Network layer at router or switch
Responsible for routing the packet using a routing table
The packet may go through another fragmentation if need be
Network layer at destination
Address verification; error detection; reassembling the fragments
Delivering to the transport layer

5 / 66
The Network Layer Addressing

Addressing

To uniquely and universally identify each device on the Internet to allow


global communication between all devices
Analogous to the telephone system; the Department of Computer
Science: 251 011 1222922, wherever you are on the globe
Each address belongs to a single host, but a single host can have multiple
addresses (if it has multiple connections to the Internet)
The identifier used in the network layer of the Internet model is called
the Internet address or IP address
It is a 32-bit binary address (in IPv4)

6 / 66
The Network Layer Addressing

Cont...

Two common notations: binary notation and dotted-decimal notation


Binary Notation: one or more spaces inserted between each octet (8 bits)

10000000 00001011 00000011 00011111


Dotted-Decimal notation: to make it more compact and easier to read (for
humans)

we will study IP addresses later

7 / 66
The Network Layer Routing, Routing Protocols and Multicasting

Routing, Routing Protocols and Multicasting

Making a decision and choosing one route whenever there are multiple
routes
Based on some criteria; how do you choose a route when you drive? may
be the condition of your car and the road, the shortest one, the one that is
not congested, the one with less traffic lights, avoid forbidden paths
(American military packets may not pass through Russia), ...
It is the job of the network layer routing protocol; a combination of rules
and procedures that lets routers in the internet inform one another of
changes (to share whatever they know about the internet or their
neighborhood); e.g. a failure of a network can be communicated
At the heart of such protocol is the routing algorithm that determines the
path for a packet

8 / 66
The Network Layer Routing, Routing Protocols and Multicasting

Cont...

Routing requires a host or a router to have a routing table which is


constructed by the routing algorithm

Given big internetworks such as the Internet, the number of entries in the
routing table becomes large and table look ups become inefficient;
methods for reducing its size required

9 / 66
The Network Layer Routing, Routing Protocols and Multicasting

Cont...
Next-hop routing: the routing table holds only the information that leads
to the next hop

Network-specific Routing: instead of having an entry for every host


connected to the same physical network, there is only one entry to define
the address of the network itself

10 / 66
The Network Layer Routing, Routing Protocols and Multicasting

Cont...
Two kinds of routing algorithms (routing tables): nonadaptive (static)
and adaptive (dynamic)
Nonadaptive (Static)
Routing decisions are not based on measurements or estimates of the current
topology or traffic
The choice of a root is computed in advance, off-line, and downloaded to the
routers when the network is booted or
An administrator enters the route for each destination into the table; not
automatically updated when there is a change; may be used in a small internet,
but not for big internet like the Internet

Adaptive (Dynamic)
Routing decisions are made periodically (every sec) to reflect changes in the
topology, traffic, a shutdown of a router, a break in the link, a better route has
been created, ...
11 / 66
The Network Layer Routing, Routing Protocols and Multicasting

Cont...

Interior and Exterior routing (protocols)


Since an internet can be large, one routing protocol cannot handle the task
of updating the routing tables of all routers
Hence, an internet is divided into autonomous systems
An autonomous system (AS) is a group of networks and routers under the
authority of a single administration
Routing inside an autonomous system is referred to as interior routing;
each AS can choose its own routing protocol
Routing between autonomous systems is referred to as exterior routing;
one protocol is usually chosen to handle routing between autonomous
systems; usually used for routing in the Internet

12 / 66
The Network Layer Routing, Routing Protocols and Multicasting

Cont...

R1, R2, R3, and R4 use both interior and exterior routing protocols
The rest use only interior routing protocols
Solid lines - communication between routers
Boken lines - communication between the routers that use an exterior
routing protocol
13 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols: Unicast Routing Protocols

Unicast Routing Protocols

14 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols: Interior

RIP - Routing Information Protocol


Uses distance vector routing algorithm (dynamic) also called distributed
Bellman-Ford routing algorithm or Ford-Fulkerson algorithm
Each router maintains a table (one entry per router) giving the best known
distance to each destination

The tables are updated by exchanging information with neighbors


In the general case, the metrics could be: number of hops, time delay in
milliseconds, total number of packets queued along the path, ...
The distance metric used in RIP is the number of hops
All networks are treated as equals, i.e., the cost of passing through each
network is the same, it is one hop count

15 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols: Interior


OSPF - Open Shortest Path First
Became a standard in 1990 by the IETF (Internet Engineering Task Force)
Aim: to simplify the implementation at the boundaries between
Autonomous Systems by having a standard for the interior routing
IETF identified some requirements
Has to be published in the open literature - proprietary
solutions are not good
Has to support a variety of distance metrics (physical distance,
delay, ...)
It has to be dynamic
Has to do load balancing for better performance (the best route
is not always the best)
Has to support routing based on type of service
Support for hierarchical systems - routers are not expected to
know the entire topology - see later
Introduce security so that spoofing routers by sending false
routing information is avoided
16 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols: Interior

OSPF - Open Shortest Path First


Uses link state routing algorithm (dynamic)
Replaced distance vector routing in ARPANET
Since distance vector routing does not consider bandwidth (no
need initially since all lines were 56 Kbps; later some lines
were upgraded) and other metrics
It uses Dijkstra’s algorithm to find the shortest path and
construct the routing table

17 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols: Exterior


BGP - Border Gateway Protocol
First appeared in 1989
It uses path vector routing algorithm (dynamic)
Problems with the other algorithms
The route with the smallest hop count may not be the preferred
route (if an autonomous system in which a packet passes is not
secure, even though it is the shortest and for other political
reasons)
They only announce the hop counts without actually defining
the path that leads to the destination
In path vector routing, each entry in the routing table contains the
destination network, the next router, and the path to reach the destination

18 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols
Hierarchical Routing
To limit the size of the routing table and the time for table look-up
The routers are divided into regions
Each router knows all the details in its region; but knows nothing about the
internal structure of the other regions

19 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols
Multicast Routing
Multicasting: delivery of data from one host to many destinations; as a
result of multimedia applications
A one-to-many relationship
A multicast router may forward a received packet through several of its
ports (or discard it if it is not in the multicast path)

20 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols
Multicast Routing
It requires group membership management - to create and destroy groups,
to allow processes (loyal members) to join and leave groups
One such protocol is IGMP (Internet Group Management Protocol)
has various versions - we don’t deal with the details
Not a concern of the routing algorithm; routers should only know which of
their hosts belong to which groups
A multicast router connected to a network has a list of multicast addresses
of the groups for which the router distributes packets to groups with at
least one loyal member in that network
For each group, there is one router which has the duty of distributing the
multicast packets destined for that group
Multicasting has many applications: access to distributed systems ,
information dissemination , distance learning, multimedia
communications
21 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols

22 / 66
The Network Layer Routing Protocols: Unicast Routing Protocols

Routing Protocols

Broadcast Routing Protocols


Sending a packet to all destinations simultaneously
Possible applications: distributing weather reports, stock market updates,
live radio programmes
The Internet does not explicitly support broadcasting (creates a huge
amount of traffic and needs a huge bandwidth)
Methods
Send the packet to each destination
Flooding
Multidestination routing
Using a spanning tree
Reverse path forwarding

23 / 66
The Network Layer Packetizing and Fragmenting

Packetizing and Fragmenting

Packetizing: encapsulates packets received from upper-layer protocols


and makes new packets out of them; done by the IP protocol in the
Internet model
Fragmenting: a datagram can travel through different networks; each
router decapsulates the IP datagram from the received frame, processes
it, and then encapsulates it in another frame
the format and size of the
Received frame depends on the protocol used by the physical
network from which the frame has just arrived
Departing frame depends on the protocol used by the physical
network to which the frame is going

24 / 66
The Network Layer The Network Layer in the Internet

The Network Layer in the Internet

There are 5 network layer protocols in the TCP/IP protocol suite (IP,
ARP, RARP (DHCP), ICMP, and IGMP)
The main protocol is IP, the glue that holds the whole Internet together
and responsible for host-to-host delivery
It needs the services of other protocols
ARP (Address Resolution Protocol) - maps an IP address to a MAC
address (of the next hop)
RARP (Reverse ARP) - maps a MAC address to an IP address; usually
used in some situations such as when a diskless host is booted; it gets the
binary image of its operating system from a remote file server but does not
know its IP address; obsolete, replaced by DHCP- Dynamic Host
Configuration Protocol
ICMP (Internet Control Message Protocol) - to handle unusual situations
such as the occurrence of an error
IGMP (Internet Group Management Protocol) - for multicasting since IP
is designed for unicast delivery; you can read about it
25 / 66
The Network Layer IP v4 and Subnetting

IP Addresses
Every host and router on the Internet has an IP address (its network
number and host number)
Unique and universal for global communication (no 2 hosts have the
same address, but a host can have 2 IP addresses)
32-bit in IPv4 written as 4 decimal numbers (128 in IPv6)
With 32-bits there are 232 (4,294,267,296) hosts; assumed too many
initially; now not sufficient due to a number of reasons (mainly wastage)
Classful Addressing
Address space is divided into 5 classes: A, B, C, D, and E
The first few bits indicate the class of an address

26 / 66
The Network Layer IP v4 and Subnetting

IP Addresses
addresses in classes A, B, and C are for unicast communication; a host
needs to have at least one unicast address to be able to send and receive
addresses in class D are for multicast communication (only as a
destination); if a host belongs to a group or groups, it can have one or
more multicast addresses
addresses in class E are reserved; the idea was to use them for special
purposes
Netid and Hostid
Addresses in classes A, B, and C are divided into netid (network) and
hostid (host) of varying length from class to class

27 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Classes and Blocks


one problem with classful addressing is that each class is divided into a
fixed number of blocks with each block having a fixed size
Class A
divided into 128 blocks, each block having a different netid (the first bit of
byte 1 is always 0)
Block 1: from 0.0.0.0 to 0.255.255.255 - netid 0
Block 2: from 1.0.0.0 to 1.255.255.255 - netid 1
.
.
Last block: from 127.0.0.0 to 127.255.255.255 - netid 127
Class A addresses were designed for large organizations (up to 16 million
hosts224 )

28 / 66
The Network Layer IP v4 and Subnetting

IP Addresses
Classes and Blocks
Class A
E.g. organization X granted a block with netid 73
The first address (73.0.0.0) is used to identify the organization (called the
network address)
The last address is reserved for a special purpose
Total number of organizations that can be assigned class A addresses is
126 (128-2) because all 0’s and 1’s are reserved
The number of addresses in each block (16, 777, 214 = 224 − 2)are larger
than the needs of almost all organizations
Millions of class A addresses are wasted

29 / 66
The Network Layer IP v4 and Subnetting

IP Addresses
Classes and Blocks
Class B
Divided into 16,384 (214 ) blocks, each block having a different netid (the
first two bits of byte 1 are always 10)
block 1: from 128.0.0.0 to 128.0.255.255 - netid 128.0
block 2: from 128.1.0.0 to 128.1.255.255 - netid 128.1
.
.
last block: from 191.255.0.0 to 191.255.255.255 - netid 191.255
16 blocks are reserved for private addresses
Total number of organizations that can be assigned class B addresses is
16,368 (16,384-16)
Class B addresses were designed for midsize organizations (up to 65,534
= 216 -2 hosts)
The number of addresses in each block is larger than the needs of most
midsize organizations
Many class B addresses are wasted
30 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Classes and Blocks


Class B

31 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Classes and Blocks


Class C
Divided into 2,097,152 (221 ) blocks, each block having a different netid
(the first three bits of byte 1 are always 110)
block 1: from 192.0.0.0 to 192.0.0.255 - netid 192.0.0
block 2: from 192.0.1.0 to 192.0.1.255 - netid 192.0.1
.
.
last block: from 223.255.255.0 to 223.255.255.255 - netid 223.255.255
256 blocks are used for private addresses
Total number of organizations that can be assigned class C addresses is
2,096,902 (2,097,152-256)
Class C addresses were designed for small organizations (up to 254 = 28 -2
hosts)
The number of addresses in each block is so limited that most
organizations do not want a block in this class

32 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Classes and Blocks


Class C

33 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Classes and Blocks


Class D : there is just one block of class D addresses; designed for
multicasting
Class E : here is just one block of class E addresses; designed for use as
reserved addresses; for research by IETF (Internet Engineering Task
Force) at http://www.ietf.org; it develops Internet standards

34 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Network Address
An address that defines the network itself
It cannot be assigned to a host
Properties
all hostid bytes are 0s; it is different from a netid, a network address has
both netid and hostid, with 0s for the hostid
It defines the network to the rest of the Internet; routing to a host is based
on the network address
In classful addressing, the network address is the one that is assigned to
the organization

35 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Network Address

Network addresses are managed by a nonprofit organization to avoid


conflicts - ICANN (Internet Corporation for Assigned Names and
Numbers); it has delegated parts of the address space to various regional
authorities, which then allocate IP addresses to ISPs and other companies

36 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Reserved IP Address
Few addresses are used for specific purposes.

37 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Default Mask
Although the length of the network ID and host ID (in bits) is
predetermined in classful addressing, we can also use a mask (also called
the default mask), a 32-bit number made of contiguous 1s followed by
contiguous 0s. The masks for classes A, B, and C are shown below

The mask can help us to find the network ID and the host ID. For
example, the mask for a class A address has eight 1s, which means the
first 8 bits of any address in class A define the network ID; the next 24
bits define the host ID.
38 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Address Depletion
The weakness in classful addressing scheme combined with the fast
growth of the Internet led to the near depletion of the available addresses.
With the increasing number of device on the internet, We have run out of
class A and B addresses, and a class C block is too small for most
medium size organizations.
One solution that has alleviated the problem is the idea of classless
addressing.

39 / 66
The Network Layer IP v4 and Subnetting

IP Addresses
Subnetting
process of segmenting a network into multiple smaller network spaces called
sub-networks or Subnets.
A Subnetting, or subnetworking, is the process of splitting a single large
network into two or more parts. This means that a huge network can be
subdivided into smaller, more localized networks.
Traditional Internet uses two-level address hierarchy: network portion and host
portion.
Subnetting provides another, third, level of hierarchy. (Network Portion,
Subnet Portion, Host Portion)
Communication between subnet
A router is necessary for devices on different networks and subnets to
communicate.
Each router interface must have an IPv4 host address that belongs to the
network or subnet that the router interface is connected to.
Devices on a network and subnet use the router interface attached to their
LAN as their default gateway. 40 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Subnetting
Benefits of Subnetting
Reduced network traffic:- We all appreciate less traffic of any kind.
Optimized network performance:- This is a result of reduced network
traffic.
Simplified management:- It’s easier to identify and isolate network
problems in a group of smaller connected networks than within one
gigantic network.
Facilitated spanning of large geographical distances:- Because WAN
links are considerably slower and more expensive than LAN links, a single
large network that spans long distances can create problems in every area.
Connecting multiple smaller networks makes the system more efficient.

41 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Subnetting
IP Subnetting Fundamental
Planning requires decisions on each subnet in terms of size, the number of
hosts per subnet, and host address is will be assigned. ???????

42 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Basic Subnetting

43 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Subnets in Use

44 / 66
The Network Layer IP v4 and Subnetting

IP Addresses
Subnetting Formulas

45 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Example Creating 4 Subnets

46 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Exampl 2 Creating 8 Subnets

47 / 66
The Network Layer IP v4 and Subnetting

Exampl 2 Creating 8 Subnets

48 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Sub netting Based on Host Requirements


There are two considerations when planning subnets:
Number of Subnets required
Number of Host addresses required
Formula to determine number of useable hosts
2n − 2
2n (where n is the number of host bits remaining) is used to calculate the
number of hosts
-2 Subnetwork ID and broadcast address cannot be used on each subnet

49 / 66
The Network Layer IP v4 and Subnetting

IP Addresses
Sub netting Based on Host Requirements
Calculate number of subnets
Formula 2n (where n is the number of bits borrowed)
1 Subnet needed for each department

50 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Sub netting Based on Host Requirements


It is important to balance the number of subnets needed and the number
of hosts required for the largest subnet.
Design the addressing scheme to accommodate the maximum number of
hosts for each subnet.
Allow for growth in each subnet.

51 / 66
The Network Layer IP v4 and Subnetting

Sub netting Based on Host Requirements

52 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Practice
Network is 192.168.55.0
You want to divide the network into subnets.
You will have approximately 25 nodes per subnet.
What subnet mask should you use?
What is the address of the last node on the last subnet?
What address would this node use to send to all devices on its subnet?

53 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

One More
Network is 172.16.0.0
You want to divide the network into subnets.
You will allow 600 nodes per subnet.
What subnet mask should you use?
What is the address of the first node on the first subnet?
What address would this node use to send to all devices on its subnet?

54 / 66
The Network Layer IP v4 and Subnetting

IP Addresses
Classless Addressing
There is too much wastage of IP addresses in classful addressing creating
shortage of IP addresses classless addressing was announced in 1996
The idea of variable-length blocks that belong to no class was introduced
to allocate the remaining IP addresses
Blocks of 2 addresses, 4 addresses, 64 addresses, ... can be assigned to
an organization based on size
The number of addresses in a block must be a power of 2
The whole address space (232 addresses) is divided into blocks of
different sizes
The beginning address must be evenly divisible by the number of
addresses; if a site needs, say, 2000 addresses it is given a block of 2048
addresses on a 2048 address boundary
An organization is given the beginning address of the block and a mask
(in slash notation) 55 / 66
The Network Layer IP v4 and Subnetting

IP Addresses
Variable Length Subnet Masks (VLSM)
Classeless addressing alleviates the depletion of addresses, but we now need a
new method of forwarding packets, called CIDR (Classless InterDomain
Routing)
VLSM allows a network space to be divided in unequal parts.
Subnet mask will vary depending on how many bits have been borrowed
for a particular subnet.
Network is first subnetted, and then the subnets are subnetted again.
Process repeated as necessary to create subnets of various sizes.
If all subnet masks for an IP network must be the same size, use
fixed-length subnet masking (FLSM)
If all subnet masks can be different sizes, use variable-length subnet
masking (VLSM)
In modern networks, use VLSM to conserve IP addresses.
56 / 66
The Network Layer IP v4 and Subnetting

IP Addresses

Variable Length Subnet Masks (VLSM)


Network is 192.168.1.0/24
Do VLSM to meet the following requirements
Development department has 74 computers.
Production department has 52 computers.
Administration department has 28 computers.

57 / 66
The Network Layer Address Resolution

Address Resolution

The data link layer hardware does not understand IP addresses


E.g., every Ethernet board comes with a 48-bit Ethernet address (issued
by a central authority to avoid conflicts); such boards send and receive
frames based on 48-bit Ethernet addresses; they know nothing about
32-bit IP addresses
A MAC address is a local address
Delivery of a packet to a host or a router requires two levels of
addressing: IP and MAC
A mapping of IP addresses to MAC addresses is required
Two types of mapping: static and dynamic

58 / 66
The Network Layer Address Resolution

Address Resolution

Static Mapping
Create a table that associates an IP address with a MAC address, stored
in each machine on a network
network performance is degraded to update the table periodically (a
machine could change its network card; in some LANs such as LocalTalk
of apple, the MAC address changes every time the computer is turned
on; a mobile computer can move from one physical network to another)

Dynamic Mapping
Each time a machine knows one of the two addresses, it can use a
protocol to find the other one
Two protocols: ARP (maps an IP address to a MAC address) and RARP
(maps a MAC address to an IP address; obsolete, replaced by DHCP-
Dynamic Host Configuration Protocol)
59 / 66
The Network Layer Address Resolution

Address Resolution
ARP (Address Resolution Protocol)
A host or a router looking for a MAC address broadcasts an ARP query
packet - it includes the MAC (physical) and IP addresses of the sender
and the IP address of the receiver
Only the intended recipient sends back an ARP response packet (it
contains the recipient’s IP and physical addresses); it is unicast

60 / 66
The Network Layer DHCP (Dynamic Host Configuration Protocol)

DHCP (Dynamic Host Configuration Protocol)


DHCP (Dynamic Host Configuration Protocol)
Each computer connected to the Internet must have the following
information
Its IP address
Its subnet mask
The IP address of a router
The IP address of a name server
Such information can be saved in a configuration file of the client; but
what if
It is diskless or
It is booting for the first time or
It has moved to another subnet
DHCP is a client-server program for assigning network addresses
IP addresses, default routers
It is an extension of BOOTP (that replaced RARP) that maps IP
addresses to Ethernet addresses; but it requires manual configuration of
61 / 66
The Network Layer DHCP (Dynamic Host Configuration Protocol)

DHCP (Dynamic Host Configuration Protocol)

DHCP (Dynamic Host Configuration Protocol)


DHCP allows both manual and automatic IP address assignment
A DHCP server has two databases
One that statically binds physical addresses to IP addresses
The second holds a list of unassigned IP addresses that makes DHCP
dynamic
Computers contact the DHCP server at boot-up time
the server checks its static database; if there is an entry that permanent
address is returned
otherwise it dynamically assigns an IP address for a fixed period of time
i.e., addresses are “leased” for some time; when the time expires the client
must request a renewal
This allows sharing of address space
Results in more efficient use of address space

62 / 66
The Network Layer DHCP (Dynamic Host Configuration Protocol)

DHCP (Dynamic Host Configuration Protocol)

DHCP (Dynamic Host Configuration Protocol)


DHCP allows both manual and automatic IP address assignment
A DHCP server has two databases
One that statically binds physical addresses to IP addresses
The second holds a list of unassigned IP addresses that makes DHCP
dynamic
Computers contact the DHCP server at boot-up time
The server checks its static database; if there is an entry that permanent
address is returned
Otherwise it dynamically assigns an IP address for a fixed period of time
i.e., addresses are “leased” for some time; when the time expires the client
must request a renewal
This allows sharing of address space
Results in more efficient use of address space

63 / 66
The Network Layer ICMP (Internet Control Message Protocol)

ICMP (Internet Control Message Protocol)


ICMP (Internet Control Message Protocol)
IP has no error reporting and error correcting mechanisms; if something
goes wrong
It lacks a mechanism for host and management queries (is a router or a
host alive?)
ICMP is a companion to the IP designed to compensate these two
deficiencies
Two type of ICMP messages: error-reporting and query messages
Error Reporting
Always reports error messages to the original source (the only information
included in the datagram is the source and destination addresses)

64 / 66
The Network Layer ICMP (Internet Control Message Protocol)

ICMP (Internet Control Message Protocol)

Destination unreachable: when a router cannot locate the destination or


when a packet with the DF bit cannot be delivered because a
“small-packet” network stands in the way; the datagram is discarded
Source quench: to slow down a source since IP is connectionless and
lacks flow control and congestion control; rarely used because when
congestion occurs, these packets tend to aggravate it; congestion control
in the Internet is handled in the transport layer
Time exceeded: sent when a packet is dropped because its counter (Time
to live) has reached zero (a symptom that packets are looping) or when
all fragments that make up a message do not arrive at the destination host
within a certain time limit
Parameter problem: indicates that an illegal value has been detected in a
header field Redirection: when a router notices that a packet seems to be
routed wrong
65 / 66
The Network Layer ICMP (Internet Control Message Protocol)

ICMP (Internet Control Message Protocol)

Query Messages
To diagnose some network problems

Echo request and Echo reply: used to see if a given destination is


reachable and alive; when a destination receives an Echo request message,
it is expected to send an Echo reply message back
Timestamp request and Timestamp reply: to determine the round-trip time
needed for an IP datagram to travel between two machines; and also to
synchronize their clocks; can also be used to measure network
performance
Address Mask Request and Address Mask Reply: a host may know its IP
address but not the parts that define the network address, the subnet
address, and the host identifier; it requests a router

66 / 66

You might also like