ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
21.1
Chapter 21
Network Layer:
Address Mapping,
Error Reporting,
and Multicasting
Copyright ? The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
21.2
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.
Mapping Logical to Physical Address
Mapping Physical to Logical Address
Topics discussed in this section:
21.3
Figure 21.1 Mapping Logical to Physical Address
ARP (address resolution protocol)
21.4
ARP can be useful if the ARP reply is
cached (kept in cache memory for a
while).
Note
21.5
Figure 21.2 ARP packet
21.6
Figure 21.3 Encapsulation of ARP packet
21.7
Figure 21.4 Four cases using ARP
21.8
An ARP request is broadcast;
an ARP reply is unicast.
Note
21.9
A host with IP address 130.23.43.20 and physical address
B2:34:55:10:22:10 has a packet to send to another host
with IP address 130.23.43.25 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.
Example 21.1
21.10
Figure 21.5 Example 21.1, an ARP request and reply
21.11
Figure 21.6 Proxy ARP
21.12
Mapping Phy to Logical Address:
RARP, BOOTP, and DHCP
? A diskless station just booted.
? An organization does not have enough IP
addresses to assign to each station.
21.13
Reverse Address Resolution
Protocol (ARP)
? A machine can use the phy address to get the
logical address using RARP.
? A RARP messages is created and brodcast on
the local network.
? The machine on the local network that knows
the logical address will respond with a RARP
reply.
? Broadcasting is done at data link layer.
? Broadcast requests does not pass the
boundaries of a network.
21.14
Figure 21.7 BOOTP client and server on the same and different networks
21.15
DHCP provides static and dynamic
address allocation that can be
manual or automatic.
Note
DHCP: Dynamic Host Configuration Protocol
Goal: allow host to dynamically obtain its IP address from
network server when it joins network
Can renew its lease on address in use
Allows reuse of addresses (only hold address while connected an
¡°on¡±
Support for mobile users who want to join network (more
shortly)
DHCP overview:
? host broadcasts ¡°DHCP discover¡± msg
? DHCP server responds with ¡°DHCP offer¡± msg
? host requests IP address: ¡°DHCP request¡± msg
? DHCP server sends address: ¡°DHCP ack¡± msg
DHCP client-server scenario
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2
223.1.3.1
223.1.3.27
A
B
E
DHCP
server
arriving DHCP
client needs
address in this
network
DHCP client-server scenario
DHCP server: 223.1.2.5 arriving
client
time
DHCP discover
src : 0.0.0.0, 68
dest.: 255.255.255.255,67
yiaddr: 0.0.0.0
transaction ID: 654
DHCP offer
src: 223.1.2.5, 67
dest: 255.255.255.255, 68
yiaddrr: 223.1.2.4
transaction ID: 654
Lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255, 67
yiaddrr: 223.1.2.4
transaction ID: 655
Lifetime: 3600 secs
DHCP ACK
src: 223.1.2.5, 67
dest: 255.255.255.255, 68
yiaddrr: 223.1.2.4
transaction ID: 655
Lifetime: 3600 secs
21.19
21-2 ICMP
The IP protocol has no error-reporting or error-
correcting mechanism. The IP protocol also lacks a
mechanism for host and management queries. The
Internet Control Message Protocol (ICMP) has been
designed to compensate for the above two deficiencies.
It is a companion to the IP protocol.
Types of Messages
Message Format
Error Reporting and Query
Debugging Tools
Topics discussed in this section:
21.20
Figure 21.8 General format of ICMP messages
21.21
ICMP always reports error messages to
the original source.
Note
21.22
Figure 21.9 Error-reporting messages
21.23
Important points about ICMP error messages:
? No ICMP error message will be generated in
response to a datagram carrying an ICMP error
message.
? No ICMP error message will be generated for a
fragmented datagram that is not the first fragment.
? No ICMP error message will be generated for a
datagram having a multicast address.
? No ICMP error message will be generated for a
datagram having a special address such as
127.0.0.0 or 0.0.0.0.
Note
21.24
Figure 21.10 Contents of data field for the error messages
21.25
Figure 21.12 Query messages
21.26
Figure 21.13 Encapsulation of ICMP query messages
21.27
Figure 21.14 shows an example of checksum calculation
for a simple echo-request message. We randomly chose
the identifier to be 1 and the sequence number to be 9.
The message is divided into 16-bit (2-byte) words. The
words are added and the sum is complemented. Now the
sender can put this value in the checksum field.
Example 21.2
21.28
Figure 21.14 Example of checksum calculation
21.29
We use the ping program to test the server fhda.edu. The
result is shown on the next slide. The ping program sends
messages with sequence numbers starting from 0. For
each probe it gives us the RTT time. The TTL (time to
live) field in the IP datagram that encapsulates an ICMP
message has been set to 62. At the beginning, ping defines
the number of data bytes as 56 and the total number of
bytes as 84. It is obvious that if we add 8 bytes of ICMP
header and 20 bytes of IP header to 56, the result is 84.
However, note that in each probe ping defines the number
of bytes as 64. This is the total number of bytes in the
ICMP packet (56 + 8).
Example 21.3
21.30
Example 21.3 (continued)
21.31
21.32
21.33
Figure 21.15 The traceroute program operation
¡°Real¡± Internet delays and routes
? What do ¡°real¡± Internet delay & loss look like?
? Traceroute program: provides delay measurement
from source to router along end-end Internet path
towards destination. For all i:
? sends three packets that will reach router i on path towards
destination
? router i will return packets to sender
? sender times interval between transmission and reply.
3 probes
3 probes
3 probes
Traceroute Commands
Under Windows: ¡°tracert¡±
Under Unix: ¡°traceroute¡±
You can try it on eustis.eecs.ucf.edu
Traceroute from My Home Computer
mapping address.ppt
21.38
21-3 IGMP (Internet Group Management Protocol)
The IP protocol can be involved in two types of
communication: unicasting and multicasting. The
Internet Group Management Protocol (IGMP) is one
of the necessary, but not sufficient, protocols that is
involved in multicasting. IGMP is a companion to the
IP protocol.

More Related Content

mapping address.ppt

  • 1. 21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright ? The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
  • 2. 21.2 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. Mapping Logical to Physical Address Mapping Physical to Logical Address Topics discussed in this section:
  • 3. 21.3 Figure 21.1 Mapping Logical to Physical Address ARP (address resolution protocol)
  • 4. 21.4 ARP can be useful if the ARP reply is cached (kept in cache memory for a while). Note
  • 7. 21.7 Figure 21.4 Four cases using ARP
  • 8. 21.8 An ARP request is broadcast; an ARP reply is unicast. Note
  • 9. 21.9 A host with IP address 130.23.43.20 and physical address B2:34:55:10:22:10 has a packet to send to another host with IP address 130.23.43.25 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. Example 21.1
  • 10. 21.10 Figure 21.5 Example 21.1, an ARP request and reply
  • 12. 21.12 Mapping Phy to Logical Address: RARP, BOOTP, and DHCP ? A diskless station just booted. ? An organization does not have enough IP addresses to assign to each station.
  • 13. 21.13 Reverse Address Resolution Protocol (ARP) ? A machine can use the phy address to get the logical address using RARP. ? A RARP messages is created and brodcast on the local network. ? The machine on the local network that knows the logical address will respond with a RARP reply. ? Broadcasting is done at data link layer. ? Broadcast requests does not pass the boundaries of a network.
  • 14. 21.14 Figure 21.7 BOOTP client and server on the same and different networks
  • 15. 21.15 DHCP provides static and dynamic address allocation that can be manual or automatic. Note
  • 16. DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from network server when it joins network Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an ¡°on¡± Support for mobile users who want to join network (more shortly) DHCP overview: ? host broadcasts ¡°DHCP discover¡± msg ? DHCP server responds with ¡°DHCP offer¡± msg ? host requests IP address: ¡°DHCP request¡± msg ? DHCP server sends address: ¡°DHCP ack¡± msg
  • 17. DHCP client-server scenario 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E DHCP server arriving DHCP client needs address in this network
  • 18. DHCP client-server scenario DHCP server: 223.1.2.5 arriving client time DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs
  • 19. 21.19 21-2 ICMP The IP protocol has no error-reporting or error- correcting mechanism. The IP protocol also lacks a mechanism for host and management queries. The Internet Control Message Protocol (ICMP) has been designed to compensate for the above two deficiencies. It is a companion to the IP protocol. Types of Messages Message Format Error Reporting and Query Debugging Tools Topics discussed in this section:
  • 20. 21.20 Figure 21.8 General format of ICMP messages
  • 21. 21.21 ICMP always reports error messages to the original source. Note
  • 23. 21.23 Important points about ICMP error messages: ? No ICMP error message will be generated in response to a datagram carrying an ICMP error message. ? No ICMP error message will be generated for a fragmented datagram that is not the first fragment. ? No ICMP error message will be generated for a datagram having a multicast address. ? No ICMP error message will be generated for a datagram having a special address such as 127.0.0.0 or 0.0.0.0. Note
  • 24. 21.24 Figure 21.10 Contents of data field for the error messages
  • 26. 21.26 Figure 21.13 Encapsulation of ICMP query messages
  • 27. 21.27 Figure 21.14 shows an example of checksum calculation for a simple echo-request message. We randomly chose the identifier to be 1 and the sequence number to be 9. The message is divided into 16-bit (2-byte) words. The words are added and the sum is complemented. Now the sender can put this value in the checksum field. Example 21.2
  • 28. 21.28 Figure 21.14 Example of checksum calculation
  • 29. 21.29 We use the ping program to test the server fhda.edu. The result is shown on the next slide. The ping program sends messages with sequence numbers starting from 0. For each probe it gives us the RTT time. The TTL (time to live) field in the IP datagram that encapsulates an ICMP message has been set to 62. At the beginning, ping defines the number of data bytes as 56 and the total number of bytes as 84. It is obvious that if we add 8 bytes of ICMP header and 20 bytes of IP header to 56, the result is 84. However, note that in each probe ping defines the number of bytes as 64. This is the total number of bytes in the ICMP packet (56 + 8). Example 21.3
  • 31. 21.31
  • 32. 21.32
  • 33. 21.33 Figure 21.15 The traceroute program operation
  • 34. ¡°Real¡± Internet delays and routes ? What do ¡°real¡± Internet delay & loss look like? ? Traceroute program: provides delay measurement from source to router along end-end Internet path towards destination. For all i: ? sends three packets that will reach router i on path towards destination ? router i will return packets to sender ? sender times interval between transmission and reply. 3 probes 3 probes 3 probes
  • 35. Traceroute Commands Under Windows: ¡°tracert¡± Under Unix: ¡°traceroute¡± You can try it on eustis.eecs.ucf.edu
  • 36. Traceroute from My Home Computer
  • 38. 21.38 21-3 IGMP (Internet Group Management Protocol) The IP protocol can be involved in two types of communication: unicasting and multicasting. The Internet Group Management Protocol (IGMP) is one of the necessary, but not sufficient, protocols that is involved in multicasting. IGMP is a companion to the IP protocol.