Uploaded by pradeepsn606

111

advertisement
21CS208
Computer Networks
Output
Observation(20)
Record(5)
Total(25)
Initial
Result:
Thus a network scenario with multiple router and OSPF routing configuration is executed
successfully.
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Ex. No.:8
Date:
Computer Networks
Create A Network Scenario And Generate The Network
Traffic To Examine The Tcp/Udp Communication Using
Aim
To create TCP and UDP Communications.
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor
copy only. Optional activities are designed to enhance understanding and/or to provide
additional practice.
Topology
Objectives
Part 1: Generate Network Traffic in Simulation Mode
Part 2: Examine the Functionality of the TCP and UDP Protocols
Background
This simulation activity is intended to provide a foundation for understanding the TCP and
UDP in detail. Simulation mode provides the ability to view the functionality of the different
protocols.
As data moves through the network, it is broken down into smaller pieces and identified in
some fashion so that the pieces can be put back together. Each of these pieces is assigned a
specific name (protocol data unit [PDU]) and associated with a specific layer. Packet Tracer
Simulation mode enables the user to view each of the protocols and the associated PDU. The
steps outlined below lead the user through the process of requesting services using various
applications available on a client PC.
This activity provides an opportunity to explore the functionality of the TCP and UDP
protocols, multiplexing and the function of port numbers in determining which local
application requested the data or is sending the data.
Part 1: Generate Network Traffic in Simulation Mode
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
Activity Section
Part 2: Examine
Functionality of the TCP and UDP Protocols
Question
Location
Possible
Points
Step 1
15
Step 2
15
Step 3
15
Step 4
15
Step 5
15
Step 6
25
Total Score
100
Earned
Points
Observation(20)
Record(5)
Total(25)
Initial
Result:
Thus a network scenario with multiple router and OSPF routing configuration is executed
successfully.
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Ex. No.:9
Date:
Computer Networks
Implement The Applications Using Tcp/Udp
Sockets Like: Chat, File Transfer
Aim
To write a client-server application for chat using TCP
Algorithm for Chat
Client
1. Start the program
2. Include necessary package in java
3. To create a socket in client to server.
4. The client establishes a connection to the server.
5. The client accept the connection and to send the data from client to server.
6. The client communicates the server to send the end of the message
7. Stop the program
.
SERVER
1. Start the program
2. Include necessary package in java
3. To create a socket in server to client
4. The server establishes a connection to the client.
5. The server accept the connection and to send the data from server to client and vice
versa
6. The server communicate the client to send the end of the message.
7. Stop the program.
Program
TCPserver1.java
import java.net.*;
import java.io.*;
public class TCPserver1
{
public static void main(String arg[])
{
ServerSocket s=null;
String line;
DataInputStream is=null,is1=null;
PrintStream os=null;
Socket c=null;
try
{
s=new ServerSocket(9999);
}
catch(IOException e)
{
System.out.println(e) ;
}
try
{
c=s.accept();
is=new DataInputStream(c.getInputStream());
is1=new DataInputStream(System.in);
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
os.flush();
sock.close(); }}}
Output
Server output
C:\Program Files\Java\jdk1.6.0\bin>javac FServer.java
C:\Program Files\Java\jdk1.6.0\bin>java FServer
Waiting for clients...
Connection Established Client wants file:network.txt
Client output
C:\Program Files\Java\jdk1.6.0\bin>javac FClient.java
C:\Program Files\Java\jdk1.6.0\bin>java FClient
Connection request.....Connected
Enter the filename: network.txt
Computer networks: A computer network, often simply referred to as a network, is a collection
of computers and devices connected by communications channels that facilitates
communications among users and allows users to share resources with other user
Observation(20)
Record(5)
Total(25)
Initial
Result
Thus the File transfer Operation is done & executed successfully.
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
Ex. No.:10
Settingup DNS ,HTTP,DHCP and E-Mail server using simulation tool
Date:
Aim:
To Setup DNS ,HTTP,DHCP and E-Mail server in Cisco Packet tracer.
•
How to Setup a DNS sever
•
How to Setup a HTTP sever
•
How to Setup a DHCP sever
•
How to Setup a E-Mail sever
Creating the Following Network:
DNS Server:
Domain Name System (DNS) is the name resolution protocol for TCP/IP networks, such as
the Internet. Client computers query a DNS server to resolve memorable alphanumeric DNS
names to the IP addresses that computers use to communicate with each other.
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Name:SN.Pradeep
Computer Networks
Roll No:21CSE115
Page No:
21CS208
Computer Networks
HTTP Server:
Short for Hyper Text Transfer Protocol, the underlying protocol used by the World Wide
Web. HTTP defines how messages are formatted and transmitted, and what actions Web
servers and browsers should take in response to various commands. For example, when you
enter a URL in your browser, this actually sends an HTTP command to the Web server
directing it to fetch and transmit the requested Web page.
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
Type the IP address of DNS server
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
DHCP Server
When you deploy Dynamic Host Configuration Protocol (DHCP) servers on your network,
you can automatically provide client computers and other TCP/IP-based network devices
with valid IP addresses. You can also provide the additional configuration parameters these
clients and devices need, called DHCP options, that allow them to connect to other network
resources, such as DNS servers, and routers.
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
Note: Set all PCs ( gateway and DNs ) settings to DHCP
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
Note: All Pcs have been dynamically assigned an IP address by DHCP server
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
Test Connection among Devices
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
E-mail server
•
Often referred to as simply "mail server", an e- mail server is a computer within your
network that works as your virtual post office.
•
A mail server usually consists of a storage area where e- mail is stored for local users, a
set of user definable rules which determine how the mail server should react to the
destination of a specific message, a database of user accounts that the mail server
recognizes and will deal with locally, and communications modules which are the
components that actually handle the transfer of messages to and from other mail servers
and email clients.
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Name:SN.Pradeep
Computer Networks
Roll No:21CSE115
Page No:
21CS208
Computer Networks
To send Email from cs1 to cs2
Name:SN.Pradeep
Roll No:21CSE115
Page No:
21CS208
Computer Networks
To Receive Email of cs1 from cs2
Observation(20)
Record(5)
Total(25)
Initial
Result
Thus Setup DNS ,HTTP,DHCP and E-Mail server in Cisco Packet tracer has been
executed successfully.
Name:SN.Pradeep
Roll No:21CSE115
Page No:
Related documents
Download