0% found this document useful (0 votes)
36 views45 pages

Practical 7

The document outlines practical instructions for designing a network with an FTP server, including the use of various network commands such as ping, tracert, arp, netstat, and ipconfig. It provides detailed explanations of FTP, its advantages and disadvantages, and the steps to configure an FTP server. Additionally, it covers hardware knowledge related to RJ45 cables and crimping tools.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views45 pages

Practical 7

The document outlines practical instructions for designing a network with an FTP server, including the use of various network commands such as ping, tracert, arp, netstat, and ipconfig. It provides detailed explanations of FTP, its advantages and disadvantages, and the steps to configure an FTP server. Additionally, it covers hardware knowledge related to RJ45 cables and crimping tools.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

CSE307

Practical 7
Design Network with FTP Server

Prepare by Dr. Krishan Kumar, Professor, SEEE


Review -N/W Commands
Ping, tracert, arp, netstat, ipconfig
SOFTWARE REQUIREMENT

CISCO PACKET TRACER


KEYWORDS
• Ping,
• tracert,
• arp,
• netstat,
• ipconfig
• IP
• TCP
• UDP
• Broadcast
• MAC
• Dynamically
Ping
• Ping is used to test the ability of one network host to
communicate with another.
• Simply enter the Ping command, followed by the name or
the IP address of the destination host. Assuming that there
are no network problems or firewalls preventing the ping
from completing, the remote host will respond to the ping
with four packets.
• Receiving these packets confirms that a valid and
functional network path exists between the two hosts.
Traceroute command (tracert)
• The Traceroute command (tracert) is a utility designed for displaying
the time it takes for a packet of information to travel between a local
computer and a destination IP address or domain.
• After running a traceroute command, the results displayed are a list
of the 'hops' that data packets take along their path to the designated
IP address or domain.
• This command is commonly associated with the troubleshooting of
connection issues.
• tracert followed by a space and then an IP address
or URL.
Procedure
• Run a traceroute (tracert) command using Windows
• To use the traceroute command with computers running the Microsoft
Windows operating system (XP):
• Select Start > Run.
• Type 'cmd' then click OK.
• Type 'tracert' followed by a space and the domain name or IP address (for
example: tracert example.com or tracert 10.0.2.1).
• Press the Enter key to run the command.
ARP Commands
• arp -a: This command is used to display the ARP
table for a particular IP address. It also shows all the
entries of the ARP cache or table.
• arp -g: This command works the same as the arp -a
command.
• arp -d: This command is used when you want to
delete an entry from the ARP table for a particular
interface.
• The arp cache results are dynamic and displays the IP and
MAC address of devices (computers, routers) your
computer network communicated (e.g., ping, internal
website) with recently that are on your network.
• The table does not display the IP address of websites,
servers and other devices outside of your network. It will
however, show the IP and MAC address of your router as it
is the device your computer communicate with on your
internal network to get to the external server.
netstat

• Displays active TCP connections, ports on which the


computer is listening, Ethernet statistics, the IP
routing table, IPv4 statistics (for the IP, ICMP, TCP,
and UDP protocols), and IPv6 statistics (for the IPv6,
ICMPv6, TCP over IPv6, and UDP over IPv6
protocols).
• Used without parameters, this command displays
active TCP connections.
Syntax

netstat [-a] [-b] [-e] [-n] [-o] [-p <Protocol>] [-r] [-s]
[<interval>]
-a
Displays all active TCP connections and the TCP and UDP ports on which the computer
is listening.
-b
Displays the executable involved in creating each connection or listening port. In some
cases well-known executables host multiple independent components, and in these
cases the sequence of components involved in creating the connection or listening
port is displayed
-e
Displays Ethernet statistics, such as the number of bytes and packets sent and
received. This parameter can be combined with -s.
-n
Displays active TCP connections, however, addresses and port numbers are expressed
numerically and no attempt is made to determine names.
-o
Displays active TCP connections and includes the process ID (PID) for each connection.
You can find the application based on the PID on the Processes tab in Windows Task
Manager. This parameter can be combined with -a, -n, and -p.
-p <Protocol>
Shows connections for the protocol specified by Protocol. In this case, the Protocol can
be tcp, udp, tcpv6, or udpv6. If this parameter is used with -s to display statistics by
protocol, Protocol can be tcp, udp, icmp, ip, tcpv6, udpv6, icmpv6, or ipv6.
-s
Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP,
and IP protocols. If the IPv6 protocol is installed, statistics are shown for the TCP over
IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols. The -p parameter can be used to
specify a set of protocols.
-r
Displays the contents of the IP routing table. This is equivalent to the route print
command.
<interval>
Redisplays the selected information every interval seconds. Press CTRL+C to stop the
redisplay. If this parameter is omitted, this command prints the selected information
only once.
/?
Displays help at the command prompt.
netstat –f

