Title: ARP Protocol
1ARP Protocol ( Address Resolution Protocol )
RARP Protocol ( Reverse Address Resolution
Protocol )
2ARP Protocol( Address Resolution Protocol )
- ARP Message Format
- ?????????? ARP
- ARP Request
- ARP Reply
- ARP Proxy
- ARP Cache
3ARP Protocol(Address Resolution Protocol)
Physical address
Logical address
ARP
Ethernet address
IP address
Address Resolution Protocol
4ARP Protocol( Address Resolution Protocol )
- ???????????? IP Protocol
- ????????????? IP Address ??????? MAC Address
- ???????????????????????????????????? MAC Address
???????????????????? - ??????????????????????????????????????????????
router ?????????????????? gateway ?????????? MAC
Address ??? router ???????????????
5ARP Protocol( Address Resolution Protocol )
- ARP query packet (Request) ???????????????? IP
Address ????????????????????? ????? Broadcast
?????????????? MAC Address - ????????????????????????? MAC ?????????????? ARP
Response packet
6ARP/RARP packet
ARP/RARP packet
MAC header
ARP/RARP packet
15 16
0
31
Hardware type
Protocol type
Opcode
Prot address length
Hw. address length
Source hardware address
Source protocol address
Destination hardware address
Destination protocol address
7Hardware Type ( 16 bits )
8Hardware Type ( 16 bits )
9ARP/RARP packet
Protocol Type ( 16 bits )
Hardware Address Length ( 8 bits )
Length of the hardware address in bytes.
Protocol Address Length ( 8 bits )
Length of the protocol address in bytes.
10ARP/RARP packet
Opcode ( 8 bits )
11ARP/RARP packet
Source Hardware Address ( 32 bits ) Variable
Length.
Source Protocol Address ( 32 bits ) Variable
Length.
Destination Hardware Address ( 32 bits
) Variable Length.
Destination Protocol Address ( 32 bits
) Variable Length.
12ARP Message Format
- Ethernet Destination
- Address 6
Hard Type 2
Frame Type 2
- Ethernet Source
- Address 6
Prot Type 2
Hard Size 1
OP Field 2
Prot Size 1
- Sender Ethernet
- Address 6
- Target Ethernet
- Address 6
- Ethernet Destination Address (byte 0-5)
?????????? MAC Address ??????? ?????????????
ARP ????????????????????? broadcast
???????????????????????? 1 ???? FF FF FF FF FF FF
- Ethernet Source Address (byte 6-11) ??????????
MAC Address ??? ??????
13ARP Message Format
- Ethernet Destination
- Address 6
Hard Type 2
Frame Type 2
- Ethernet Source
- Address 6
Prot Type 2
Hard Size 1
OP Field 2
Prot Size 1
- Sender Ethernet
- Address 6
- Target Ethernet
- Address 6
- - Frame Type (byte 12-13) ???????????????????????
?? - - Hard Type (byte 14-15) ????????????? hardware
address ??? ARP ?????? - Prot Type (byte 16-17) ?????????????????????????
??? - Hard Size (byte 18) ???? address ??? hardware
- Prot Size (byte 19) ???? address
???????????????????????????
14ARP Message Format
- Ethernet Destination
- Address 6
Hard Type 2
Frame Type 2
- Ethernet Source
- Address 6
Prot Type 2
Hard Size 1
OP Field 2
Prot Size 1
- Sender Ethernet
- Address 6
- Target Ethernet
- Address 6
- OP Field (byte 20-21) ??????????? ARP ???????
1 ARP Request ? 2 ARP Reply
? 3 RARP Request
?
4 RARP Reply - Sender Ethernet Address (byte
22-27) ?????????? ARP Reply ?????????
15ARP Message Format
- Ethernet Destination
- Address 6
Hard Type 2
Frame Type 2
- Ethernet Source
- Address 6
Prot Type 2
Hard Size 1
OP Field 2
Prot Size 1
- Sender Ethernet
- Address 6
Target IP Address 4
Target Ethernet Address 6
- - Sender IP Address (byte 28-31) ?????????? IP
Address ????????? - - Target Ethernet Address (byte 32-37)
????????????? ARP Request - Target IP Address (byte 38-41) ?????????? IP
???????????? ARP Reply
16?????????? ARP
- ???????????????????????????????????????? ARP
????????? ARP Request ????????????????????? IP
????????????????? MAC Address ????? host
?????????????????????? ??????????? broadcast - ????? host ???????????? IP ???????????????? ARP
Request ??????????????????????????? ARP Reply - ????? host ?????? ARP Request ?????? ARP Reply
?????? ??????????? MAC Address ??? host ???????
17ARP Packet
MAC HEADER Destination FFFFFFFFFFFF Source 02
068c2eb58b
IP HEADER Destination 158.108.1.5 Source 158.108.1
.2
ARP REQUEST MESSAGE What is your MAC address ?
18ARP in Operation
158.108.1.5 0800207a4968
158.108.1.2 02068c2eb58b
ARP Request
ARP Reply
Who is 158.108.1.5? TO everyone From
158.108.1.2 (02068c2eb58b)
Its me 158.108.1.5 (0800207a4968) TO
158.108.1.2 (02068c2eb58b)
19ARP Request Packet
Sample ARP Request Ethernet Packet
Des MAC (broadcast)
FF FF FF FF FF FF
Source MAC
08 00 20 7a 49 68
ARP frame type
0x806
Ethernet / IP
0x001
0x800
0x01
0x06
0x04
MAC6 / IP4 / request
Source MAC
08 00 20 7a 49 68
Source IP
158.108.1.2
dest MAC (unknown)
0 0 0 0 0 0
dest IP
158.108.1.5
20ARP Reply Ethernet Packet
Sample ARP Request Ethernet Packet
Des MAC (broadcast)
8 0 20 7a 49 68
Source MAC
00 10 4B 13 0ABC
ARP frame type
0x806
Ethernet / IP
0x001
0x800
MAC6 / IP4 / reply
0x02
0x06
0x04
Source MAC
8 0 20 7a 49 68
Source IP
158.108.1.2
dest MAC (unknown)
00 10 4B 13 0A BC
dest IP
158.108.1.5
21ARP Proxy
IP158.108.40.54 MAC 00002e15cb0c
Y
X
IP158.108.33.1 MAC 00000c06134a
IP158.108.40.1 MAC 00000c067790
Router
Router request Y
X to Y ARP request to Router
???????????????? Router ???????? ARP Cache
???? (???? ??????????????????? Router
????????????)?????????????????????????????????????
???????????? Host X ??????????? MAC Address ???
Host Y ???????????????? Router
22ARP Proxy
IP158.108.40.54 MAC 00002e15cb0c
Y
X
IP158.108.33.1 MAC 00000c06134a
IP158.108.40.1 MAC 00000c067790
Router
R send 158.108.40.1 with 00000c06134a
Y send 158.108.40.1 with 00002e15cb0c
???????????????? Router ???????? ARP Cache
???? (???? ??????????????????? Router
????????????)?????????????????????????????????????
???????????? Host X ??????????? MAC Address ???
Host Y ???????????????? Router
23ARP Proxy
- ?????????????????????????????????????????????
???????????? Subnet ????? Host X ????????? Subnet
??????????? Host Y ?????? Subnet ???????? - In case when the source know subnetmask, what is
the operation?
24ARP Cache
Y
X
Router
X to Y request
R send 158.108.40.1 with 00000c06134a
ARP Cache ??? ???????????????????????????? MAC
address ??? IP address ??????????????????????????
ARP Cache ????????????????????????? ARP Cache
??????????? ARP Request ??????????? ARP Cache
?????????????????????????????????????????
?????????????????????? 20 ????
25RARP (Reverse Address Resolution Protocol )
Logical address
Physical address
RARP
Ethernet address
IP address
Reverse Address Resolution Protocol
26RARP Packet
MAC HEADER Destination FFFFFFFFFFFF Source 08
00207a4968
IP HEADER Destination 111111111 Source ????????
RARP REQUEST MESSAGE What is my IP Address ?
27RARP (Reverse Address Resolution Protocol )
- ?????????????????? MAC Address ??????? IP
Address - ?????? RARP Server ???????????????????? IP
????????????? diskless workstation - ???????????????????? ARP
- 0x0835 for Ethernet RARP request
- operation 0x003 RARP request
- 0x004 RARP reply
28Assignment
- What is the purpose of ARP protocol?
- Why we need ARP protocol, only network address is
sufficient for communication? - If the destination IP node is not in the same
subnetwork of the source IP node, how the packet
would be send to the destination by the service
of data-link layer and network layer?
29THE END
???????? ??.??????? ????????????? 44010304
??.????? ?????????? 44010316 ?????????
?????? 44010410 ???????? ???????????
44010510