Set Ip For Mac Address

An IP address is like an identity on the Internet.All computing devices connected to the Internet have an IP address. Sometimes, that address is static- that means the address remains the same and the device will always have that address when connected to the Internet.Other addresses are dynamic, which means the device could potentially have a different IP address each time it connects to the. How to set static IP Address in Ubuntu Server 16.04. It is really important to know how to configure static IP Address on Ubuntu Server, Because it is almost impossible to run a server without a static IP Address. During the installation, Ubuntu Server by default configured to use dynamic IP Address.

It is really important to know how to configure static IP Address on Ubuntu Server, Because it is almost impossible to run a server without a static IP Address.

During the installation, Ubuntu Server by default configured to use dynamic IP Address. In this Tutorial we are going to learn how to set static IP Address in Ubuntu Server 16.04.

Following are the steps we are going to follow

  • Check Available network interfaces on Ubuntu Server 16.04
  • Add static IP Configuration to the network configuration file.
  • Restart Ubuntu Networking Service.

Check Available Network Interfaces on Ubuntu Server

First of all you need to get the list of available network interfaces on your Ubuntu Server 16.04. We can use ip link show command to find available network interfaces on Ubuntu Linux.

You should get the similar output as below screenshot shows.

As above image shows, Our Ubuntu Server has Ethernet interfaces called enp0s3. Next we'll set static IP address to the enp0s3 interface.

Set static IP Address to the network interface

For this example I am going configure enp0s3 Ethernet interfaces with following ip configuration

Set Ip For Mac Address

IP Address = 192.168.1.10

Network mask = 255.255.255.0

Default gateway = 192.168.1.1

DNS Server = 8.8.8.8 and 8.8.4.4

On Ubuntu server, in order to set static IP address we need to add IP configuration to the /etc/network/interfaces file. So open the /etc/network/interfaces file using a command line text editor (You can use vim or nano on Ubuntu Server).

Then set static IP address as follows.

First line of configuration should be the word 'auto' followed by the interface name (This brought up the network interface automatically when system boot or when networking restart).

auto enp0s3

The next line should specify whether to use static IP address or dhcp ip on the enp0s3 network interface. In our case it should be static.

Then add the static IP configuration as follows.

Set Ip For Mac Address

auto enp0s3

iface enp0s3 inet static

address 192.168.1.10

netmask 255.255.255.0

gateway 192.168.1.1

dns-nameservers 8.8.8.8 8.8.4.4

Set Ip For Mac Address Windows 10

Restart Networking Service

After setting up IP Configuration, we need to restart Ubuntu networking service.

sudo ip addr flush enp0s3 && sudo systemctl restart networking.service

Verify the static IP configuration.

After restarting network, use ip add command to make sure that static ip address has been assigned to the network interface.

Then send ICMP request to a remote host to check the connectivity.

Configure Multiple Network Interfaces

Same Way you can configure multiple network interface on ubuntu server using /etc/network/interfaces file.

Example

In the following example, I have set static IP Address on two network interfaces (enp0s3 and enp0s8).

auto enp0s3

iface enp0s3 inet static

address 192.168.1.10

netmask 255.255.255.0

gateway 192.168.1.1

dns-nameservers 8.8.8.8 8.8.4.4

auto enp0s8

Set Ip For Mac Address

Ip Set Mac Address Linux

iface enp0s8 inet static

Set Ip Using Mac Address

Static

address 192.168.0.100

Set Ip For Mac Address Software

netmask 255.255.255.0

*** Most important thing when configuring multiple interface is you cannot set multiple default gateways. Only one interface should configure with the default gateway. For other interfaces you should add default gateway using static routes.

Get Mac Address From Ip

Summary : Set Static IP Ubuntu Server 16.04

In this tutorial we learned how to set static ip address in Ubuntu server 16.04.

Set Ip For Mac Address Generator

  • Using ip link show command we identified the available network interface in our ubuntu server 16.04.
  • Then we add static IP address configuration to the /etc/network/interfaces file and restart the ubuntu networking service.