Experiment 2 Linu X Commands PDF

Title Experiment 2 Linu X Commands
Author Jaya Kulchandani
Course Computer Network
Institution University of Mumbai
Pages 7
File Size 521.2 KB
File Type PDF
Total Downloads 62
Total Views 124

Summary

Download Experiment 2 Linu X Commands PDF


Description

EXPERIMENT- 2 Aim: Study of basic network command and Network configuration commands. Apparatus (Software): Command Prompt and Packet Tracer. Procedure: To do this EXPERIMENT- follows these steps: In this EXPERIMENT- students have to understand basic networking commands e.g ping, tracert etc. All commands related to Network configuration which includes how to switch to privilege mode and normal mode and how to configure router interface and how to save this configuration to flash memory or permanent memory. This commands includes • Configuring the Router commands • General Commands to configure network • Privileged Mode commands of a router • Router Processes & Statistics • IP Commands 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. Using PING: ping www.geeksforgeeks.org To stop pinging we should use ctrl+c otherwise it will keep on sending packets.

min: minimum time to get a response avg: average time to get responses max: maximum time to get a response Controlling the number of pings: Earlier we did not define the number of packets to send to the server/host by using -c option we can do so. ping -c 5 www.geeksforgeeks.org

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.

The first column corresponds to the hop count. The second column represents the address of that hop and after that, you see three space-separated time in milliseconds. traceroute command sends three packets to the hop and each of the time refers to the time taken by the packet to reach the hop. Syntax: traceroute [options] host_Address [pathlength]

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. Syntax:

nslookup [option] Options of nslookup command: nslookup google.com : nslookup followed by the domain name will display the “A Record” (IP Address) of the domain. Use this command to find the address record for a domain. It queries to domain name servers and get the details.

NETSTAT Netstat command displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc., Examples of some practical netstat command: -a -all : Show both listening and non-listening sockets. With the –interfaces option, show interfaces that are not up # netstat -a | more : To show both listening and non-listening sockets.

List all tcp ports. # netstat -at : To list all tcp ports. List all udp ports. # netstat -au : To list all udp ports.

HOST Host command in Linux system is used for DNS (Domain Name System) lookup operations. In simple words, this command is used to find the IP address of a particular domain name or if you want to find out the domain name of a particular IP address the host command becomes handy. host domain_name: This will print the IP address details of the specified domain. Example: host geeksforgeeks.org

host IP_Address: This will display the domain details of the specified IP Address. Example: host 52.25.109.230

HOSTNAME Hostname command in Linux is used to obtain the DNS(Domain Name System) name and set the system’s hostname or NIS(Network Information System) domain name. A hostname is a name which is given to a computer and it attached to the network. Its main purpose is to uniquely identify over a network. Syntax : hostname -[option] [file] Example: We obtain the system hostname by just typing hostname without any attributes.

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. Syntax: ifconfig [...OPTIONS] [INTERFACE] Options: -a : This option is used to display all the interfaces available, even if they are down. Syntax: ifconfig –a

ARP ARP is the abbreviation for Address Resolution Protocol, which is used to find the address of a network neighbour for a given IPv4 address. This protocol is used by network nodes to resolve IP addresses to their corresponding MAC addresses. The mapping of the IP addresses to MAC addresses is stored in a cache on the system so that this information does not need to be retrieved repeatedly while the system communicates with its neighbouring devices over the network. The purpose of the arp protocol is twofold i.e. it determines the physical/MAC address of the destination device while sending a data packet and it responds with the MAC address of the machine on which it is running as answers queries received from other machines. The arp command could be used for the following purposes: Display IP address to MAC address resolution information for neighboring devices. Clear address mapping entries and set them up manually. Add an address for which to proxy arp. Forcefully add permanent entries to the ARP table. With a basic understanding of what arp is and the information it provides, lets now take a look at some examples:

Example 1: Display entries Invoking the arp command without any options will display the contents of the arp cache table....


Similar Free PDFs