How strange, I did 2 Debian VPS (Lenny) today and I never needed the metric parameter

On 6 November 2011 19:52, G. Miliotis <corfiot@elementality.org> wrote:
On 6/11/2011 9:04 μμ, Andy Smith wrote:
Hi,

On Sun, Nov 06, 2011 at 08:28:41PM +0200, G. Miliotis wrote:
Nope, it happened to me and it was the 'metric 100' that did it.
Was it definitely the "metric 100" that you needed as opposed to
just the "dev eth0"?

Cheers,
Andy

Yes, I tried 'dev eth0' on its own and it didn't work.

There seems to be a default metric=0 parameter on the ip command, if metric is not explicitly specified.

If the metric is 0, the 'ip addr show' shows no metric information:

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

I suspect this "metric 100" comes from the debian/ubuntu network scripts: their default must be 100 unless you specify another metric in /etc/network/interfaces.

Regards,
--G


_______________________________________________
users mailing list
users@lists.bitfolk.com
https://lists.bitfolk.com/mailman/listinfo/users



--
Keith Williams

If the only tool you have is a hammer, you tend to see every problem as a nail.
  - Abraham Maslow

ทำดีได้ดี  ทำชั่วไดชั่ว