Assume that, if you are working in Data Center or running your application in VPS server, we can change static IP Address without downtime and reboot your Server.
Do carefully when update or changes in network configure file.
Check your current IP address pointing to the server,
# ifconfig
eth0 Link encap:Ethernet HWaddr DF:BB:DD:CE:21:15
inet addr:192.168.0.1 Bcast:192.168.3.3 Mask:255.255.255.0
inet6 addr: ae40::226:3abb:fe9e:4af2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11333949 errors:0 dropped:0 overruns:0 frame:0
TX packets:111301 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6545516345 (2.7 GiB) TX bytes:12362212 (33.9 MiB)
Interrupt:11
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:286 errors:0 dropped:0 overruns:0 frame:0
TX packets:286 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:23628 (23.0 KiB) TX bytes:23628 (23.0 KiB)
Before make changes in configure file, keep a backup of eth0 original file as "ifcfg-eth0".
Now update static IP address, NETMASK, BROADCAST, GATEWAY.
Your network device name is "eth0" so open configure file,
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.0
BROADCAST=192.168.112.255
NETWORK=192.168.1.0
ONBOOT=yes
GATEWAY=192.168.1.1
UUID="37cf6cd6-6672-4eec-a1a6-6feb49b7bba5"
PREFIX=24
IPV6INIT=no
HWADDR=DF:BB:DD:CE:21:15
Once update static IP address ensure everything is correct in "ifcfg-eth0" file before save.
Finally restart your Network Service,
# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Update Static IP Address in UI
Go to System -> Preferences -> Network Connections
-> Click On "Wired" Menu
-> Click on "Add"
-> Click on "IPV4 Settings"
Fill the IP Address, Netmask, Gateway and DNS Servers. Restart your network service.
# /etc/init.d/network restart
Comments (0)