Re: nslu2: two devices: one by default
On Thu, Dec 10, 2009 at 05:03:40PM +0100, Xan wrote:
> Hi,
>
> I have now this route table:
>
> # route
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> localnet * 255.255.0.0 U 0 0 0 eth0
> localnet * 255.255.0.0 U 0 0 0
> wlan0
> default 172.26.0.1 0.0.0.0 UG 0 0 0
> wlan0
> default 172.26.0.1 0.0.0.0 UG 0 0 0 eth0
>
> (with ip route I get:
> 172.26.0.0/16 dev eth0 proto kernel scope link src 172.26.0.2
> 172.26.0.0/16 dev wlan0 proto kernel scope link src 172.26.0.3
> default via 172.26.0.1 dev wlan0
> default via 172.26.0.1 dev eth0 )
>
> and I want to get that:
>
> # route
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> localnet * 255.255.0.0 U 0 0 0 eth0
> default 172.26.0.1 0.0.0.0 UG 0 0 0 eth0
>
>
> Can I get that with the following command? Please confirm:
>
> ip route del default via 172.26.0.1 dev wlan0
> ip route del 172.26.0.1/16 dev wlan0 proto kernel scope link src 172.26.0.1
>
> and
>
> ip route add 172.26.0.1/16 dev eth0 proto kernel scope link src 172.26.0.1
> ip route add default via 172.26.0.1 dev eth0
>
> ?
>
> Is it correct?
Should work, or you could do:
ip route replace 172.26.0.1/16 dev eth0 proto kernel scope link src 172.26.0.1
ip route replace default via 172.26.0.1 dev eth0
instead of del and add.
--
Len Sroensen
Reply to: