Lab Manual CN TECompsB
Lab Manual CN TECompsB
LAB
MANUAL
Computer
Network
Lab
CSL 502
Computer Network Lab
Description:
Design and implementation of any case study/ applications /experiments / mini
project based on departmental level courses using modern tools.
Term work:
The distribution of marks for term work shall be as follows:
Lab/ Experimental Work: 15 Marks
Attendance (Theory & Practical): 05
Marks
Assignments: 05-marks
Lab Objectives:
1 To practically explore OSI layers and understand the usage of simulation tools.
2 To analyze, specify and design the topological and routing strategies for an IP based
networking infrastructure.
3 To identify the various issues of a packet transfer from source to destination, and how they
are resolved by the various existing protocols
Lab Outcomes: On successful completion of lab, learner will be able to
1 Design and setup networking environment in Linux.
2 Use Network tools and simulators such as NS2, Wireshark etc. to explore networking
algorithms and protocols.
3 Implement programs using core programming APIs for understanding networking concepts.
Cables can transmit information along their length. To actually get that information where it needs to
go, you need to make the right connections to an RJ45 connector.
Your cable run needs to terminate into a connector, and that connector needs a jack to plug into.
Registered Jack 45 (RJ45) is a standard type of physical connector for network cables. RJ45 connectors
are commonly seen with Ethernet cables and networks.
Modern Ethernet cables feature a small plastic plug on each end of the cable. That plug is inserted into
RJ45 jacks of Ethernet devices. The term “plug” refers to the cable or “male” end of the connection
while the term “jack” refers to the port or “female” end.
There is no transmission differences between T568A and T568B cabling schemes. North America’s
preference is for T568B. Both ends must use the same standard. It makes no difference to the
transmission characteristics of data.
STEP 1:
STEP 2:
Being careful not to damage the inner conducting wires, strip off approximately 1 inch of the
cable's jacket, using a modular crimping tool or a UTP cable stripper.
STEP 3:
Holding the cable with the wire ends facing away from you. Moving from left to
right, arrange the wires in a flat, side-by-side ribbon formation, placing them in
the following order: white/orange, solid orange, white/green, solid blue,
white/blue, solid green, white/brown, solid brown.
STEP 5:
STEP 6:
Check to make sure that the wire ends coming out of the
connector's pin side are in the correct order; if not, remove
them from the connector, rearrange into proper formation,
and re-insert. Remember, once the connector is crimped onto
the cable, it's permanent. If you realize that a mistake has
been made in wire order after termination, you'll have to cut
the connector off and start all over again!
STEP 7:
Insert the prepared connector/cable assembly into the
RJ45 slot in your crimping tool. Firmly squeeze the
crimper's handles together until you can't go any further.
Release the handles and repeat this step to ensure a
proper crimp.
STEP 8:
STEP 9:
After the first termination is complete, repeat process on the opposite end
of your cable
CONCLUSION: Thus, we have studied the use of crimping tool for RJ-45.
1. What are the different ways in which you can classify Networks?
AIM: Use basic networking commands in Linux (ping, tracert, nslookup, netstat, ARP, RARP, ip,
ifconfig, dig, route )
THEORY:
1. ifconfig
ifconfig(interface configuration) command is used to configure the kernel-resident network
interfaces. It is used at the boot time to set up the interfaces as necessary. After that, it is usually
used when needed during debugging or when you need system tuning. Also, this command is used
to assign the IP address and netmask to an interface or to enable or disable a given interface.
2. NSLOOKUP
Nslookup (stands for “Name Server Lookup”) is a useful command for getting information
from DNS server. It is a network administration tool for querying the Domain Name System
(DNS) to obtain domain name or IP address mapping or any other specific DNS record. It is
also used to troubleshoot DNS related problems.
3. Ping
PING (Packet Internet Groper) command is used to check the network connectivity
between host and server/host. This command takes as input the IP address or the URL and sends a
data packet to the specified address with the message “PING” and get a response from the
server/host this time is recorded which is called latency. Fast ping low latency means faster
connection. Ping uses ICMP(Internet Control Message Protocol) to send an ICMP echo
message to the specified host if that host is available then it sends ICMP reply message. Ping is
generally measured in millisecond every modern operating system has this ping pre-installed.
4. TRACEROUTE
traceroute command in Linux prints the route that a packet takes to reach the host. This
command is useful when you want to know about the route and about all the hops that a packet
takes. Below image depicts how traceroute command is used to reach the
Google(172.217.26.206) host from the local machine and it also prints detail about all the hops
that it visits in between.
5. Netstat
Netstat command displays various network related information such as network connections,
routing tables, interface statistics, masquerade connections, multicast memberships etc.,
6. ARP
arp command manipulates the System’s ARP cache. It also allows a complete dump of
the ARP cache. ARP stands for Address Resolution Protocol. The primary function of this
protocol is to resolve the IP address of a system to its mac address, and hence it works between
level 2(Data link layer) and level 3(Network layer).
7. IP
ip command in Linux is present in the net-tools which is used for performing several
network administration tasks. IP stands for Internet Protocol. This command is used to show or
manipulate routing, devices, and tunnels. It is similar to ifconfig command but it is much more
powerful with more functions and facilities attached to it. ifconfig is one of the deprecated
commands in the net-tools of Linux that has not been maintained for many years. ip command is
used to perform several tasks like assigning an address to a network interface or configuring
network interface parameters.
It can perform several other tasks like configuring and modifying the default and static routing,
setting up tunnel over IP, listing IP addresses and property information, modifying the status of
the interface, assigning, deleting and setting up IP addresses and routes.
8. Dig
dig command stands for Domain Information Groper. It is used for retrieving information
about DNS name servers. It is basically used by network administrators. It is used for
verifying and troubleshooting DNS problems and to perform DNS lookups. Dig command
replaces older tools such as nslookup and the host.
CONCLUSION: Hence, in this experiment, we have successfully studied some important networking
command and also implemented them in Linux
EXPERIMENT NO.3
AIM: Build a simple network topology and configure it for static routing protocol using packet tracer.
Setup a network and configure IP addressing, subnetting, masking.
THEORY: Cisco Packet Tracer is a cross-platform visual simulation tool designed by Cisco
Systems that allows users to create network topologies and imitate modern computer networks. The
software allows users to simulate the configuration of Cisco routers and switches using a simulated
command line interface. Packet Tracer makes use of a drag and drop user interface, allowing users to
add and remove simulated network devices as they see fit. The software is mainly focused towards
Certified Cisco Network Associate Academy students as an educational tool for helping them learn
fundamental CCNA concepts.
Steps:
1. Pick a total of 4 pcs in the packet tracer application.
2.We need 2 routers.
3.We need a single router.
CONCLUSION: Hence we have successfully created simple network using CISCO PACKET
TRACER.
AIM: Perform network discovery using discovery tools (eg. Nmap, mrtg)
Nmap (Network Mapper) is a security scanner originally written by Gordon Lyon (also known by his
pseudonym Fyodor Vaskovich) used to discover hosts and services on a computer network, thus
creating a "map" of the network. To accomplish its goal, Nmap sends specially crafted packets to the
target host and then analyzes the responses. Unlike many simple port scanners that just send packets at
some predefined constant rate, Nmap accounts for the network conditions (latency fluctuations,
network congestion, the target interference with the scan) during the run. Also, owing to the large and
active user community providing feedback and contributing to its features, Nmap has been able to
extend its discovery capabilities beyond simply figuring out whether a host is up or down and which
ports are open and closed; it can determine the operating system of the target, names and versions of
the listening services, estimated uptime, type of device, and presence of a firewall.
Nmap features include:
• Host Discovery – Identifying hosts on a network. For example, listing the hosts which respond to
pings or have a particular port open.
• Port Scanning – Enumerating the open ports on one or more target hosts.
• Version Detection – Interrogating listening network services listening on remote devices to
determine the application name and version number.
• OS Detection – Remotely determining the operating system and some hardware characteristics of
network devices.
SYN scan is the default and most popular scan option for good reasons. It can be performed quickly,
scanning thousands of ports per second on a fast network not hampered by restrictive firewalls. It is
also relatively unobtrusive and stealthy since it never completes TCP connections
1. Download Nmap from www.nmap.org and install the Nmap Software with WinPcap Driver
utility.
2. Execute the Nmap-Zenmap GUI tool from Program Menu or Desktop Icon
3. Type the Target Machine IP Address(ie.Guest OS or any website Address)
4. Perform the profiles shown in the utility.
CONCLUSION: Thus, we have studied different options to scan ports in Nmap
EXPERIMENT NO.5
THEORY:
Wireshark, a network analysis tool formerly known as Ethereal, captures packets in real time and display them in
human-readable format. Wireshark includes filters, color coding, and other features that let you dig deep into network
traffic and inspect individual packets.
Capturing Packets
After downloading and installing Wireshark, you can launch it and double-click the name of a network
interface under Capture to start capturing packets on that interface. For example, if you want to capture
traffic on your wireless network, click your wireless interface. You can configure advanced features by
clicking Capture > Options, but this isn’t necessary for now.
As soon as you click the interface’s name, you’ll see the packets start to appear in real time. Wireshark
captures each packet sent to or from your system.
If you have promiscuous mode enabled—it’s enabled by default—you’ll also see all the other packets on
the network instead of only packets addressed to your network adapter. To check if promiscuous mode is
enabled, click Capture > Options and verify the “Enable promiscuous mode on all interfaces” checkbox is
activated at the bottom of this window.
Click the red “Stop” button near the top left corner of the window when you want to stop capturing traffic.
Color Coding
You’ll probably see packets highlighted in a variety of different colors. Wireshark uses colors to help you
identify the types of traffic at a glance. By default, light purple is TCP traffic, light blue is UDP traffic, and
black identifies packets with errors—for example, they could have been delivered out of order.
To view exactly what the color codes mean, click View > Coloring Rules. You can also customize and
modify the coloring rules from here, if you like.
Sample Captures
If there’s nothing interesting on your own network to inspect, Wireshark’s wiki has you covered. The wiki
contains a page of sample capture files that you can load and inspect. Click File > Open in Wireshark and
browse for your downloaded file to open one.
You can also save your own captures in Wireshark and open them later. Click File > Save to save your
captured packets.
Filtering Packets
If you’re trying to inspect something specific, such as the traffic a program sends when phoning home, it
helps to close down all other applications using the network so you can narrow down the traffic. Still,
you’ll likely have a large amount of packets to sift through. That’s where Wireshark’s filters come in.
The most basic way to apply a filter is by typing it into the filter box at the top of the window and clicking
Apply (or pressing Enter). For example, type “dns” and you’ll see only DNS packets. When you start
typing, Wireshark will help you autocomplete your filter.
You can also click Analyze > Display Filters to choose a filter from among the default filters included in
Wireshark. From here, you can add your own custom filters and save them to easily access them in the
future.
For more information on Wireshark’s display filtering language, read the Building display filter
expressions page in the official Wireshark documentation.
Another interesting thing you can do is right-click a packet and select Follow > TCP Stream.
You’ll see the full TCP conversation between the client and the server. You can also click other protocols
in the Follow menu to see the full conversations for other protocols, if applicable.
Close the window and you’ll find a filter has been applied automatically. Wireshark is showing you the
packets that make up the conversation.
Inspecting Packets
Click a packet to select it and you can dig down to view its details.
You can also create filters from here — just right-click one of the details and use the Apply as Filter
submenu to create a filter based on it.
Wireshark is an extremely powerful tool, and this tutorial is just scratching the surface of what you can
do with it. Professionals use it to debug network protocol implementations, examine security problems
and inspect network protocol internals.
1. What is Ethernet?
THEORY:
I. Install Linux
II. Install NS2
III. Set Environmental variables
IV. Validation
V. Run the First nam
4. Set the appropriate permissions for the ns-allinone-2.34 to allow executing the files inside it. To do that:
Right click the folder -> Properties -> Permissions , and choose the appropriate group with the appropriate
file access, then click "Allow executing file as program" and then click "Apply permissions to enclosed
files"
5. From the Accessories -> Terminal
6. Type the following command to know in which directory you are: ~$ pwd
7. You need to be in the directory where you placed the ns-allinone-2.34 folder
8. If you are not in the /home/e , then move to it by using the command cd
9. Now, supposing you are in the directory /home/e (e can be any other user) type the following command to
move inside the ns-allinone-2.34 using the command cd $ cd ns-allinone-2.34
10. Then, type the following command (you will be asked to enter the system password to process. Also, you
will be asked if you want to continue, type: y to continue): $ sudo apt-get install build-essential autoconf
automake libxmu-dev
IV. Validation
1. To run the ns validation suite: $ cd ns-2.34 $ ./validate
2. The validation will take long time, wait until it finish.
Input for Sample 2: Node 1 transmits data to Node 2, Node 2 transmits data to Node 1.
Simulation Time - 10 Seconds
(Note: The Simulation Time can be selected only after doing the following two tasks: Set the properties of
Nodes and Then click on the Simulate button).
Experiment 1: Node 1 transmits data to Node 2. Experiment 1: Node 1 transmits data to Node 2.
Experiment 2: Node 1 transmits data to Node 2, and Node 2 transmits data to Node 1.
Experiment 3: Node 1 transmits data to Node 2, and Node 2 transmits data to Node 3, and Node 3 transmits
data to Node 1.
And so on do the experiment by increasing the number of nodes generating traffic as 4, 5, 7, 9, 10, 15, 20 22
and 24 nodes.
Simulation Time - 10 Seconds
(Note: The Simulation Time can be selected only after doing the following two tasks: Set the properties of
Nodes and then click on the Simulate button).
We have obtained the following characteristic plot for the Slotted ALOHA, which matches the
theoretical result.
Experiment 7
AIM:
a. Set up multiple IP addresses on a single LAN.
b. Using netstat and route commands of Linux, do the following:
● View current routing table
● Add and delete routes
● Change default gateway
Perform packet filtering by enabling IP forwarding using IPtables in Linux.
Theory:
First, let us find the IP address of the network card. In my Ubuntu 15.10 server, I use only one network card.
sudo ip addr
Sample output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
sudo ifconfig
Sample output:
collisions:0 txqueuelen:1000
collisions:0 txqueuelen:0
As you see in the above output, my network card name is enp0s3, and its IP address is 192.168.1.103.
Now let us add an additional IP address, for example 192.168.1.104, to the Interface card.
Open your Terminal and run the following command to add additional IP.
Sample output:
$ netstat -rn
Adding route
sudo route add -net 192.168.3.0 gw 192.168.1.1 netmask 255.255.255.0 dev eth0
Deleting route
sudo route del -net 192.168.3.0 gw 192.168.1.1 netmask 255.255.255.0 dev eth0
Experiment 8
AIM: Study and Installation of Network Simulator (NS3)
Theory:
The ns-3 simulator is a discrete-event network simulator targeted primarily for research and educational use.
The ns-3 project, started in 2006, is an open-source project developing ns-3.
The purpose of this tutorial is to introduce new ns-3 users to the system in a structured way. It is sometimes
difficult for new users to glean essential information from detailed manuals and to convert this information
into working simulations. In this tutorial, we will build several example simulations, introducing and
explaining key concepts and features as we go.
As the tutorial unfolds, we will introduce the full ns-3 documentation and provide pointers to source code for
those interested in delving deeper into the workings of the system.
ns-3 is open-source, and the project strives to maintain an open environment for researchers to
contribute and share their software.
ns-3 is not a backwards-compatible extension of ns-2; it is a new simulator. The two simulators are
both written in C++ but ns-3 is a new simulator that does not support the ns-2 APIs.
For the installation of NS3, VMware workstation is required to be installed, along with an
Ubuntu system.
1. Download VMWare workstation from the website:
https://my.vmware.com/en/web/vmware/downloads/info/slug/desktop_end_user_compu
ting/vmware_workstation_player/15_0
2. Download Ubuntu 20.04.01 Desktop AMD 64 from the website:
https://ubuntu.com/download/desktop
3. Install VMWare workstation onto the computer system and open it
4. Set up the VMware workstation: a. Create a new virtual machine by selecting “Create New Virtual
Machine.”
c. In the installer wizard, select installer disc image file(iso) and select the downloaded Ubuntu
20.04.01 AMD 64 iso file by browsing through the computer download files.
9. Go to terminal and input these commands consecutively after each command finishes
executing:
cd
cd workspace
tar xjf <Name of Ns3 downloaded file name>
cd <Name of extracted Ns3>
./build.py --enable-examples --enable-tests
10. Test the NS3 build and installation success by running test.py in the ns directory using the
following commands: cd ns- ./test.py
11. If all of the tests were passed, Congratulations! NS3 has now been installed successfully.
THEORY:
Routing Information Protocol (RIP) is a dynamic routing protocol which uses hop count as a routing
metric to find the best path between the source and the destination network. It is a distance vector
routing protocol which has AD value 120 and works on the application layer of OSI model. RIP uses
port number 520.
Hop Count:
Hop count is the number of routers occurring in between the source and destination network. The path
with the lowest hop count is considered as the best route to reach a network and therefore placed in
the routing table. RIP prevents routing loops by limiting the number of hopes allowed in a path from
source and destination. The maximum hop count allowed for RIP is 15 and hop count of 16 is
considered as network unreachable.
Features of RIP:
1. Updates of the network are exchanged periodically.
2. Updates (routing information) are always broadcast.
3. Full routing tables are sent in updates.
4. Routers always trust on routing information received from neighbour routers. This is also
known as Routing on rumours.
Step1:
Select Router – select 1841 router and drag it to the screen (Router0).
Select another Router – select 1841 and drag it to right of the Router0 (Router1).
Select Switches – select 2950-24 and drag it below the Router0 (Switch0).
Select Switches – select 2950-24 and drag it below the Router1 (Switch1).
Select End Device – select Generic and drag it below Switch0 (PC-PT PC0).
Select End Device – select Generic and drag it below Switch1 (PC-PT PC1).
Select End Device – select Generic and drag it below Switch1 (PC-PT PC2).
Select Connections – Connect routers, switches and PCs to each other.
Step 2:
Click on PC0 and go to Desktop > IP Configuration
Add IP Address, as you will add the IP Address, Subnet Mask will be automatically added and
displayed.
Add Default Gateway and close the window.
Step 3:
Click on PC1 and go to Desktop > IP Configuration
Add IP Address, as you will add the IP Address, Subnet Mask will be automatically added and
displayed.
Add Default Gateway and close the window.
Step 4:
Click on PC2 and go to Desktop > IP Configuration
Add IP Address, as you will add the IP Address, Subnet Mask will be automatically added and
displayed.
Add Default Gateway and close the window.
Step 5:
Click on Router0. Go to Config > FastEthernet0/0.
Here, add IP Address and On the Port Status.
Step 6:
Click on Router1. Go to Config > FastEthernet0/1.
Here, add IP Address and On the Port Status.
As you will see above, there is green dots which means connections are done successfully between
Router, Switches and PCs.
Step 7:
Click on Router0. Go to Config > FastEthernet0/1.
Here, add IP Address and On the Port Status.
Step 8:
Click on Router1. Go to Config > FastEthernet0/0.
Here, add IP Address and On the Port Status.
As you can see above, connection is done between both the Routers successfully
.
Step 9:
Click on Router1. Go to Config > RIP.
Here, add the network address to connect router1 with switch1, PC1, PC2 and router0.
Step 10:
Click on Router0. Go to Config > RIP.
Here, add the network address to connect router0 with switch0, PC0 and router1.
Now, all the connections are done successfully, you can check it by clicking on this symbol
And then, click on any two PCs, you will get the status as successful.
Final Output:
Step1:
Select Router – select 1841 router and drag it to the screen (Router0).
Select another Router – select 1841 and drag it to right of the Router0 (Router1).
Select Switches – select 2950-24 and drag it below the Router0 (Switch0).
Select Switches – select 2950-24 and drag it below the Router1 (Switch1).
Select End Device – select Generic and drag it below Switch0 (PC-PT PC0).
Select End Device – select Generic and drag it below Switch1 (PC-PT PC1).
Select End Device – select Generic and drag it below Switch1 (PC-PT PC2).
Select Connections – Connect routers, switches and PCs to each other.
Step 2:
Click on PC0 and go to Desktop > IP Configuration
Add IP Address, as you will add the IP Address, Subnet Mask will be automatically added and
displayed.
Add Default Gateway and close the window.
Step 3:
Click on PC1 and go to Desktop > IP Configuration
Add IP Address, as you will add the IP Address, Subnet Mask will be automatically added and
displayed.
Add Default Gateway and close the window.
Step 4:
Click on PC2 and go to Desktop > IP Configuration
Add IP Address, as you will add the IP Address, Subnet Mask will be automatically added and
displayed.
Add Default Gateway and close the window.
Step 5:
Click on Router0. Go to Config > FastEthernet0/0.
Here, add IP Address and On the Port Status.
Step 6:
Click on Router1. Go to Config > FastEthernet0/1.
Here, add IP Address and On the Port Status.
As you will see above, there is green dots which means connections are done successfully between
Router, Switches and PCs.
Step 7:
Click on Router0. Go to Config > FastEthernet0/1.
Here, add IP Address and On the Port Status.
Step 8:
Click on Router1. Go to Config > FastEthernet0/0.
Here, add IP Address and On the Port Status.
As you can see above, connection is done between both the Routers successfully.
Step 9:
Click on Router1. Go to Config > RIP.
Here, add the network address to connect router1 with switch1, PC1, PC2 and router0.
Step 10:
Click on Router0. Go to Config > RIP.
Here, add the network address to connect router0 with switch0, PC0 and router1.
Now, all the connections are done successfully, you can check it by clicking on this symbol
And then, click on any two PCs , you will get the status as successful.
So till now, Routing Information Protocol is done.
Now, we will start with implementing VLAN.
Step 11:
Add two PC (PC 3 and PC4) and connect it with switch.
Step 12:
Click on PC3 and go to Desktop > IP Configuration
Add IP Address, as you will add the IP Address, Subnet Mask will be automatically added and
displayed.
Add Default Gateway and close the window.
Step 13:
Click on PC3 and go to Desktop > IP Configuration
Add IP Address, as you will add the IP Address, Subnet Mask will be automatically added and
displayed.
Add Default Gateway and close the window.
Step 14:
Click on Switch1 and go to CLI
Add type the VLAN code –
VLAN CODE:
VLAN
enable
config t
vlan 20
name purchase
exit
vlan 30
name sales
exit
int fa0/2
switchport access vlan 20
exit
int fa0/3
switchport access vlan 20
exit
int fa0/4
switchport access vlan 30
exit
int fa0/5
switchport access vlan 30
exit
Final Output:
THEORY:
Java Socket Programming
o Java Socket programming is used for communication between the applications running
on different JRE.
o Java Socket programming can be connection-oriented or connection-less.
o Socket and ServerSocket classes are used for connection-oriented socket programming
and DatagramSocket and DatagramPacket classes are used for connection-less socket
programming.
#Socket class
A socket is simply an endpoint for communications between the machines. The Socket
class can be used to create a socket.
#ServerSocket class
The ServerSocket class can be used to create a server socket. This object is used to
establish communication with the clients.
Creating Server:
To create the server application, we need to create the instance of ServerSocket class. Here, we
are using 6666 port number for the communication between the client and server. You may also
choose any other port number. The accept() method waits for the client. If clients connects with
the given port number, it returns an instance of Socket.
ServerSocket ss=new ServerSocket(6666);
Socket s=ss.accept();//establishes connection and waits for the client
Creating Client:
To create the client application, we need to create the instance of Socket class. Here, we need to
pass the IP address or hostname of the Server and a port number. Here, we are using "localhost"
because our server is running on same system.
Socket s=new Socket("localhost",6666);
Code:
MyServer.java file
import java.io.*; import
java.net.*; public class
MyServer
public static void main(String[] args){
try
{
ServerSocket ss=new ServerSocket(6666);
Socket s=ss.accept();//establishes connection
DataInputStream dis=new DataInputStream(s.getInputStream());
String str=(String)dis.readUTF();
System.out.println("message= "+str);
ss.close();
}
catch(Exception e){System.out.println(e);}
}
}
MyClient.java file
import java.io.*;
import java.net.*;
public class MyClient
{
public static void main(String[] args)
{
try
{
Socket s=new Socket("localhost",6666);
DataOutputStream dout=new DataOutputStream(s.getOutputStream());
dout.writeUTF("Hello Server");
dout.flush();
dout.close();
s.close();
}catch(Exception e){System.out.println(e);}
}
}
Output:
To execute this program open two command prompts and execute each program at each
command prompt as displayed in the below figures.
First run Myserver.java file in terminal/cmd,
Running MyServer.java
As soon as you run MyClient program a message is sent to server and displayed in
MyServer Terminal/CMD as shown below,
F
i
g
.
Message displayed in MyServer after running MyClient
THEORY:
Transferring files from a client computer to a server computer is called "uploading" and
transferring from a server to a client is "downloading".
Requirements for using FTP
1. An FTP client like Auto FTP Manager installed on your computer
2. Certain information about the FTP server you want to connect to:
a. The FTP server address. This looks a lot like the addresses you type to browse web
sites.
Example : Server address is "ftp.videodesk.net".
Sometimes the server address will be given as a numeric address, like "64.185.225.87".
b. A user name and password. Some FTP servers let you connect to them anonymously.
For anonymous connections, you do not need a user name and password. To transfer files, provide your
client software (Auto FTP Manager) with the server address, user name, and password. After connecting to
the FTP server, you can use Auto FTP Manager's File Manager to upload, download and delete files. Using
the File Manager is a lot like working with Windows Explorer.
FTP and Internet Connections
FTP uses one connection for commands and the other for sending and receiving data. FTP has a standard
port number on which the FTP server "listens" for connections. A port is a "logical connection point" for
communicating using the Internet Protocol (IP). The standard port number used by FTP servers is 21 and is
used only for sending commands. Since port 21 is used exclusively for sending commands, this port is
referred to as a command port. For example, to get a list of folders and files present on the FTP server, the
FTP Client issues a "LIST" command. The FTP server then sends a list of all folders and files back to the
FTP Client. So what about the internet connection used to send and receive data? The port that is used for
transferring data is referred to as a data port. The number of the data port will vary depending on the
"mode" of the connection. (See below for Active and Passive modes.)
Most FTP client programs select passive connection mode by default because server administrators prefer it
as a safety measure. Firewalls generally block connections that are "initiated" from the outside. Using
passive mode, the FTP client (like Auto FTP Manager) is "reaching out" to the server to make the
connection. The firewall will allow these outgoing connections, meaning that no special adjustments to
firewall settings are required.
If you are connecting to the FTP server using Active mode of connection you must set your firewall to
accept connections to the port that your FTP client will open. However, many Internet service providers
block incoming connections to all ports above 1024. Active FTP servers generally use port 20 as their data
port.
IMPLEMENTATION:
Step 1: Installation of the Package
1. # rpm –ivh vsftpd-
THEORY:
THEORY:
Telnet protocol allows you to connect to remote hosts over TCP/IP network. Telnet was
developed in 1969. Telnet was initially developed for private use where security was not primary
concern. Telnet protocol has serious security issue. Security expert recommend that the use of
Telnet for remote login should be discontinued under all normal circumstances.
Telnet Server
Telnet Client
Telnet Sever
Telnet server software is installed on remote host. You need to configure it before client can
connect with it.
Telnet Client
Telnet client software allows you to connect telnet server. Once telnet client establishes a
connection to the remote host, client becomes a virtual terminal, allowing you to communicate
with the remote host from your computer.
Security issue with Telnet
Telnet by default does not encrypt any data sent over the connection.
Anyone who has access to network device located on the network between the two hosts
like router, switch, hub or gateway where Telnet is being used can intercept the packets
passing by and obtain login, password and whatever else is typed with a packet sniffer
software.
Telnet protocol have no implementations that would ensure that communication is carried
out between the two hosts is not intercepted in the middle.
In RHEL Telnet is part of the xinetd daemon.
Telnet use plain text to transmit password.
root user is not allowed to connect using Telnet.
Command-line telnet clients are built into all major operating systems.
IMPLEMENTATION:
Configure Telnet in RHEL 6
Three RPM are required to configure telnet server in linux.
xinetd
telnet-server
telnet-client
Step 1: Installation of Packages
1. Login using root account. Necessary rpm for telnet server is xinetd, telnet-server and
telnet .
# rpm –ivh xinetd-2.3.14-31.e16.X86_64
# rpm –ivh telnet-server-
# rpm –ivh telnet-
2.To check whether the package is installed on the system.
The version numbers of the package should not matter, Red Hat Network (RHN) will always
provide you with the latest version of the package.
Step 2: Check Configuration files
Once you have the packages installed, check the /etc/xinetd.d/telnet file