Wireless and wired network cards on the same machine
Hi,
I've finally got my wirelss card to work, but I have one last little problem that I can't seem to figure out.
I currently have a wired NIC, ip address 192.168.0.36 (eth0)
The wireless NIC has an ip address of 192.168.0.35 (eth1)
My defalt gateway is 192.168.0.123
When I boot up, only the wired NIC is able to send stuff through the gateway (as I discovered in the routing table using `route -n`)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.128 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.128 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.123 0.0.0.0 UG 0 0 0 eth0
The wireless card is however able to ping other internal ip addresses (192.168.0.xxx).
The only way to get the wireless card working (which I'll be using 90% of the time) is to take down the wired network (eth0), by issuing:
ifconfig eth0 down
and then adding a default gateway, but using eth1 instead of eth0.
My problem is that I'd like to not have this hassle of changing like this all the time. I'd like to be able to fallback on one device or the other depending on if the wired NIC is plugged in or not.
I've read masses of threads on bonding/ip tables/etc, but I am a little confused as to which I should do to achieve what I want to do.
Thanks
|