0% found this document useful (0 votes)
13 views24 pages

ARP's Role in Routing Explained

The document discusses the Address Resolution Protocol (ARP) and routing in networks, highlighting the importance of mapping logical IP addresses to physical MAC addresses. It explains the structure of ARP packets and the process of sending ARP requests and replies, as well as the types of routing (static and dynamic) and the structure of a routing table. Additionally, it emphasizes the role of routing tables in determining the best path for packet forwarding based on destination IP addresses.

Uploaded by

Haya
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)
13 views24 pages

ARP's Role in Routing Explained

The document discusses the Address Resolution Protocol (ARP) and routing in networks, highlighting the importance of mapping logical IP addresses to physical MAC addresses. It explains the structure of ARP packets and the process of sending ARP requests and replies, as well as the types of routing (static and dynamic) and the structure of a routing table. Additionally, it emphasizes the role of routing tables in determining the best path for packet forwarding based on destination IP addresses.

Uploaded by

Haya
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

Address Resolution

Protocol & Routing


Logical and Physical Addressing

 The logical addresses in TCP/IP protocol


suite are IP addresses
 Physical address is usually implemented in
hardware
 E.g. 48-bit MAC addresses in Ethernet and Token
ring protocols, which are imprinted on the NIC
installed in the host or router
21-1 ADDRESS MAPPING

The delivery of a packet to a host or a router requires


two levels of addressing: logical and physical. We need
to be able to map a logical address to its corresponding
physical address and vice versa. This can be done by
using either static or dynamic mapping.

Topics discussed in this section:


Mapping Logical to Physical Address
Mapping Physical to Logical Address
Figure 21.1 ARP operation

21.4
Figure 21.2 ARP packet

21.5
 Hardware type. This is a 16-bit field defining the type of the network on which
ARP is running. Each LAN has been assigned an integer based on its type. For
example, Ethernet is given type 1. ARP can be used on any physical network.
 Protocol type. This is a 16-bit field defining the protocol. For example, the value
of this field for the IPv4 protocol is 080016, ARP can be used with any higher-level
protocol.
 Hardware length. This is an 8-bit field defining the length of the physical address
in bytes. For example, for Ethernet the value is 6.
 Protocol length. This is an 8-bit field defining the length of the logical address in
bytes. For example, for the IPv4 protocol the value is 4.
 Operation. This is a 16-bit field defining the type of packet. Two packet types are
defined: ARP request (1) and ARP reply (2).
 Sender hardware address. This is a variable-length field defining the physical
address of the sender. For example, for Ethernet this field is 6 bytes long.
 Sender protocol address. This is a variable-length field defining the logical (for
example, IP) address of the sender. For the IP protocol, this field is 4 bytes long.
 Target hardware address. This is a variable-length field defining the physical
address of the target. For example, for Ethernet this field is 6 bytes long. For an ARP
request message, this field is alI ‘0’s because the sender does not know the physical
address of the target.

 Target protocol address. This is a variable-length field defining the logical (for
example, IP) address of the target. For the IPv4 protocol, this field is 4 bytes long.
Figure 21.3 Encapsulation of ARP packet

21.8
Figure 21.4 Four cases using ARP
An ARP request is broadcast;
an ARP reply is unicast.

21.10
Example 21.1

A host with IP address [Link] and physical address


B2:34:55:10:22:10 has a packet to send to another host
with IP address [Link] and physical address
A4:6E:F4:59:83:AB. The two hosts are on the same
Ethernet network. Show the ARP request and reply packets
encapsulated in Ethernet frames.

Solution
Figure 21.5 shows the ARP request and reply packets. Note
that the ARP data field in this case is 28 bytes, and that the
individual addresses do not fit in the 4-byte boundary. That
is why we do not show the regular 4-byte boundaries for
these addresses.
21.11
Figure 21.5 Example 21.1, an ARP request and reply

21.12
Figure 21.6 Proxy ARP

21.13
ARP encapsulation in Ethernet Frame
ARP Request (From A to B)
Ethernet Frame Fields:
1. Preamble and SFD – Synchronization bits.
2. Destination MAC Address: FF:FF:FF:FF:FF:FF (Broadcast)
3. Source MAC Address: B23455102210 (System A’s MAC)
4. Type: 0x0806 (Specifies that this is an ARP packet)
5. Data (ARP Packet):
 Hardware Type: 0001 → Ethernet
 Protocol Type: 0800 → IPv4
 Hardware Address Length: 06 bytes (MAC address size)
 Protocol Address Length: 04 bytes (IPv4 size)
 Operation: 0001 → ARP Request
 Sender MAC Address: B23455102210
 Sender IP Address: [Link]
 Target MAC Address: 00:00:00:00:00:00 (Unknown, filled with zeros)
 Target IP Address: [Link]
6. CRC: Error checking
ARP Reply (From B to A)
Ethernet Frame Fields:
1. Preamble and SFD
2. Destination MAC Address: B23455102210 (System A)
3. Source MAC Address: A46EF45983AB (System B)
4. Type: 0x0806 (ARP)
5. Data (ARP Packet):
 Hardware Type: 0001
 Protocol Type: 0800
 Hardware Address Length: 06
 Protocol Address Length: 04
 Operation: 0002 → ARP Reply
 Sender MAC Address: A46EF45983AB
 Sender IP Address: [Link]
 Target MAC Address: B23455102210
 Target IP Address: [Link]
6. CRC: Error checking
Summary of ARP Fields in Ethernet
Frame

Field Value (Request) Value (Reply) Description


Hardware Type 0001 0001 Ethernet
Protocol Type 0800 0800 IPv4
Hardware Address 06 06 MAC address length
Length
Protocol Address 04 04 IP address length
Length
Operation 0001 (Request) 0002 (Reply) ARP operation type
Sender MAC Address B23455102210 A46EF45983AB Source device's MAC
address
Sender IP Address [Link] [Link] Source device's IP
address
Target MAC Address 000000000000 B23455102210 Target's MAC (in
(unknown) request it's unknown)
Target IP Address [Link] [Link] Target device's IP
address
Routing

• Routing is the process of selecting a path for traffic in a


network — basically, it’s how data travels from one device to
another across networks.

• There are two main types of routing:


1. Static Routing : Manually configured by the network admin.
2. Dynamic Routing: Automatically learned through routing
protocols (like RIP, OSPF, BGP).
Routing Table

• A Routing Table is a data table stored in a router (or a host)


that lists the routes to particular network destinations.
It tells the router where to send a packet based on the
destination IP address.
• Determines the best path for packet forwarding.
• Helps routers decide how to forward packets.
• Reduces unnecessary traffic by sending packets efficiently.
Structure of a Routing Table
Entry
Each entry (or row) in the routing table usually contains the
following fields:
• Destination: Target network IP.
• Subnet Mask: Match rule for destination.
• Next Hop: IP of the next router.
• Interface: Outgoing port (e.g., eth0).
• Metric: Cost to reach destination.
• Route Type: Static, dynamic, or connected.
Note

In classless addressing, we need at least


four columns in a routing table.

22.21
Example 22.1

Make a routing table for router R1, using the


configuration in Figure 22.6.

Solution
Table 22.1 shows the corresponding table.

22.22
Figure 22.6 Configuration for Example 22.1

22.23
Table 22.1 Routing table for router R1 in Figure 22.6

22.24

You might also like