[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mehrere Gateways in /etc/network/interfaces



Jan Luehr <jluehr@gmx.net> writes:
> in auf Seite 44 im "The Linux Network Administrator's Guide, Second 
> Edition"[1] findet sich ein ein Beispiel für eine routing Tabelle. Wie würde 
> eine /etc/interfaces aussehen, die diese routing-tabelle erzeugt?

Kann ich mangels [1] nicht nachvollziehen.

> Anscheinend gibt's bei Woody keine /etc/route.conf und immer wenn ich
> in der /etc/network/interfaces ein Gateway in einer iface direktive
> Schreibe wird das sofort als default-gateway genutzt.  Ein zweites ist
> somit nicht mehr möglich.

Wenn Du eine route auf ein Gateway (nicht Default-GW) setzen willst,
kannst das mit "up" und "down" machen:

Beispiel:

iface eth0 inet static
        address 172.20.9.21
        netmask 255.255.255.0
        network 172.20.9.0
        broadcast 172.20.9.255   
        up route add -net 172.20.0.0 netmask 255.255.0.0 gw 172.20.9.254 dev eth0
        up route add -net 192.168.0.0 netmask 255.255.0.0 gw 172.20.9.254 dev eth0
        down route del -net 172.20.0.0 netmask 255.255.0.0 gw 172.20.9.254 dev eth0
        down route del -net 192.168.0.0 netmask 255.255.0.0 gw 172.20.9.254 dev eth0

man 5 interfaces

llap,
Alex
-- 
"A philosopher," said the theologian, "is like a blind man in a
darkened room looking for a black cat that isn't there."
"That's right," the philosopher replied, "and if he were a
theologian, he'd find it." - Anonymous



Reply to: