Internet Protocols
Internet Protocols
Logical Addresses
The hosts and routers are recognized at the network level by
their logical addresses
A logical address is an internet address
The logical addresses in the TCP/IP are called IP address and are 32
bits long
Physical Address
However, hosts/routers are recognized at the physical layer by their
physical address
A physical address is an local address
Called a physical address because it is usually implemented in hardware
Examples
48-bit MAC addresses in Ethernet
Translation
We need both the physical address and the
logical address for packet delivery
Thus, we need to be able to map a logical address
to its corresponding physical address and vice
versa
Solutions
Static mapping
Dynamic mapping
Static Mapping
Create a table that associates a logical address with a physical
address and store in each machine
However, physical addresses may change
A machine could change its NIC resulting in a new physical address
In some LANs, such as LocalTalk, the physical address changes every
time the computer is turned on
A mobile station can move from one physical network to another,
resulting in a change in its physical address
Dynamic Mapping
Use a protocol to find another address
ARP: Address Resolution Protocol
Map a logical address to a physical address
RARP: Reverse Address Resolution Protocol
Map a physical address to a logical address
ARP and RARP
ARP Operation
To find the physical address of another host or router on its
network
Send an ARP request message
ARP request message
The physical address of the sender
The IP address of the sender
The physical address of the receiver is 0s
The IP address of the receiver
Then, ARP request message is broadcast by the physical layer
For example: in Ethernet, MAC header’s destination address is all 1s
(broadcast address)
Received by every station on the physical network
The intended recipient send back an ARP reply message
ARP reply message packet is unicast
ARP Operation
HLEN (Hardware length) 8-bit field defining the length of the physical address in bytes
Ethernet has the value of 6
PLEN (Protocol length) 8-bit field defining the length of the logical address in bytes
OPER (Operation)
16-bit field defining the type of packet (1) = ARP request, (2) = ARP reply
SHA (Sender hardware address) A variable-length field defining the physical address of the
sender
SPA (Sender protocol address) A variable-length field defining the logical address of the
sender
THA (Target hardware address) A variable-length field defining the physical address of the
target
Encapsulation of ARP Packet
This preferred router will always be on the same subnet as the host
that sent the datagram and the router that returned the IP datagram.
Ping uses the ICMP Echo Request and Echo Reply messages to
determine whether a host is reachable.