Qual è l'impostazione predefinita / etc / network / interfaces?


Risposte:


33

Per eth0 con dhcp:

# The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface
iface eth0 inet dhcp

Per eth0 statico:

# The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface
iface eth0 inet static
    address 192.168.10.33
    netmask 255.255.255.0
    broadcast 192.168.10.255
    network 192.168.10.0
    gateway 192.168.10.254 
dns-nameservers 192.168.10.254

link: http://www.iasptk.com/ubuntu/20202-ubuntu-server-networking-configuration-dhcp-address-static-ip-address-second-ip-address-or-virtual-ip-address


1
Quindi cosa devo fare se il mio non ha un'interfaccia di rete primaria, ha solo iface lo inet loopback ??
— IgorGanapolsky

Devi aggiungere un primario (dhcp OR statico) aggiungendo le righe sopra
— ptheo

Cosa succede se non aggiungo voci "rete" e "trasmissione"? Il valore predefinito sarà sui valori ragionevoli?
— JohnyTex,


Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.