zusätzliche statische Adresse zu DHCP

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
pocopelli
Beiträge: 36
Registriert: 28.02.2006 21:08:00

zusätzliche statische Adresse zu DHCP

Beitrag von pocopelli » 28.03.2008 11:01:43

tach,

ich bekomme per dhcp meine ip Adresse zugewiesen und möchte.
Meine "/etc/network/interfaces" sieht wie folgt aus:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth1
iface eth1 inet dhcp
up ip route add to 10.0.0.0/8 via 192.168.6.240
down ip route del to 10.0.0.0/8 via 192.168.6.240
ich möchte aber dazu noch in ein weiteres Netzwerk rein. Dazu gebe ich auf der Shell folgendes ein:
route add -net 10.0.0.0 netmask 255.255.255.0 gw 192.168.6.240 dev eth1
Danach habe ich dann auch Zugriff auf ein weiteres Netzwerk. das muß aber nach jedem
Booten eingeben. Gibts da nicht auch eine Möglöcihkeit dsa als statische bzw. dauerhafte
Route einzutragen ?

Gruß

Poc

Benutzeravatar
mistersixt
Beiträge: 6601
Registriert: 24.09.2003 14:33:25
Lizenz eigener Beiträge: GNU Free Documentation License

Beitrag von mistersixt » 28.03.2008 16:26:12

Mmmh, Du hast doch schon "up" und "down" in der interfaces stehen. Gib doch evtl. mal den ganzen Pfad zu "route" an, also "/sbin/route ...". Und vielleicht mal post-up anstatt up und pre-down anstatt down probieren.

Gruss, mistersixt.
--
System: Debian Bookworm, 6.11.x.-x-amd64, ext4, AMD Ryzen 7 3700X, 8 x 3.8 Ghz., Radeon RX 5700 XT, 32 GB Ram, XFCE

Antworten