Skip to content

February 10, 2017

Configure Networking in Ubuntu 16.04 Server

by linux

One way on some Ubuntu versions was to edit /etc/network/interfaces and add the the configuration of network interface. On Ubuntu 16.04 I’ve don the following setup:

# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

And then we create a file in /etc/network/interfaces.d called enp0s3:

# cat enp0s3
auto enp0s3
iface enp0s3 inet static
  address 10.0.0.211
  broadcast 10.0.0.255
  netmask 255.255.255.0
  post-up route add default gw 10.0.0.1
  pre-down route del default gw 10.0.0.1
 
dns-nameservers 10.0.0.1
Read more from Linux Quick Tips

Leave a Reply

required
required

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments