Netzwerk einrichten (Linux): Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
Zeile 3: Zeile 3:


== Statische IP-Addresse vergeben ==
== Statische IP-Addresse vergeben ==
<code>
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
iface eth0 inet static
iface eth0 inet static
     address 10.0.0.100
     address 10.0.0.100
Zeile 11: Zeile 15:
     # Add persistent route command
     # Add persistent route command
     post-up route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.0.0.101 metric 1
     post-up route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.0.0.101 metric 1
</code>
</pre>


== Interfaces neu einlesen ==
== Interfaces neu einlesen ==

Version vom 2. März 2016, 22:44 Uhr

Konfigurationsdateien

  • /etc/network/interfaces

Statische IP-Addresse vergeben

iface eth0 inet static
    address 10.0.0.100
    gateway 10.0.0.1
    netmask 255.255.255.0
    dns-nameservers 10.0.0.1
    # Add persistent route command
    post-up route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.0.0.101 metric 1

Interfaces neu einlesen

sudo /etc/init.d/networking restart

Routingtabelle anzeigen

netstat -rn