How to Configure Your NIC's IP Address
1)You can see that this command gives good information on the interrupts, or PCI bus ID, used by each card.
# cat /proc/interrupts
2) Changing Your IP Address
]# ifconfig eth0 10.0.0.1 netmask 255.255.255.0 up
3)You can place your IP address information in these files ( /etc/rc.local or /etc/sysconfig/network-scripts ), which are then used to auto-configure your NICs when Linux boots.
# cd /etc/sysconfig/network-scripts
# vi ifcfg-eth0
#
# File: ifcfg-eth0
#
DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
#
# The following settings are optional
#
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
4) OR if you want to boot your system frm the dhcp then
# cd /etc/sysconfig/network-scripts
# vi ifcfg-eth0
#
# File: ifcfg-eth0
#
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
[root@bigboy network-scripts]#
5) After you change the values in the configuration files for the NIC you have to deactivate and activate it for the modifications to take effect. The ifdown and ifup commands can be used to do this:
# ifdown eth0
# ifup eth0
6)how to create Multiple IP Addresses on a Single NIC
# ifconfig eth0:0 192.168.1.99 netmask 255.255.255.0 up
7 ) how to make the ip alias permanent at the time of boot
( a.) edit the /etc/sysconfig/network-scripts/ifcfg-eth0:0
DEVICE=eth0:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.99
NETMASK=255.255.255.0
(b)# ifup eth0:0
# ifdown eth0:0
8) How To Change Your Default Gateway
# route add default gw 192.168.1.1 eth0
9) To make it permanent
à
> go to edit the
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=bigboy
GATEWAY=192.168.1.1
10) How to View Your Current Routing Table
]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
255.255.255.255 0.0.0.0 255.255.255.255 UH 40 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 40 0 0 wlan0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 40 0 0 wlan0
[root@bigboy tmp]#
11)