Every Cloud Servers will include a public IP address through which the server can be accessed remotely. The IP can be set as either DHCP (automatic) configuration or static IP configuration. DHCP configuration detects IP address setting automatically, whereas static IP configuration requires the IP address settings to be manually set in the server.
This guide outlines the basic steps on how to configure the IP address of your server manually in your Linux or Windows Cloud Servers. The same steps can also be used to update the new IP address in the server manually.
Click Start Menu
, then click Control Panel
option.
Click Network & Sharing Center
option.
Click Change adapter settings
in the left panel.
Right click adapter with name Ethernet
and select Properties
.
In the properties window, select Internet Protocol Version 4 (TCP/IPv4)
and click Properties
button.
Select Use the following IP address:
option and configure the static IP address.
Example for 203.86.232.249:
Note: The netmask is 255.255.255.0 and the gateway is 203.86.232.1.
Once IP and Subnet entered check the box Validate Settings upon exit
, click OK
and then close the Ethernet property
window.
Windows Network Diagnostic tool
will run to check to see any issues, close this window.
To check if the static IP address configured properly, right click Start Menu
, then click Command Prompt
.
Execute the following command for checking network configuration.
# ipconfig
Edit the network configuration file using the below command.
# /etc/sysconfig/network-scripts/ifcfg-eth1
Note: eth1/ens1 is the device name of the server. Please replace with the correct device name if necessary.
Add the following entries for network card and configure the static IP address.
Example for 203.86.232.249:
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=203.86.232.249
NETMASK=255.255.255.0
GATEWAY=203.86.232.1
USERCTL=no
Note: The netmask is 255.255.255.0 and the gateway is 203.86.232.1.
Save the file.
Restart the network service and make the changes effect.
# systemctl restart NetworkManager.service
Check the static IP address configured properly inside network card.
# ifconfig
Edit the network configuration file using the below command.
# /etc/sysconfig/network-scripts/ifcfg-eth1
Note: eth1/ens1 is the device name of the server. Please replace with the correct device name if necessary.
Add the following entries for network card and configure the static IP address.
Example for 203.86.232.249:
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=203.86.232.249
NETMASK=255.255.255.0
GATEWAY=203.86.232.1
USERCTL=no
Note: The netmask is 255.255.255.0 and the gateway is 203.86.232.1.
Save the file.
Restart the network service and make the changes effect.
# systemctl restart network.service
Check the static IP address configured properly inside network card.
# ifconfig
Edit the network configuration file using the below command.
# /etc/network/interfaces
Add the following entries for network card and configure the static IP address.
Example for 203.86.232.249:
auto ens4
iface ens4 inet static
address 203.86.232.249
netmask 255.255.255.0
gateway 203.86.232.1
Note: The netmask is 255.255.255.0 and the gateway is 203.86.232.1.
Save the file.
Restart the network service and make the changes effect.
# systemctl restart network.service
Check the static IP address configured properly inside network card.
# ip addr
Edit the network configuration file using the below command.
# /etc/network/interfaces
Add the following entries for network card and configure the static IP address.
Example for 203.86.232.249:
auto eth1
iface eth1 inet static
address 203.86.232.249
netmask 255.255.255.0
gateway 203.86.232.1
Note: The netmask is 255.255.255.0 and the gateway is 203.86.232.1.
Save the file.
Restart the network service and make the changes effect.
# systemctl restart network.service
Check the static IP address configured properly inside network card.
# ifconfig
Edit the network configuration file using the below command.
# /etc/sysconfig/network-scripts/ifcfg-eth1
Note: eth1/ens1 is the device name of the server. Please replace with the correct device name if necessary.
Add the following entries for network card and configure the static IP address.
Example for 203.86.232.249:
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=203.86.232.249
NETMASK=255.255.255.0
GATEWAY=203.86.232.1
USERCTL=no
Note: The netmask is 255.255.255.0 and the gateway is 203.86.232.1.
Save the file.
Restart the network service and make the changes effect.
# systemctl restart NetworkManager.service
Check the static IP address configured properly inside network card.
# ip a