ARP packet - WordPress.com

advertisement
Address Resolution
Protocol
(ARP)
TCP/IP Protocol Suite
Copyright © The McGraw-Hill Companies, Inc. Permission required for
reproduction or display.
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. These can be done using either static
(Static mapping means creating a table that associates a logical address with
or Dynamic
a physical address)
mappingm (each time a
machine knows the logical address of another machine, it can use a protocol
to find the physical address. Two protocols have been designed to per-form
dynamic mapping: Address Resolution Protocol (ARP) and Reverse Address
Resolution Protocol (RARP)
TCP/IP Protocol Suite
.
2
ADDRESS MAPPING
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. But the IP datagram must
be encapsulated in a frame to be able to pass
through the physical network. This means that the
sender needs the physical address of the receiver.
A mapping corresponds a logical address to a
physical address. ARP accepts a logical address
from the IP protocol, maps the address to the
corresponding physical address and pass it to the
data link layer.
TCP/IP Protocol Suite
3
TCP/IP Protocol Suite
4
Position of ARP in TCP/IP protocol suite
TCP/IP Protocol Suite
5
ARP operation
TCP/IP Protocol Suite
6
ARP packet
16bit
8bit
16bit
8bit
16bit
Protocol type: IPv4 protocol is 0800 16
Target hardware address For an ARP request message, this field is all 0s because the sender
does not know the physical address of the target
7
Encapsulation of ARP packet
An ARP packet is encapsulated directly
into a data link frame. For example, in
Figure below
an ARP packet is encapsulated in an
Ethernet frame. Note that the type field
indicates that the data carried by the
frame is an ARP packet.

TCP/IP Protocol Suite
8
Encapsulation of ARP packet
Type: 0x0806
Preamble
and SFD
Destination
address
Source
address
Type
8 bytes
6 bytes
6 bytes
2 bytes
TCP/IP Protocol Suite
Data
CRC
4 bytes
9
Note
An ARP request is broadcast;
an ARP reply is unicast.
TCP/IP Protocol Suite
10
Figure 8.5
TCP/IP Protocol Suite
Four cases using ARP
11
TCP/IP Protocol Suite
12
TCP/IP Protocol Suite
13
TCP/IP Protocol Suite
14
Example
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 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.
Also note that the IP addresses are shown in hexadecimal.
TCP/IP Protocol Suite
15
TCP/IP Protocol Suite
16
TCP/IP Protocol Suite
17
Proxy ARP
Request
TCP/IP Protocol Suite
18
Original cache table
RESOLVED
PENDING
FREE
TCP/IP Protocol Suite
19
Dynamic Host Configuration
Protocol
DHCP
McGraw-Hill
©The McGraw-Hill Companies, Inc., 2000
INTRODUCTION
Each computer that uses the TCP/IP protocol suite
needs to know its IP address. If the computer
uses classless addressing or is a member of a
subnet, it also needs to know its subnet mask.
Most computers today need two other pieces of
information: the address of a default router to be
able to communicate with other networks and
the address of a name server to be able to use
names instead of addresses as we will see .
TCP/IP Protocol Suite
21
DHCP OPERATION
The DHCP client and server can either be on the
same network or on different networks. Let us
discuss each situation separately.
TCP/IP Protocol Suite
22
Client and server on the same network
TCP/IP Protocol Suite
23
Client and server on two different
networks
TCP/IP Protocol Suite
24
Use of UDP ports
TCP/IP Protocol Suite
25
DHCP packet format
TCP/IP Protocol Suite
26
Flag format
TCP/IP Protocol Suite
27
Option format
TCP/IP Protocol Suite
28
TCP/IP Protocol Suite
29
CONFIGURATION
The DHCP has been devised to
provide static and dynamic address
allocation.
TCP/IP Protocol Suite
30
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
TCP/IP Protocol Suite
31
Option with tag 53
TCP/IP Protocol Suite
32
DHCP client transition diagram
TCP/IP Protocol Suite
33
Exchanging messages
TCP/IP Protocol Suite
34
DHCP Server

Start
Control Panel
Add/Remove Programs
TCP/IP Protocol Suite
35
TCP/IP Protocol Suite
36
TCP/IP Protocol Suite
37
TCP/IP Protocol Suite
38
TCP/IP Protocol Suite
39
TCP/IP Protocol Suite
40
TCP/IP Protocol Suite
41
TCP/IP Protocol Suite
42
TCP/IP Protocol Suite
43
TCP/IP Protocol Suite
44
TCP/IP Protocol Suite
45
TCP/IP Protocol Suite
46
TCP/IP Protocol Suite
47
TCP/IP Protocol Suite
48
TCP/IP Protocol Suite
49
TCP/IP Protocol Suite
50
TCP/IP Protocol Suite
51
TCP/IP Protocol Suite
52
TCP/IP Protocol Suite
53
TCP/IP Protocol Suite
54
TCP/IP Protocol Suite
55
TCP/IP Protocol Suite
56
TCP/IP Protocol Suite
57
TCP/IP Protocol Suite
58
TCP/IP Protocol Suite
59
Download