netstat –f
Active Connections
Proto Local Address Foreign Address State
TCP 127.0.0.1:5357 VM-Windows-7:49229 TIME_WAIT
TCP 127.0.0.1:49225 VM-Windows-7:12080 TIME_WAIT
TCP 192.168.1.14:49194 75.125.212.75:http CLOSE_WAIT
TCP 192.168.1.14:49196 a795sm.avast.com:http CLOSE_WAIT
TCP 192.168.1.14:49197 a795sm.avast.com:http CLOSE_WAIT
TCP 192.168.1.14:49230 TIM-PC:wsd TIME_WAIT
TCP 192.168.1.14:49231 TIM-PC:icslap ESTABLISHED
TCP 192.168.1.14:49232 TIM-PC:netbios-ssn TIME_WAIT
TCP 192.168.1.14:49233 TIM-PC:netbios-ssn TIME_WAIT
TCP [::1]:2869 VM-Windows-7:49226 ESTABLISHED
TCP [::1]:49226 VM-Windows-7:icslap ESTABLISHED
NET CONFIG
NET CONFIG
The NET CONFIG command is used to manage network resources.
The NET COMPUTER command is used to add or remove a computer from the domain.
Syntax
NET CONFIG SERVER [/AUTODISCONNECT:time] [SVRCOMMENT:"text"] [/HIDDEN {YES | NO}]

NET CONFIG RDR (undocumented option to display domain connection)

NET COMPUTER \\computername /ADD

NET COMPUTER \\computername /DEL


Examples
To add a computer to the domain
NET COMPUTER \\ComputerName /ADD
This command is only available from a Server and is best run from the Primary Domain Controller (PDC)
To remove a computer from the domain
NET COMPUTER \\ComputerName /DEL
This command is only available from the Server and is best run from the Primary Domain Controller (PDC)
• Ip config has a number of switches the most
common are:
• ipconfig /all – displays more information about the
network setup on your systems including the MAC
address.
• ipconfig /release – release the current IP address
• ipconfig /renew – renew IP address
• ipconfig /? -shows help
• ipconfig/flushdns – flush the dns cache
PLACEMENT INTERVIEW QUESTION
What are Commands?
a) specific instructions for performing a
particular task
b) part of the operating system
c) part of the shell
d) special instructions
Explanation
Answer: A

Commands are basically specific instructions which


