How to configure the Static IP Address & Network Card for Linux & Windows Cloud Servers

2019-12-10 By Aaron 146927 Views linux windows networking
1 reviews

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.


Windows OS


  1. Click Start Menu, then click Control Panel option.

  2. Click Network & Sharing Center option.

  3. Click Change adapter settings in the left panel.

  4. Right click adapter with name Ethernet and select Properties.

  5. In the properties window, select Internet Protocol Version 4 (TCP/IPv4) and click Properties button.

  6. Select Use the following IP address: option and configure the static IP address.

    Example for 203.86.232.249:

    Windowsip1

Note: The netmask is 255.255.255.0 and the gateway is 203.86.232.1.

  1. Once IP and Subnet entered check the box Validate Settings upon exit, click OK and then close the Ethernet property window.

  2. Windows Network Diagnostic tool will run to check to see any issues, close this window.

  3. To check if the static IP address configured properly, right click Start Menu, then click Command Prompt.

  4. Execute the following command for checking network configuration.

    # ipconfig
    

CentOS – 8


  1. 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.

  1. 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.

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart NetworkManager.service
    
  3. Check the static IP address configured properly inside network card.

    # ifconfig
    

CentOS – 6 / 7


  1. 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.

  1. 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.

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart network.service
    
  3. Check the static IP address configured properly inside network card.

    # ifconfig
    

Debian


  1. Edit the network configuration file using the below command.

    # /etc/network/interfaces
    
  2. 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.

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart network.service
    
  3. Check the static IP address configured properly inside network card.

    # ip addr
    

Ubuntu


  1. Edit the network configuration file using the below command.

    # /etc/network/interfaces
    
  2. 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.

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart network.service
    
  3. Check the static IP address configured properly inside network card.

    # ifconfig
    

Fedora


  1. 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.

  1. 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.

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart NetworkManager.service
    
  3. Check the static IP address configured properly inside network card.

    # ip a
    

What do you think about this article?

Rate this article