Sunday, 1 December 2013

Linux Networking Commands And Configurations

Networking Commands

Here are the basic networking command you should know to monitor your network configuration and status.

Type following command into your terminal.

$ ping <ip addr> 

   To check response of icmp echo request to host machine.

   ping -t <ip addr>       (Continuous ping to network)
   ping -s 32 <ip addr>  (for sending specific bytes of data)
   ping -c 5 <ip addr>    (for sending no. of packets to destination)



$ mtr <ip addr>

   To perform combine functionality of 'traceroute' and 'ping' tool.
By applying this command you can get additional information about state, connection and percentage of lost packets of all intermediate hosts.

   mtr <ip addr>
   mtr  --report -c 4 <ip addr> (will run 4 no. of cycles in report mode of mtr)





$ netstat

   To display connection and routing table information.Here are some commands.

   netstat -a  (Connection info)
   netstat -r  ( routing table)



$ ifconfig

   To display available interfaces on machine and add or remove network to it.

   ifconfig    (tells available interfaces on comp.)
   ifconfig eth0 add <ip addr> <mask>   (To add new network to eth0)




Configuration Files

To edit network configuration or to check connection infromation you can see these files.

/etc/network/interfaces---Network configuration file.

/etc/resolv.conf---DNS configuration.

/etc/hostname---Hostname configuration.

/etc/hosts---Local DNS.




   

No comments:

Post a Comment