O Ubuntu Server continua alternando entre IP estático e DHCP

0

Usando o Ubuntu Server 16.04. Eu pensei que eu poderia usar a interface gráfica para gerenciar meu endereço IP, então eu configurei um estático assim. Usando a porta ethernet na VM. Por alguma razão, de vez em quando, o endereço IP retornará ao DHCP. Como faço para manter esta permanente. Eu altero o arquivo de configuração abaixo? Eu acabei de obter essa configuração do servidor, e demorei muito para quebrá-la agora.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto ens160
iface ens160 inet dhcp

Em caso afirmativo, altero esse arquivo para ficar exatamente como este

# The loopback network interface
auto lo
iface lo inet loopback

# External interface to the outside world
auto eth0
iface eth0 inet dhcp
    pre-up iptables-restore < /etc/iptables.rules

# Our local network, we're the DHCP server
auto eth1
iface eth1 inet static
    address   192.168.1.1
    netmask   255.255.255.0
    network   192.168.1.0
    broadcast 192.168.1.255
    
por JGW1977 01.02.2018 / 18:47

0 respostas