Wie bewerbe ich statische IP-Adresse
Hi there,
Ich habe eine 5,0 Debian-Server neu installiert.
Standardmäßig ist die IP-Adresse von DHCP.
Code:
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
Dann habe ich die Dateien ändern, damit sie sieht wie folgt aus:
Code:
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
Dann habe ich versucht, die Änderungen mit:
Code:
pegase:~# /etc/init.d/networking restart
Aber an diesem Punkt, ich locker eth0:
Code:
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)
Und der einzige Weg, um die Änderungen ist ein Neustart des Servers.
Ist das normal? Wie kann ich von DHCP auf statische Adresse ohne Neustart?
Vielen Dank für Ihre Hilfe.
Santiago
|