Lecture 6 - Networ Protocols
Lecture 6 - Networ Protocols
Network Layer:
Address Mapping,
Error Reporting,
and Multicasting
21.1
21-1 ADDRESS MAPPING
21.2
TCP/IP
Address Resolution Protocol (ARP)
• It is used to find the physical address of a host if its IP address is known
• Any time a host needs to find the physical address of another host on
its network, it follows the following :
It formats an ARP packet that includes the IP address
It broadcast it over the network
Host in possession of IP address sends station address
The IP address and station address stored in cache memory
Computer Networks 3
Figure 21.2 ARP packet
21.4
Figure 21.3 Encapsulation of ARP packet
21.5
Figure 21.4 Four cases using ARP
21.6
Note
21.7
Example 21.1
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.8
Figure 21.5 Example 21.1, an ARP request and reply
21.9
TCP/IP
Reverse Address Resolution Protocol (RARP)
• It allows a host to discover its IP address if it knows only its physical
address
• A host wishing to discover its IP address broadcast an RARP packet that
includes its physical address over the network
• The server returns the host’s IP address
Computer Networks 10
21-2 ICMP
21.12
Note
21.13
Figure 21.9 Error-reporting messages
21.14
Note
21.15
Figure 21.10 Contents of data field for the error messages
21.16
Figure 21.12 Query messages
21.17
Figure 21.13 Encapsulation of ICMP query messages
21.18
Example 21.2
21.19
Figure 21.14 Example of checksum calculation
21.20
21-3 IGMP
21.23
Figure 21.17 IGMP message format
21.24
Table 21.1 IGMP type field
21.25
Figure 21.18 IGMP operation
21.26
Example
21.27
Example 21.6
Solution
The events occur in this sequence:
a. Time 12: The timer for 228.42.0.0 in host A expires,
and a membership report is sent, which is received by
the router and every host including host B which
cancels its timer for 228.42.0.0.
21.28
Example 21.6 (continued)
21.29
Figure 21.20 Encapsulation of IGMP packet
21.30
Table 21.2 Destination IP addresses
21.31
Note
21.32
Figure 21.21 Mapping class D to Ethernet physical address
21.33
Example 21.7
Solution
We can do this in two steps:
a. We write the rightmost 23 bits of the IP address in
hexadecimal 43=00101011 , 14 = 00001110.
This can be done by changing the rightmost 3 bytes to
hexadecimal and then subtracting 8 from the leftmost
digit if it is greater than or equal to 8. In our example, the
result is 2B:0E:07.
21.34
Example 21.7 (continued)
21.35
Example 21.8
21.36
21.37