2. Programs for information exchange between client and server using TCP and UDP.
3. Secured communication through encryption and decryption of messages.
4. Program for remote procedure call under client server environment (RMI).
5. Implement data link layer framing method bit stuffing.
6. a). Program for error correction using CRC.
b). Program for error detection using Hamming Code.
• Objective
• Procedure
Input Output
Procedure
– Use Process and Runtime class for invoking the following methods.
• getRunTime()
• exec()
Procedure
-- Import the java.io package to utilize the built-in classes
– Use Process and Runtime class for invoking the following methods.
• getRunTime()
• exec()
Input Output
Pre Lab: Practice the DOS commands – ipconfig , ping, net send with all possible options.
b. Objective
To transfer a text file from one machine to other using UDP.
Procedure
--Import java. io and java.net packages to utilize the built-in classes
– DatagramSocketClass for generating UDP socket
– DatagramPacketClass for form the data container .
– send() – to send the packet to the destination.
– receive() – to receive the packet from the client/server
– Using FileWriter Class, the received text is written in the new file.
Pre Lab: knowledge about Transport layer protocols- TCP and UDP
Basic client server program.
3. Secured communication through encryption and decryption of messages.
Objective
To encrypt a plain text using a key and transmit the cipher text; decrypt the cipher text at the
receiver side to get back the original message (Hint: Use Ceaser Cipher)
Procedure
INPUT OUTPUT
4.Program for remote procedure call under client server environment (RMI)
Objectives
• Learn the concepts of Remote Procedure Call and Remote Method Invocation
• Learn to develop applications which uses Distributed Objects
• Learn the working and significance of stub object (Client side )and Skeleton
objects (Server side).
Procedures
• Creating the RMI server
• Contains both class and interface
• Creating an interface
• Both client and server have to agree
• Implementing the interface
• Binding with RMI registry
• Should contain the operational code
• Creating the RMI client
• Call Registry to obtain reference to remote object
• Compiling and starting the server
Input Output
(e.g 44 ) 256
– Creating two file pointers, one is read and another in write mode for input and output
files
– Access the given input binary file in read mode
– If there is any consecutive five 1‟s, add a stuff bit 0
– Open the output file and write the stuffed string
– At receiver end the additional stuffed bits are rejected at the Data Link layer
Objectives
Procedure
• Calculate the parity for each parity bit (a ? represents the bit position being set):
By using these check bit values we can detect the error bit position.
• Design a window at the sender side that will have a text field to accept the
message and a button to send.
• Use the static method CommPortIdentifier.getPortIdentifier to get the list of
available ports.
• Create SerialPort object for each of the entries in CommPortIdentifier list and
open the port with port number 2000.
• Set the SerialPort parameters like baudrate, databits, stopbits and parity.
• Bind the SerialPortEventListener to the SerialPort object.
• Set notifyonDataAvailable as True.
• Implement the serialEvent method to read the data available on the port.
Objectives
Go Back n
• If ACK is missed for the any PKT r , all the pkts after r will be retransmitted.
Selective Repeat
If ACK is missed for the any PKT r , the pkt r alone will be retransmitted
Pre Lab: Packet transmission with ACK between client and server.
Description:
Routers using distance-vector protocol do not have knowledge of the entire path to a destination
Simulation of Distance vector routing protocols by constructing and displaying the routing
table at each node.
Prelab
Knowledge of functioning of the protocol and the routing table format for the protocol
Objectives
Learn to read and modify the TCP kernel parameters using sysctl in linux.
Procedure
– Tuning the TCP Kernel: Use the sysctl command to read and
manipulate the various TCP parameters. e.gsysctl -a , sysctl -p and
sysctl -w.
– TCP Keep alive time: Display the current TCP keepalive time value
using the sysctl command and change that using echo command -
e.g echo ‟3600‟ > /proc/sys/net/ipv4/tcpkeepalive time.
Pre Lab: Prior working knowledge in Linux/unix platform and unix system commands.
Objective:
Study about the Wireless and wired network architecture and server configuration.
ADDITIONAL EXERCISES
1. Write a java program to read the characters from a file and write it‟s uppercase
counterpart in a new file.(File concept)
2. Create a LAN chat application(GUI) in java.(Network –UDP)
3. Write a java program to transfer a data file to the