Checking the IP Configuration

Dear all,

Now I want to share my very poor knowledge about checking IP configuration. At Red Hat we can check IP configuration in many ways. Some ways are discussed below.

1. demesg this command displays kernel log messages.By using this command we can check the IP configuration. But the message will be very long to find the IP configuration. For checking easily we can write the following command:

demesg | grep eth

grep command will show only the lines that contains eth. The | command says that the output of demesg command will be input for grep eth command.

For specific checking we can specify ethernet port. Suppose to check eth0 interface we may write:

demesg | grep eth0

Suppose to check ppp0 interface we may write:

dmesg | grep ppp0

2. ifconfig this command will show the configured interfaces.

3. ifconfig -a this command wil show all interfaces.

4. ifconfig eth0 this command will show the eth0 interface.

5. we can check this at the specific location also. For Debian we may check only one file /etc/network/interfaces . We can do this with the following command:

vi /etc/network/interfaces

The vi command will open this file(vi is used for editing a file).

For Red Hat we have to go to the /etc/sysconfig/network-scripts/ directory. There are file for every interfaces. Suppose for eth0 interface there is a file ifcfg-eth0 . We can read this file for checking the interface IP address. We can do all this by the following commands:

cd /etc/sysconfig/network-scripts/

vi /etc/ifcfg-eth0

I am going to write very soon about vi editor. If you want, you may read this.

And one thing, I think here is another useful command ls. using ls command we cam list the the files and directory in a specific directory.

Suppose, if I write:

cd /etc/sysconfig/network-scripts/


Then there a list of directory and files will be shown.

NB: Please leave any advice regarding this issue.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: