Monday, August 19

Basic Network Concepts on Linux RHEL / CentOS 5&6


Here we are providing some idea about network and network commands

To check IP address and IP information

To set IP address

network configuration 
select ethernet
give IP address, subnet mask, gateway
#service network restart

To provide DNS information:
#vi /etc/resolv.conf
(type as follows)
nameserver (DNS IP)
ex: nameserver

To check network connectivity:
Ping: packet internet gropher
#ping server IP

To check LAN card status:

To check host name:

To change host name:
#hostname (fqdn)
ex: #hostname

To assign new hostname permanently
#vi /etc/hosts 
add a new line 
<IP> <fqdn> <hostname>
ex: station1

#vi /etc/sysconfig/network
edit as follows

To view current version of kernel 
#uname -r

To view current run level:

we have 6 run levels:
runlevel 0=shutdown
runlevel 1=single user mode
runlevel 2=multi user without nfs
runlevel 3=multi user with network(only text mode)
runlevel 4=un used
runlevel 5=multi user with graphics & network
runlevel 6=reboot

#netstat -ant it will gives network statistics(which port number of the server is connected to which port number of client)
#vi /etc/sysconfig/network-scripts
this is the directory stores networking information 
this command gives gateway, boot protocol, netmask details
this is the file which stores IP addresses and networking details

ifdown <eth0>:
this command is used to down the device
ifup <eth0>:
this command is used to bring the interface up device


  1. Very clear to follow, its like I am in the lecture room. congratulations

  2. ya its good ,but if would provide some more info then very useful....


:: Linux - Legends ::