首页 > > 详细

Program编程设计讲解、辅导Java,CS,Python程序语言解析Java程序|讲解数据库SQL

Implementation of
Simple ARP Program
DATA COMMUNICATION ASSIGNMENT #2
The Pusrpose of Assignment #2
• Learning how to use the Ethernet directly from the applicati
on layer. • understanding the Ethernet Frame, the EUI-48 MAC address, and ethernet type. • exercise the socket API of the L2 layer for the Linux operating system.
ARP (Address Resolution Protocol)
• When an IP module wants to send an IP packet via DLL SAP,
it needs the destination MAC Address of the next hop node
of the IP packet. • The IP module get the destination address by the ARP mod
ule. • The ARP module maintains an ARP cache. • From this cache, IP layer can get destination MAC Address of next hop toward de
stination IP of the IP packet. • When the cache lookup missed, the ARP module performs the Address Resolutio
n Procedure.
Assignment #2
• 1. Implementation of Simple ARP Program
• 1. install two VM, VM1 and VM2. • 2. An application on the VM1 send an ARP request. • 3. An application on the VM2 receives the request and sends a ARP reply. • 4. The application on the VM1 sends a data packet to the application the VM2. • 2. Application must use the PF_PACKET socket for all comm
unication
• You may define any unused ETHER TYPE for the assignment applications
• In example codes, we used 0xFFFE for ARP request and reply and 0xFFFD for the data packet
• You may use two sockets but one socket with ETH_P_ALL is enough to exchange
all packets used at the assignment application.
Communication Flow (First sending)
It’
s me. My MAC Address is ~~~ 4
5 Hello! (Send intended message)
Communication Flow (Second sending)
Execute your sender program Receive ARP and normal data from VM1
Demo (On Wireshark, VM1)
NO.1 => ARP Request
NO.2 => ARP Reply
NO.3 => Send 1
st Normal Message
NO.4 => reply from VM2
NO.5 => Send 2
nd Normal Message
NO.6 => reply from VM2
Demo (On Wireshark, ARP Reply)
VM2

s MAC Address
Submission List
• 1. Report (Accept pdf and MS word only.)
• Explain how you designed two applications (sender (VM1), receiver (VM2)). • Explain your application codes, including the skeleton codes. • 2. Your application codes
• After compress above things, submit one compressed file. • Important Notice
• Not completed/executable codes are acceptable, but heavily penalized. • Late submission is accepted for one week only but penalized.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!