Description
V Semester – CSE ‘B’
UCS1511 NETWORKS LAB
Exercise 6: ADDRESS RESOLUTION PROTOCOL
Simulate ARP using socket programming.
Server should perform the following:
1. Consider the server as a host or a router.
2. Enter hosts/routers’ IP address and MAC address.
3. Listen for any number of client (for broadcasting purpose).
4. Enter the packet details received from a host or its own packet to sent to a destination.
The details are:
1. Source IP address
2. Source MAC address
3. Destination IP address
4. 16 bit data
Develop an ARP Request packet which is to be broadcasted to all clients. Query packet should contain
ARPOperation| SourceMAC | SourceIP | DestinationMAC | DestinationIP
5. When an ARP Reply is received with the Destination MAC address, send the packet to the corresponding destination.
6. Also check the validity of IP and MAC address.
Client should do the following:
1. Can have any number of clients(depends on the backlog).
2. Enter the clients own IP and MAC.
3. When an ARP Request packet is received check whether the Destination IP is its own IP.
4. If not no reply.
5. If yes respond with ARP Reply packet.
ARPOperation|SourceMAC | SourceIP | DestinationMAC | DestinationIP
6. Then receive the packet from the server and display it.
Sample Input and Output Server
Enter the details of packet received.
Destination IP :155.157.65.128
Source IP :123.128.34.56
Source MAC :AF-45-E5-00-97-12
16 bit data :1011110000101010
Developing ARP Request packet
1|AF-45-E5-00-97-12 | 123.128.34.56 |00-00-00-00-00-00 | 155.157.65.128 The ARP Request packet is broadcasted.
Waiting for ARP Reply…
ARP Reply received
2 |45-DA-62-21-1A-B2 | 155.157.65.128 |123.128.34.56 | AF-45-E5-00-97-12 Sending the data packet to : 45-DA-62-21-1A-B2
Client 1
Enter the IP address : 165.43.158.158
Enter the Mac address : 09-DF-90-26-6C-09
ARP Request Received : 1| AF-45-E5-00-97-12 | 123.128.34.56 |00-00-00-00-00-00
| 155.157.65.128 IP address does not match.
Beulah A. Network Lab
Client 2
Enter the IP address : 155.157.65.128
Enter the Mac address : 45-DA-62-21-1A-B2
ARP Request Received
IP address matches : 1|AF-45-E5-00-97-12 | 123.128.34.56 |00-00-00-00-00-00
| 155.157.65.128
ARP Reply Sent : 2 |45-DA-62-21-1A-B2 | 155.157.65.128 |123.128.34.56 |
AF-45-E5-00-97-12
Received data Packet from : AF-45-E5-00-97-12
Client 3
Enter the IP address : 15.143.158.18
Enter the Mac address : 19-0F-01-63-C7-D4
ARP Request Received : 1|AF-45-E5-00-97-12 | 123.128.34.56 |00-00-00-00-00-00
| 155.157.65.128 IP address does not match.
Beulah A. Network Lab




Reviews
There are no reviews yet.