Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Commands 2 Linux Ubuntu 12.04 A.S.

Similar presentations


Presentation on theme: "Network Commands 2 Linux Ubuntu 12.04 A.S."— Presentation transcript:

1 Network Commands 2 Linux Ubuntu 12.04 A.S

2 Tools for network configuration
netstat Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Listing all ports (both TCP and UDP) using netstat -a option netstat -a | more

3 Tools for network configuration
Showing Statistics by Protocol Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP, and IP protocols. The -s parameter can be used to specify a set of protocols. netstat –s Showing Statistics by TCP Protocol Showing statistics of only TCP protocol by using option  netstat -st

4 Tools for network configuration
Showing Network Interface Transactions Showing network interface packet transactions including both transferring and receiving packets with MTU size. netstat –i Finding Listening Programs Find out how many listening programs running on a port. netstat -ap | grep http

5 Tools for network configuration
tcpdump This is a sniffer, a program that captures packets off a network interface and interprets them for you. It understands all basic internet protocols, and can be used to save entire packets for later inspection. Install tcpdump in Linux yum install tcpdump yum stands for "Yellowdog Updater Modified". It is an interactive, rpm-based package manager.

6 Tools for network configuration
ping The ping command (named after the sound of an active sonar system) sends( ICMP protocol's mandatory ECHO_REQUEST datagram) echo requests to the host you specify on the command line, and lists the responses received their round trip time.You simply use ping as: ping ip_or_host_name Note to stop ping (otherwise it goes forever) use CTRL-C (break).

7 Tools for network configuration
Check whether the local network interface is up and running Ping localhost using zero (0) ping 0 Ping localhost using name ping localhost Ping localhost using ip ping

8 Tools for network configuration
Send N packets and stop Send N packets specified with -c option and then stop. This way the ping command can exit automatically instead of pressing CTRL+C to exit. ping -c 5 google.com In the following example, ping command sends 5 packets, and waits for response from the destination host. Ping will exit after receiving the response or error.

9 Tools for network configuration
Print Only Ping Command Summary Statistics Use option -q to view only the ping statistics summary as shown below. ping -c 5 -q

10 Tools for network configuration
Change Ping Packet Size You can change the packet size of ping command using -s option. Example: Change the default packet size from 56 to 100. ping -s 100 localhost Ping Bytes Sent = Ping Packet Size + Ping Header Packet Size (28 bytes)

11 Tools for network configuration
traceroute traceroute will show the route of a packet. It attempts to list the series of hosts through which your packets travel on their way to a given destination. Also have a look at xtraceroute (one of severalgraphical equivalents of this program). Command syntax: traceroute machine_name_or_ip

12 Tools for network configuration
Traceroute Examples  to find the network path from my machine to google.com : traceroute google.com The ‘*’ field in output There are times when one could encounter an ‘*’ in the output rather than a value. This depicts that the required field could not be fetched. The reason can be anything from reverse DNS lookup failure to packets not hitting the target router to packets getting lost on their way back. So we see that the reason could be many but for all these type of cases the traceroute utility provides an * in the output.

13 Tools for network configuration
HOST Command host command to find name to IP or IP to name in IPv4 or IPv6 and also query DNS records. host Using -t option we can find out DNS Resource Records like CNAME, NS, MX, SOA etc. host -t CNAME

14 Tools for network configuration
nmap “ network exploration tool and security scanner”. nmap is a very advanced network tool used to query machines (local or remote) as to whether they are up and what ports are open on these machines. A simple usage example: nmap machine_name More information :


Download ppt "Network Commands 2 Linux Ubuntu 12.04 A.S."

Similar presentations


Ads by Google