Netzwerk Beispielkonfiguration für Debian/Ubuntu

Beispiel für eine Netzwerkkonfiguration in Debian/Ubuntu

Das Netzwerk wird in dieser Datei Konfiguriert: /etc/network/interfaces

Beispiel für ein System mit 2 Netzwerkkarten und statischen IP-Adressen:

# The loopback network interface
auto lo
iface lo inet loopback

# The network interfaces
auto eth0 eth1

iface eth0 inet static
  address 192.168.1.20
  netmask 255.255.255.0
  network 192.168.1.0
  broadcast 192.168.1.255
  gateway 192.168.1.1
  # dns options
  dns-nameservers 192.168.1.1
  dns-search example.lan

iface eth1 inet static
address 192.168.2.20
netmask 255.255.255.0
up route add -net 192.168.2.0/24 gw 192.168.2.1 dev eth1

Beispiel für eine DHCP-Konfiguration:

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
  wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Neuen Kommentar hinzufügen

Sie können einen Kommentar abgeben, indem Sie das unten stehende Formular ausfüllen. Nur Text. Web- und E-Mail-Adressen werden in anklickbare Links umgewandelt.