Hi there,
Ho una Debian 5,0 server appena installato.
Per impostazione predefinita, l'indirizzo IP è dato da dhcp.
Codice:
pegase:~# grep '^[^#]' /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
pegase:~# head -2 /etc/hosts
127.0.0.1 localhost
127.0.1.1 pegase.apltest pegase
Poi modificare il file in modo che essi guardano come questo:
Codice:
pegase:~# grep '^[^#]' /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.251
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
pegase:~# head -2 /etc/hosts
127.0.0.1 localhost
192.168.1.251 pegase.apltest pegase
Allora cerco di applicare le modifiche con:
Codice:
pegase:~# /etc/init.d/networking restart
Ma a quel punto, ho sciolto eth0:
Codice:
pegase:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 B) TX bytes:560 (560.0 B)
E l'unico modo per applicare le modifiche è necessario riavviare il server.
È normale? Come faccio a passare da dhcp ad indirizzo statico senza riavviare?
Grazie per il vostro aiuto.
Santiago