Re: nslu2: two devices: one by default
On Mon, Nov 02, 2009 at 09:59:03PM +0100, Xan wrote:
> En/na Lennart Sorensen ha escrit:
>> On Mon, Nov 02, 2009 at 08:38:12PM +0100, Xan wrote:
>>> How can I reorder them? via route command? All wlan0 //at top//
>> I don't know of any way other than deleting and re-adding using the
>> 'ip route' command (route and ifconfig are obsolete and should not be
>> used anymore).
> How can I do that? Can you put the commands?
If you have:
10.200.64.0/20 dev eth0 proto kernel scope link src 10.200.65.12
10.200.64.0/20 dev wlan0 proto kernel scope link src 10.200.65.12
default via 10.200.16.1 dev eth0
default via 10.200.16.1 dev wlan0
You could do:
ip route del default via 10.200.16.1 dev eth0
ip route del 10.200.64.0/20 dev eth0 proto kernel scope link src 10.200.65.12
If the link comes back on eth0, you could then do
ip route add 10.200.64.0/20 dev eth0 proto kernel scope link src 10.200.65.12
ip route add default via 10.200.16.1 dev eth0
Similar for the wlan0 one.
The ip command is extremely useful and much more powerful than route and
ifconfig ever were. A lot more options are available, and the syntax
is a lot nicer too.