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