0% found this document useful (0 votes)
25 views39 pages

Ch4.H CN Network Layer

Uploaded by

Aakrit Dongol
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)
25 views39 pages

Ch4.H CN Network Layer

Uploaded by

Aakrit Dongol
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/ 39

Computer Networks

(CT 702)
Sharad Kumar Ghimire
Department of Electronics and Computer Engineering
Pulchowk Campus
Institute of Engineering
Tribhuvan University
Nepal
Chapter 4

Network Layer
Contd...

S. K. Ghimire
Contents

Protocols:

● ARP
● RARP

Additional Topics

- S. K. Ghimire
Address Mapping
ARP & RARP
ARP
Used for Mapping Logical to Physical Address

Anytime a host or a router has an IP datagram to send to another host or router, it


has the logical (IP) address of the receiver

The logical (IP) address is known itself or obtained from the DNS if the sender is
the host or it is found in a routing table if the sender is a router

But the IP datagram must be encapsulated in a frame to be able to pass through


the physical network

The sender needs the physical address of the receiver


ARP
The host or the router sends (broadcasts) an ARP query packet, that includes the
physical and IP addresses of the sender and the IP address of the receiver

The intended recipient sends back an ARP response packet

ARP request is broadcast


Response packet contains the recipient's IP and physical addresses is unicast
directly to the inquirer by using the physical address received in the query packet

An ARP request is broadcast; an ARP reply is unicast

ARP reply is unicast


ARP Packet Format
ARP Packet Fields

Hardware type: 16-bit field defining the type of the network on which ARP is
running, e.g. Ethernet is given the type 1

Protocol type: 16-bit field defining the protocol, e.g. the value of this field for the
IPv4 protocol is 0800H

Hardware length: 8-bit field defining the length of the physical address in bytes,
e.g. for Ethernet the value is 6

Protocol length: 8-bit field defining the length of the logical address in bytes, e.g.
for the IPv4 protocol the value is 4

Operation: 16-bit field defining the type of packet, 1 for ARP request & 2 for reply
ARP Packet Encapsulation
An ARP packet is encapsulated directly into a data link frame

For example, an ARP packet is directly encapsulated in an Ethernet frame

Note that the type field indicates that the data carried by the frame are an ARP
packet
Host Configuration
RARP: Reverse Address Resolution Protocol
Used to find the logical address for a machine that knows only its physical address

Each host or router is assigned one or more logical (IP) addresses, which are
unique and independent of the physical (hardware) address of the machine

To create an IP datagram, a host or a router needs to know its own IP address or


addresses

The IP address of a machine is usually read from its configuration file stored on a
disk file
RARP
A diskless machine is usually booted from ROM, with minimum boot information

As the ROM is installed by the manufacturer it cannot include the IP address


because the IP addresses on a network are assigned by the network administrator

The machine has its physical address from its NIC which is unique locally

It can then use the physical address to get the logical address by using the RARP
protocol → a RARP request is created and broadcast on the local network

Another machine on the local network that knows all the IP addresses will respond
with a RARP reply
RARP Packet Format
The format of the RARP packet is the same as the ARP packet

But the operation will be either a RARP Request or RARP Reply

The sender’s hardware address field is padded until filled


RARP
Broadcasting is done at the data link layer

The physical broadcast address, all 1s in the case of Ethernet, does not pass the
boundaries of a network

If an administrator has several networks or several subnets, it needs to assign a


RARP server for each network or subnet

Now RARP is obsolete

Two protocols, BOOTP and DHCP, are replacing RARP


Additional Topics
BOOTP

DHCP

NAT

NPIX

International Authorities

● IANA
● RIR - S. K. Ghimire
Bootstrap Protocol (BOOTP)
Client/server protocol designed to overcome some deficiencies of RARP protocol

As a client/server program, the BOOTP server can be anywhere in the Internet

It can provide all pieces of information, including the IP address

When a client requests its IP address, the BOOTP server consults a table that
matches the physical address of the client with its IP address

This implies that the binding between the physical address and the IP address of
the client already exists

The binding is predetermined


BOOTP Client & Server on
same & different networks
Dynamic Host Configuration Protocol (DHCP)
A client/server protocol designed to provide the configurations for a diskless
computer or any other computer that is booted for the first time

It is a successor to BOOTP and is backward compatible with it

DHCP is more versatile than BOOTP, and it is backward compatible which means
that it can interoperate with BOOTP clients.

Features of DHCP:

● IP addresses are assigned on demand


● Avoid manual IP configuration
● Support mobility of devices
Exchanging messages
DHCP Operation: Client and server on the same network
DHCP Operation: Client and server on two different networks
Network Address Translation (NAT)
Network Address Translation (NAT) Example
Network Address and Port Translation (NAPT)
Network Address and Port Translation (NAPT)
NPIX
International Authorities
IANA
The global coordination of the DNS Root, IP addressing, and other Internet
protocol resources is performed as the Internet Assigned Numbers Authority
(IANA) functions.
Standards organization for
● Global IP address allocation
● Autonomous system number allocation
● Root zone management in DNS
● Internet Protocol related symbols and Internet numbers

Located at Playa Vista, California, United States


Regional Internet Registry (RIR)
African Network Information Center (AFRINIC): Serves Africa

American Registry for Internet Numbers (ARIN): Serves Canada, the United
States, and many Caribbean and North Atlantic islands

Asia-Pacific Network Information Centre (APNIC): serves Asia-Pacific regions

Latin America and Caribbean Network Information Centre (LACNIC): serves Latin
American and Caribbean regions

Réseaux IP Européens Network Coordination Centre (RIPE NCC): serves for


Europe, West Asia, and the former USSR
APNIC (Asia-Pacific Network Information Centre)

One of the world's five Regional Internet address Registry (RIR) and is part of the
Number Resource Organization

A not-for-profit, membership-based organization whose Members include Internet


Service Providers, telecommunication providers, data centers, universities, banks,
National Internet Registries, and similar organizations that have their own
networks

APNIC provides numbers resource allocation and registration services that


support the global operation of the Internet

Maintains public whois database

Located at Brisbane, Queensland, Australia

You might also like