0% found this document useful (0 votes)
25 views6 pages

Experiment No - 6

This document outlines basic networking commands including ifconfig, ping, traceroute, nslookup, ssh, scp, telnet, and ftp, along with their usage and tasks. Each command is explained with specific tasks to familiarize users with network configuration, connectivity testing, and file transfer. The conclusion emphasizes the importance of these commands for diagnosing network issues and understanding network administration.

Uploaded by

shadowboy284
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)
25 views6 pages

Experiment No - 6

This document outlines basic networking commands including ifconfig, ping, traceroute, nslookup, ssh, scp, telnet, and ftp, along with their usage and tasks. Each command is explained with specific tasks to familiarize users with network configuration, connectivity testing, and file transfer. The conclusion emphasizes the importance of these commands for diagnosing network issues and understanding network administration.

Uploaded by

shadowboy284
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/ 6

EXPERIMENT NO- 6

Objective:

Familiarizing basic networking commands - ifconfig, ping, traceroute, nslookup, ssh, scp, telnet, ftp

1. ifconfig

The ifconfig command is used to configure and display network interface parameters in
Linux and Unix-like operating systems.

Tasks:

1. Check your network interfaces:

ifconfig

This will display all network interfaces (e.g., eth0, lo, wlan0) and their current
configurations, including IP addresses, MAC addresses, and status.

2. Display information about a specific interface:

ifconfig eth0

Replace eth0 with the actual interface you want to inspect.

3. Configure an IP address for a network interface:

sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0 up

This command assigns an IP address to the eth0 interface.

4. Disable/Enable an interface:
o To disable an interface:

sudo ifconfig eth0 down

o To enable an interface:
sudo ifconfig eth0 up

2. ping

The ping command is used to test the network connectivity to another host.

Tasks:

1. Ping an IP address or domain:

ping 192.168.1.1

This command sends ICMP Echo Request packets to the specified IP address and
waits for an Echo Reply.

2. Ping a website (e.g., Google):

ping www.google.com

This tests connectivity to Google's website.

3. Ping continuously:

ping -t www.google.com # Linux/Unix use Ctrl + C to stop the ping.

(For Linux, ping will continue indefinitely until interrupted.)

4. Limit the number of pings:

ping -c 5 www.google.com

This sends only 5 pings.

3. traceroute

traceroute shows the route packets take to a destination, helping to identify network
bottlenecks.

Tasks:
1. Trace the route to a website:

traceroute www.google.com

This command will show each hop the packets take, including the time taken at each
step.

2. Trace the route to an IP address:

traceroute 192.168.1.1

4. nslookup

nslookup is used to query DNS (Domain Name System) to obtain domain name or IP
address mapping.

Tasks:

1. Find the IP address for a domain:

nslookup www.google.com

This command queries DNS servers to resolve the domain name to an IP address.

2. Find the domain name from an IP address:

nslookup 8.8.8.8

This finds the domain name associated with the IP address 8.8.8.8.

5. ssh (Secure Shell)

ssh is used for secure remote login to a remote machine over the network.

Tasks:

1. Login to a remote machine:

ssh [email protected]
Replace user with the actual username and 192.168.1.100 with the IP address of the
remote machine.

2. Login with a specific port:

ssh -p 2222 [email protected]

This command logs into the remote machine using port 2222.

3. Exit from the SSH session:

exit

6. scp (Secure Protocol)

scp is used to securely transfer files between local and remote machines.

Tasks:

1. a file from your local machine to a remote machine:

scp /path/to/localfile [email protected]:/path/to/remote/destination

2. a file from a remote machine to your local machine:

scp [email protected]:/path/to/remotefile /path/to/local/destination

3. a directory recursively:

scp -r /path/to/localdir
[email protected]:/path/to/remote/destination

7. telnet

telnet is used to connect to remote devices, commonly used for testing ports on remote
servers (though less secure than SSH).

Tasks:

1. Connect to a remote server:


telnet 192.168.1.100 80

This connects to the remote server at IP 192.168.1.100 on port 80 (HTTP).

2. Check if a port is open:

telnet www.google.com 443

This checks if port 443 (HTTPS) is open on Google's server.

8. ftp (File Transfer Protocol)

ftp is used to transfer files between a client and a server over the network.

Tasks:

1. Login to an FTP server:

ftp ftp.server.com

Replace ftp.server.com with the FTP server’s address.

2. List files in the current directory:

ls

3. Download a file from the server:

get filename

4. Upload a file to the server:

put localfile

5. Exit from FTP session:

bye
Conclusion:

These commands are essential for diagnosing and troubleshooting network issues,
configuring network interfaces, testing connectivity, and transferring files across networks.
By practicing these commands, you'll gain a foundational understanding of networking and
network administration.

You might also like