Adicione as seguintes linhas ao arquivo /etc/network/interfaces
:
usando DHCP
Exemplo1:
# The loopback network interface
auto lo
iface lo inet loopback
Exemplo2:
# The loopback network interface
auto lo eth0
iface lo inet loopback
# The primary network interface
iface eth0 inet dhcp
Substitua eth0 pela sua placa de interface de rede
reinicialize os serviços de rede usando o seguinte comando
sudo /etc/init.d/networking restart
static:
# The loopback network interface
auto lo eth0
iface lo inet loopback
# The primary network interface
iface eth0 inet static
address xx.xx.xx.xx
netmask 255.255.255.0
broadcast xx.xx.xx.xy
network xx.xx.xx.xz
gateway yy.yy.yy.yy
dns-nameservers yy.yy.yy.yy
Exemplo:
# The loopback network interface
auto lo eth0
iface lo inet loopback
# The primary network interface
iface eth0 inet static
address 192.168.0.77
gatway 192.168.0.1
netmask 255.255.255.0
broadcast 192.168.0.254
network 192.168.0.0
dns-nameservers 192.168.0.254
Reinicie os serviços de rede:
sudo /etc/init.d/networking restart