CPS Lab File
CPS Lab File
CPS Lab File
AIM:
Program in NS (network simulator)/QualNet to implement different topology.
THEORY:
STAR TOPOLOGY-
In a star topology, all the devices are connected to a central device. This device will then control
all the data traffic flow within the entire network. A good example of such a topology is a home
wireless network, where all the desktops, laptops, tablets, printers, and smart-phones are
connected to a single wireless router.
n2 n3 n4
\|/
\|/
n1--- n0---n5
/|\
/|\
n8 n7 n6
SIMULATED OUTPUT:
TCP dump is a most powerful and widely used command-line packets sniffer or package
analyzer tool which is used to capture or filter TCP/IP packets that are received or transferred
over a network on a specific interface.
BUS TOPOLOGY-
All devices in a Bus topology share a single communication line or cable. When numerous
hosts are sending data at the same time, the bus topology may cause problems. As a result, Bus
topology either employs CSMA/CD technology or assigns one host the role of Bus Master.
194.15.1.0
n0 -------------- n1 n2 n3 n4
point-to-point | | | |
================
LAN (BUS) 194.15.2.0
SIMULATED OUTPUT:
RESULT:
Program in NS (network simulator)/QualNet for connecting multiple routers and nodes and
building a hybrid topology.
THEORY:
Hybrid topology refers to a network structure with many topologies in its design. The
advantages and disadvantages of each incorporating topology are passed down to the hybrid
topology. Aspects of Star, Ring, Bus, and Daisy-chain topologies may be present in the merging
topologies.
The majority of WANs are connected using a Dual-Ring topology, and the networks that
connect to them are typically Star topologies. The Internet is the most well-known example of a
hybrid topology.
Output:
RESULT:
The output of the Hybrid topology is shown in figure 6. Hybrid topologies, often known as
hybrid networks, are networks that mix two or more topologies in such a way that the resulting
network does not conform to any of the traditional topologies (e.g., bus, star, ring, etc.)
EXPERIMENT 3
AIM:
Program in Network Simulator/QualNet to implement FTP using TCP bulk transfer.
THEORY:
The File Transfer Protocol (FTP) is a standard network protocol for transferring computer files
between hosts on a TCP-based network, such as the Internet. FTP is based on a client-server
design, with the client and server using separate control and data connections. FTP users can
connect anonymously if the server is set to allow it, or they can authenticate themselves using a
clear-text sign-in protocol, usually in the form of a username and password. FTP is frequently
secured using SSL/TLS for secure transmission that protects the username and password as well
as encrypts the content (FTPS). In other cases, SSH File Transfer Protocol (SFTP) is utilized
instead, however it is technologically different.
PROCEDURE:
i. Create a new project = “FTPusingTCP”
ii. Create Package = “FTP”
iii. Create two files under package as “FileServer.java” and “FileClient.java”
iv. Write the programs in respective file to transfer a file from server to client.
v. Give the path which file content need to transfer with new file name as destination.
Example = “Test.txt” to “cubic.txt”
vi. For transfer of a file, create TCP socket in both with same number. (Socket numbers can
be given from 1024 to 65532. 37).
vii. Also define path, size of the file, read from beginning to end of file in both programs.
viii. First run “FileServer.java” then run “FileClient.java”.
ix. Hereafter you can verify the file is transferred with new name successfully by FTP using
TCP protocol.
ALGORITHM:
1. Create a server socket.
3. File Input Stream and File Output Stream is to abstract different ways to input and output the
stream is a file.
7. Stop
SIMULATED OUTPUT:
RESULT:
The file contents are successfully transferred on new location with another name as shown in
Figures by using FTP over TCP connection.
EXPERIMENT 4
AIM:
Program in NS (network simulator)/QualNet for connecting multiple routers and nodes and
building a hybrid topology.
THEORY:
Hybrid topology refers to a network structure with many topologies in its design. The
advantages and disadvantages of each incorporating topology are passed down to the hybrid
topology. Aspects of Star, Ring, Bus, and Daisy-chain topologies may be present in the merging
topologies.
The majority of WANs are connected using a Dual-Ring topology, and the networks that
connect to them are typically Star topologies. The Internet is the most well-known example of a
hybrid topology.
OUTPUT:
Bandwidth
Throughput
Latency
Packet Loss
Jitter
The output of the Hybrid topology is shown in figure 6. Hybrid topologies, often known as
hybrid networks, are networks that mix two or more topologies in such a way that the resulting
network does not conform to any of the traditional topologies (e.g., bus, star, ring, etc.)
EXPERIMENT 5
AIM:
To analyze network traces using Wireshark software
THEORY:
Wireshark is a software protocol analyzer, or "packet sniffer" application, used for network
troubleshooting, analysis, software and protocol development, and education. Before June 2006,
Wireshark was known as Ethereal. It has a rich and powerful feature set and runs on most
computing platforms including Windows, OS X, Linux, and UNIX. Network professionals,
security experts, developers, and educators around the world use it regularly. It is freely
available as open source, and is released under the GNU General Public License version 2.
Wireshark can read live data from Ethernet, Token-Ring, FDDI, serial (PPP and SLIP) (if the
OS on which it's running allows Wireshark to do so), 802.11 wireless LAN (if the OS on which
it's running allows Wireshark to do so), ATM connections (if the OS on which it's running
allows Wireshark to do so), and the "any" device supported on Linux by recent versions of
libpcap.
While some people use the advantage of Wireshark for network monitoring, others use
Wireshark to capture and analyze telnet and FTP logins and passwords, web traffic, including
mail transactions to steal private passwords and personal information from the internet. For
security and safety reasons, it is strictly advised that Wireshark should be used responsibly.
PROCEDURE:
i. Wireshark Environment- To capture Protocol Data Units (PDUs), the computer on which
Wireshark is installed must have an active connection to a network. Wireshark must be
running before any data can be captured. Open Wireshark application. As the Wireshark
is launched, a window is displayed.
ii. PDU Capture to start PDU capture, go to Capture on the Menu bar and select Options.
The Capture Options dialog box provides a range of settings and filters which determines
which and how much data traffic is captured.
iii. Setting Wireshark to capture packets in promiscuous mode: If this feature is NOT
checked, only PDUs destined for this computer will be captured. If this feature is
checked, all PDUs destined for this computer AND all those detected by the computer
NIC on the same network segment are captured.
iv. Setting Wireshark for network name resolution. Although this is a useful feature, the
name resolution process may add extra PDUs the captured data, perhaps distorting the
analysis.
v. To start data capture process, click the Start button on the Wireshark: Capture Options
window.
vi. Analyzing Sample PDU Captures: : Examine the Packet List pane, then Select (highlight)
the first echo request packet on the list with the mouse.
vii. As you select a line in the Packets Detail pane all or part of the information in the Packet
Bytes pane also becomes highlighted.
viii. In the Packet List pane, highlight an HTTP packet that has the notation "(text/html)" in
the Info column. In the Packet Detail pane click on the "+" next to "Line-based text data:
html"
ix. Setup a simple switched network of 3 PCs with one PC acting as web server. Your
instructor will assign the IP addresses for PCs and web server.
x. Set the Capture Options as described above in the overview. On the address bar of the
client hosts, input the IP address of the web server on a browser and start the capture
process.
SIMULATED OUTPUT:
Clicking on Continue without saving closes the file or exits Wireshark without
saving the displayed captured data.
The packet Detail Pane will now be similar to:
Capture display
Upon Following a TCP Stream, a window similar to the one below is shown:
Exporting the file
RESULT:
On the address bar of the client hosts, input the IP address of the web server on a browser and
start the capture process. Therefore, the network can be analyzed using Wireshark software .