Tag Archives: Ping

Centos Network Configuration – on a Barebones from Command Line

Centos LogoCentos Network Configuration – is very simple on a full installation. However, I downloaded the Centos’ “Minimal Install” cd and used yum to install various packages I needed.

The simple way to do it if you have a standard installation is to use the Network Administration
Tool (system-config-network), which is a graphical interface to edit the configuration files. Since I haven’t installed this tool, I needed to edit the files manually.

How to Configure Network in Centos from Command Line:

A quick way to see if your interface works and if you can ping internal resources.
ifconfig eth0 192.168.0.2 netmask 255.255.255.0
Use your IP addresses.
Note that this is not persistent, at the first reboot, ot first network services restart this will be lost.

For a DHCP address assignment use:
ifdown eth0
dhclient eth0

To get a persistent centos network configuration use the following procedure:

Edit the network configuration file

vi /etc/sysconfig/network-scripts/ifcfg-eth0
Edit the configuration file so it contains your IP address configuration as follows:
DEVICE="eth0"
BOOTPROTO=none
HWADDR="00:00:00:00:00:00"
NM_CONTROLLED="yes"
ONBOOT="yes"
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
IPADDR=192.168.0.2
PEERDNS=no
USERCTL=no

This configures your interface with the IP 192.168.0.2 and the netmask 255.255.255.0.
For more info about Centos’ network configuration look here: .

Set up Name Resolution

Name resolution configuration, is more consistent across various Linux distributions. Most of the Linux distros will have the configuration file at /etc/resolv.conf.
Edit this file and change according to your network:
vi /etc/resolv.conf
Modify the file so it contains pointers to your DNS servers like this:
nameserver 192.168.0.254
nameserver 192.168.0.253

How to troubleshoot a slow computer network?

Troubleshoot Network - Ping
Pinging Google

Your network is slow. What do you do to make it faster?
The answer is not simple and the reason for your slow network could be a lot of things. You have to take a step by step approach and isolate the bottleneck. Once you isolate the point of failure it is easier to find the problem.

Many times a packet sniffer will help you find the problem faster. A good free packet sniffer is Wireshark. Another packet sniffer is Microsoft Network Monitor.

Here is a list of Windows-based network tools that can help you troubleshoot almost any problem in a Computer Network:
Ping – a network utility to test if a computer is up and reachable or not. Ping uses the ICMP protocol to send echo requests.
Nmap – a port scanner. You need a port scanner to enumerate open ports and live IP addresses.
Tracert – a utility that traces the path of a network packet enumerating all of the routers that it passes through.
Wireshark – a packet sniffer.
Netstat – a utility that enumerates all the open ports on the local computer.
Ipconfig – a utility to list or modify the properties of a network adapter.
Netsh – a powerful Windows utility to modify various network properties. It is a scripting utility that basically controls every aspect of the Network on a Windows computer.
One of the cool usages of the netsh is to reset the TCP/IP stack to the defaults without the need to uninstall and reinstall the TCP/IP protocol as we needed with the older OSs.
Route – enables the view and manipulation of routing.
Nslookup – a name resolution utility. Very useful to check DNS servers and validity of name records.
Arp – a utility that allows you to get information about MAC address to IP address resolution.
Getmac – Provides the MAC address and lists associated network protocols for all network cards for a local or remote computer.
Getname – displays the computer name.
PathPing – Combines the functions of Traceroute and Ping, very powerful tool.
Net services commands – Performs a broad range of network tasks such as Network mapping, authentication, controls services, etc…

If you are not sure how to use these tools read the Help or from the command line, (all of these are command line tools), issue the command with the help option, for instance: “pathping /?”. This will give you a list of other valid options.  

This article is part of a five posts series regarding Network Troubleshooting.

  1. How to troubleshoot a slow computer network?
  2. Troubleshoot a Slow Network – The entire Network is Slow
  3. Troubleshoot a Slow Network – Slow Server
  4. Troubleshoot a Slow Computer Network – Only One Computer on the Network is Slow
  5. Troubleshoot a Slow Computer Network – Your Computer is Slow and Not the Network