Linux configurazione rete

Per la configurazione temporanea (viene persa al reboot) si possono lanciare i seguenti comandi:

(esempio per indirizzo statico sulla scheda ‘eth0’)
ifconfig eth0 10.0.0.13
ifconfig eth0 netmask 255.255.0.0
route add default gw 10.0.0.254

Per rendepre permanente la modifica invece è necessario modificare il file /etc/network/interfaces.

Prendendo ad esempio i parametri precedenti il file diventa:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 10.0.0.13
netmask 255.255.0.0
gateway 10.0.0.254

ifconfig lanciato senza parametri, visualizza l’attuale configurazione; di una scheda in particolare se specificata come argomento.

Leave a Reply

Your email address will not be published.