Ex - No:6 (A) Write A Code Simulating Arp Protocols-P.Ganesan - 9034
Ex - No:6 (A) Write A Code Simulating Arp Protocols-P.Ganesan - 9034
GANESAN -9034
dout.writeUTF(str1);
String str = din.readUTF();
System.out.println("The Physical Address is: " + str);
clsct.close();
} catch (Exception e) {
System.out.println("Error: " + e);
}
}
}
SERVER ARP PROGRAM:
import java.io.*;
import java.net.*;
class Serverarp {
while (true) {
if (str.equals(ip[i])) {
found = true;
break;
if (!found) {
} catch (IOException e) {
} catch (IOException e) {
OUTPUT:
EX.NO:6(b) WRITE A CODE SIMULATING RARP PROTOCOLS-C.BHUVANESWARI-9035
CLIENT RARP PROGRAM:
import java.io.*;
import java.net.*;
while (true) {
byte[] sendByte = new byte[1024];
byte[] receiveByte = new byte[1024];