are given by the users to perform a particular piece of
a task. In UNIX, commands are entered by the user
through a command line interface which further is
processed by the command interpreter i.e. Shel
ftp
Transfers files to and from a computer running a File
Transfer Protocol (ftp) server service.
This command can be used interactively or in batch
mode by processing ASCII text files.
Syntax
ftp [-v] [-d] [-i] [-n] [-g] [-s:<filename>] [-a] [-A] [-x:<sendbuffer>] [-r:<recvbuffer>] [-

• On the PC, start the command prompt window.


• In the command prompt window, type, ftp <hostname> or <IP address>. ...
• Press Enter.
• If prompted for a password, type in the password. ...
• At the ftp> prompt, type in the ftp command and press Enter.
• Type quit or bye to end the session.
Parameter Description
-v Suppresses display of remote server responses.
-d Enables debugging, displaying all commands passed between the FTP
client and FTP server.

-i Disables interactive prompting during multiple file transfers.

-n Suppresses auto-login upon initial connection.


-g Disables file name globbing. Glob permits the use of the asterisk (*) and
question mark (?) as wildcard characters in local file and path names.

-s:<filename> Specifies a text file that contains ftp commands. These commands run
automatically after ftp starts. This parameter allows no spaces. Use this
parameter instead of redirection (<). Note: In Windows 8 and Windows
Server 2012 or later operating systems, the text file must be written in
UTF-8.

-a Specifies that any local interface can be used when binding the ftp data
connection.

-A Logs onto the ftp server as anonymous.


-x:<sendbuffer> Overrides the default SO_SNDBUF size of 8192.
-r:<recvbuffer> Overrides the default SO_RCVBUF size of 8192.
-b:<asyncbuffers> Overrides the default async buffer count of 3.
-w:<windowssize> Specifies the size of the transfer buffer. The default window size is 4096
bytes.

<host> Specifies the computer name, IP address, or IPv6 address of the ftp
server to which to connect. The host name or address, if specified, must
be the last parameter on the line.

-? Displays help at the command prompt.


FTP

• File Transfer Protocol(FTP) is an application layer


protocol that moves files between local and remote
file systems.
• It runs on the top of TCP, like HTTP.
• To transfer a file, 2 TCP connections are used by
FTP in parallel: control connection and data
connection.

25
26
Control and Data Connection
Control connection
For sending control information like user identification, password,
commands to change the remote directory, commands to retrieve and
store files, etc., FTP makes use of control connection.
The control connection is initiated on port number 21.
Data connection
For sending the actual file, FTP makes use of a data connection.
• A data connection is initiated on port number 20.
FTP sends the control information out-of-band as it uses a separate
control connection. Some protocols send their request and response
header lines and the data in the same TCP connection.
• For this reason, they are said to send their control information in-
band. HTTP and SMTP are such examples. 27
FTP Session
When an FTP session is started between a client and a server, the client
initiates a control TCP connection with the server-side.
• The client sends control information over this. When the server
receives this, it initiates a data connection to the client-side.

• Only one file can be sent over one data connection. But the control
connection remains active throughout the user session.

• As we know HTTP is stateless i.e. it does not have to keep track of


any user state. But FTP needs to maintain a state about its user
throughout the session.

28
Advantages of FTP(File Transfer Protocol)-

• Speed is one of the advantages of FTP(File Transfer


Protocol).
• Efficiency is more in FTP.

29
Disadvantages of FTP(File Transfer
Protocol

• file size limit is the drawback of FTP only 2 GB size


files can be transferred.
• multiple receivers are not supported by the FTP.
• FTP does not encrypt the data this is one of the
biggest drawbacks of FTP.

30
FTP Replies
Some of the FTP replies are :
200 Command okay.
530 Not logged in.
331 User name okay, need a password.
225 Data connection open; no transfer in progress.
221 Service closing control connection.
551 Requested action aborted: page type unknown.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.

31
How to Configure FTP Server
First-- Go to Desktop
Write ip address------------
Subnet address-------------
Gateway IP address-------------
Second—Go to Text editor---Ceate file
Third-Select Service-go to SERVICE OPTION
Write Username----password-----
service---READ—WRITE—DELETE---
External Link
https://www.youtube.com/watch?v=1d5OhU26Yt8
Questions/Answers
HARDARE KNOWLEDGE
RJ45 Cables

Ethernet cable is constructed using a set of


four twisted pair wires (eight wires in
total).
• Some are shielded, but many Cat5 and
Cat6 cables are unshielded.
Crimping Tools for RJ45 Connectors

• Crimping tools are used to join or connect two


components or pieces of material through
compression forces.
• They work by squeezing the two parts together
tightly enough to form a fairly permanent bond or
seal.
• Different sorts of crimp tools have various
additional functions along with this ability to
compress and seal materials.
• Common examples include cutting, stripping, and
bending.
RJ45 Cables
• There are numerous grades, referred to as categories, of
RJ45 cable sold online. They are collectively known as
Ethernet or network communication cables and are used to
achieve high-speed data transfer connections.

• Ethernet cable is constructed using a set of four twisted pair


wires (eight wires in total). Some are shielded, but
many Cat5 and Cat6 cables are unshielded. Generally
speaking, the higher the category number, the greater the
potential speed and capacity (data transfer rate) of the cable
will be between directly-linked servers, switches, and
network devices.
DHCP and DNS
https://www.youtube.com/watch?v=cZBVca41u
mM
THANKS

You might also like