Quote:
I mean... if i have two cards in my box connected to the same LAN, how can i make sure that all traffic passes through wlan0 instead of eth0 (who my pc is default configured for now)?
|
Just down that interface you do not need :) See 'man route' - there is the way to define the interface you want to use for LAN/internet connection.
Using '/sbin/route' you'll find the gateway IP and
interface through the packets are exchanged with your LAN and internet.
For example:
Code:
bash-2.05b$ /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.0.0 U 0 0 0 eth0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default <your gateway IP> 0.0.0.0 UG 0 0 0 eth0
Quote:
If i remove my network cable from my laptop how can i then make sure that i can, for instance surf the webb using my wlan card instead?
|
Since both cards connects the same LAN you have (probably) only one gateway. But (in the usual case which is the subject) it can be reached using one card only. I don't know in what way it is chosen when both interfaces are up (if not declared explicitly in gateway declaration). I believe the fastest is chosen. So if accidentally you down the NIC which is gateway-related one you probably cut all the LAN/internet traffic.
Quote:
Is mozilla for example default configured for using eth0??
|
Absolutely not!
Quote:
Do i need to "route" all traffic normally going through eth0 to wlan0?
|
If you down unwanted interface there will not be another way for the packets.
I am not sure but I believe the 'old' default gateway needs to be deleted and just added (the same one). It then 'switch' to the currently available interface assuming that using 'route' for that you do not use explicit interface specification).