G. Miliotis wrote:
On 6/11/2011 10:38 μμ, Andy Bennett wrote:
Hi,
Yes, I
tried 'dev eth0' on its own and it didn't work.
In what was did it not
work?
s/was/ways/
Regards,
@ndy
The command failed. It gave the same error we have been discussing.
OK... Perhaps I'm confused. You posted these outputs:
-----
root@ryvius:~# ip route add default via 85.119.80.1 dev eth0 metric 0
root@ryvius:~# ip -4 route show
85.119.80.0/21 dev eth0 proto kernel scope link src 85.119.83.253
default via 85.119.80.1 dev eth0
root@ryvius:~# ip route add default via 85.119.80.1 dev eth0 metric 100
root@ryvius:~# ip -4 route show
85.119.80.0/21 dev eth0 proto kernel scope link src 85.119.83.253
default via 85.119.80.1 dev eth0 metric 100
-----
...both of which show the correct route.
However, in the 2nd case, if you forget to remove the default route via
the old gateway IP (212.13.194.1) then the old one will (depending on
it's own metric, but probably) get preferred over this new route.
Furthermore, if the old route has a src address of your old IP address
then packets originating on your machine will be sent to The Internet
with the old address.
My VPS has a default route of metric 0.
Regards,
@ndy
--
andyjpb(a)ashurst.eu.org
http://www.ashurst.eu.org/
0x7EBA75FF