
To configure IP address using CLI (run any of the following command)
[root@wtuto ~]# system-config-network
or
[root@wtuto ~]# system-config-network-tui
or
[root@wtuto ~]# neat-tui
or
[root@wtuto ~]# setup
or
[root@wtuto ~]# ifconfig eth0 192.168.1.111
(Note: Substitute 192.168.1.111 with your system IP Address)
To configure IP address using GUI:
[root@wtuto ~]# system-config-network
or
[root@wtuto ~]# neat
To configure IP address by editing network configuration file:
[root@wtuto ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.1.255
HWADDR=00:E0:4D:3A:58:9B
IPADDR=192.168.1.111
NETMASK=255.255.255.0
NETWORK=192.168.1.0
PEERDNS=yes
GATEWAY=192.168.1.1
ONBOOT=yes
Note: You must restart network service to apply new TCP/IP settings
[root@wtuto ~]# service network restart
To enable and disable LAN card :
ifup ethx
(to enable)
ifdown ethx
(to disable)
service network restart (start/stop/status/restart)
(to restart network service)
mii-tool
(to check the lan card connectivity)
ethtool eth0
(to check property of lan card)
HOW TO ADD ADDITIONAL IP ON A SINGLE NETWORK ADAPTOR:
Scenario: You have one network adaptor (192.168.1.12) and want to add an additional IP address (10.0.0.12) on the same network adaptor.
cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth0:1
vim ifcfg-eth0:1 (now change the TCP / IP configuration as per your requirement)
To add route (to communicate with different range of ip)
[ pc1 with 192.168.1.11 and pc2 with 10.0.0.1]
pc1# route add -net 10.0.0.1 netmask 255.0.0.0 dev eth0
pc2# route add -net 192.168.1.11 netmask 255.255.255.0 dev eth0
traceroute yahoo.com
dig fbi.com
To stop pinging (temporarily: means until the next boot):
cat /proc/sys/net/ipv4/icmp_echo_ignore_all (Shows 0 means disable)
echo “1” > /proc/sys/net/ipv4/icmp_echo_ignore_all
cat /proc/sys/net/ipv4/icmp_echo_ignore_all (Shows 1 means enable)
Port forwarding (Lan Routing):
vim /etc/sysctl.conf
net.ipv4.ip_forward = 1 (just change 0 to 1)
(save & exit)
Host name configuration file is network (located in /etc/sysconfig)
DNS resolver file is resolv.conf (located in /etc)
Local resolver file is hosts (located in /etc)





