This procedure can be used to change anything related to your network card configuration and have that change be persistent on system reboot.
- Logon as the root user
- Change directory to /etc/sysconfig/network-scripts
[root@oel1 ~]# cd /etc/sysconfig/network-scripts
[root@oel1 network-scripts]#
3. VI the file ifcfg-eth0 and make the changes you wish. In the example below, we edited the IPADDR variable to value of 192.1638.1.220
DEVICE=eth0
HWADDR=08:00:27:8F:E8:7D
TYPE=Ethernet
UUID=3138ac97-98ca-40fe-b24a-adea56ab46a9
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.220
NETMASK=255.255.255.0
- Stop the network service
service network stop
5. Start the network service
service network start
6. See the new configuration detail of eth0 with ifconfig command.
[root@oel1 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:8F:E8:7D
inet addr:19.168.1.220 Bcast:19.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe8f:e87d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16595 errors:0 dropped:0 overruns:0 frame:0
TX packets:659 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3986311 (3.8 MiB) TX bytes:98819 (96.5 KiB)
[root@oel1 ~]#
Larry Catt