Questo è il /etc/network/interfacescontenuto del mio file
L'unico modo in cui questo ha effetto è quando il sistema si riavvia.
Sto cercando di farlo manualmente. I miei tentativi di seguito.
auto eth0
iface eth0 inet static
address 192.168.1.57
netmask 255.255.255.0
gateway 192.168.1.1
up ip addr add 192.168.0.57/24 dev eth0 label eth0:1
down ip addr del 192.168.0.57/24 dev eth0 label eth0:1
up ip route add 192.168.0.0/24 via 192.168.0.1 dev eth0:1 metric 20
down ip route del 192.168.0.0/24 via 192.168.0.1 dev eth0:1 metric 20
Prima ho provato a correre sudo ifup eth0
e ricevo
RTNETLINK answers: File exists
Failed to bring up eth0.
L' /etc/network/interfacesunico lavoro quando riavvio il sistema
Diverso da quello che ho provato
sudo /etc/init.d/networking restart
sudo service network-manager restart
sudo service networking restart
Ma nessuno di loro farà apparire le modifiche nel interfacesfile
La mia unica opzione era sudo ifup eth0e questo dà l'errore sopra.
che c'è?
sudo ifdown eth0dàifdown: interface eth0 not configurede running sudo ifdown eth0 && ifup eth0 dà lo stesso