Statische IP unter Linux einstellen

      Kommentare deaktiviert für Statische IP unter Linux einstellen

Backup der alten Einstellungen:

sudo cp /etc/network/interfaces /etc/network/interfaces.sav

Konfigurationsfile öffnen:

sudo nano /etc/network/interfaces
In the interfaces file look for a line such as:

Zeile „iface eth0 inet dhcp“ mit # auskommentieren und folgende Konfiguration einfügen:

# The loopback interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
#your static IP
address 192.168.1.118
#your gateway IP
gateway 192.168.1.1
netmask 255.255.255.0
#your network address "family"
network 192.168.1.0
broadcast 192.168.1.255

 

 

Netzwerk neustarten

sudo /etc/init.d/networking restart