Experiment No - 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:
ifconfig
This will display all network interfaces (e.g., eth0, lo, wlan0) and their current
configurations, including IP addresses, MAC addresses, and status.
ifconfig eth0
4. Disable/Enable an interface:
o To disable an interface:
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:
ping 192.168.1.1
This command sends ICMP Echo Request packets to the specified IP address and
waits for an Echo Reply.
ping www.google.com
3. Ping continuously:
ping -c 5 www.google.com
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.
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:
nslookup www.google.com
This command queries DNS servers to resolve the domain name to an IP address.
nslookup 8.8.8.8
This finds the domain name associated with the IP address 8.8.8.8.
ssh is used for secure remote login to a remote machine over the network.
Tasks:
ssh [email protected]
Replace user with the actual username and 192.168.1.100 with the IP address of the
remote machine.
This command logs into the remote machine using port 2222.
exit
scp is used to securely transfer files between local and remote machines.
Tasks:
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:
ftp is used to transfer files between a client and a server over the network.
Tasks:
ftp ftp.server.com
ls
get filename
put localfile
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.