Der Befehl als root mit Fehlermeldung ist:
Code: Alles auswählen
ip route add 10.5.5.0/24 via 10.80.80.5
RTNETLINK answers: Network is unreachable
Code: Alles auswählen
ip route add 10.5.5.0/24 via 10.80.80.5
RTNETLINK answers: Network is unreachable
Die statische Route wurde genommen. Aber bei der anderen kommt wieder der Fehler.dufty2 hat geschrieben:Zuerst braucht man mal 'ne statische Route (vgl. auch "man route"), dann schluckt er es:
# ip route add 10.80.80.5 dev eth0
# ip route add 10.5.5.0/24 via 10.80.80.5 dev eth0
Code: Alles auswählen
> ip route add 10.5.5.0/24 via 10.80.80.5 dev eth0
RTNETLINK answers: Network is unreachable
Code: Alles auswählen
> route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.100.2.1 0.0.0.0 UG 1024 0 0 eth0
10.100.0.64 10.100.2.1 255.255.255.255 UGH 1 0 0 eth0
10.100.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Code: Alles auswählen
$ ip link show dev eth0
Code: Alles auswählen
# ip link set up dev eth0
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.
—Bruce Schneier
Code: Alles auswählen
10.80.80.5 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
Code: Alles auswählen
10.5.5.0 10.80.80.5 255.255.255.0 UG 0 0 0 eth0
Code: Alles auswählen
10.100.0.64 10.100.2.1 255.255.255.255 UGH 1 0 0 eth0
Code: Alles auswählen
route add -net 10.5.5.0 netmask 255.255.255.0 gw 10.80.80.5 dev eth0
Code: Alles auswählen
> ip route add 10.5.5.0/24 dev eth0
Code: Alles auswählen
> route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.100.2.1 0.0.0.0 UG 1024 0 0 eth0
10.5.5.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.100.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0