CN Lab Manual
CN Lab Manual
CN LAB MANUAL
1. Write a program to
a. Print the IP address of a www.yahoo.com
b. Print the url of 205.163.22.104
c. Print all the addresses of www.apple.com
d. Print the IP address of the local machine
e. Print the hostname of the local machine
2. Write a program to Identif the !ell "no!n ports on a #emote $stem
By tryin to listen to the !arious well "nown ports by openin client connections. If the e#ception does not
occur then the remote port is acti!e else the remote port is inacti!e.
%. $i!en a %&'( write a proram to print the parts of %&'.
&. )rite a proram to display the soc"et*s port and IP address.
'. )rite a proram to send + &ecei!e data from ,ataramPac"et
(. )rite a proram for -ulticast .niffer
). )rite a proram for -ulticast sender
*. Write a program for a Chat Application
+ne,+ne- B opening soc"et connection and displaing !hat is !ritten . one part to the other.
Man,Man /Broad cast0- 1ach client opens a soc"et connection to the chat ser2er and !rites to the
soc"et. Whate2er is !ritten . one part can .e seen . all other parties.
3. )rite a proram for the ,ata &etrie!al from a &emote ,atabase
/t the remote database a ser!er listens for client connections. 0his ser!er accepts .1' 2ueries from the client(
e#ecutes it on the database and sends the response to the client.
14. )rite a proram for the -ail 3lient
P4P 3lient 5 $i!es the ser!er name ( user name and password retrie!e the mails and allow manipulation of
mail bo# usin P4P commands.
$M5P Client- 6i2es the ser2er name7 send e,mail to the recipient 8sing $M5P commands, /Core 9a2a
2 pg-1(%.0
11. )rite a proram for the .imulation of 0elnet
Pro!ide a user interface to contact well6"nown ports( so that client6ser!er interaction can be seen by the user.
12. Write a program for the $imple file transfer .et!een t!o sstems
B opening soc"et connection to o8r ser2er on one sstem and sending a file from one sstem to another.
1%. Write a program for the 5:5P,Client.5o de2elop a 5:5P client for file transfer. /Uni; Net!or"
programming, $te2ens0
1&. Write a program for the <55P,$er2er.=e2elop a <55P ser2er to implement the follo!ing commands
6157 P+$57 <1A=7 =1L151. 5he ser2er m8st handle m8ltiple clients.
#eference Boo"s-
1. 7a!a 8etwor" Prorammin( 9arold 4rielly
2. /n Introduction to 3omputer 8etwor"in( :enneth 3. -ansfield 7r and 7ames
/ntona"os Pearson ;ducation /sia
We. #eso8rce-
1. http://www.cafeaulait.org/books/jnp/javanetexamples/index.html