Hey there.
Here's the scenario:
I have two networks. One of them is wired, the other is wireless. The wired has an internet connection and a few other computers connected to it. The wireless network has a few hosts connected to it too, but it has no internet connection.
What I've been trying, fruitlessly, to do, is make all connections that are bound to the internet, or my wired network, be routed that way, and all the connections to the hosts of the wireless network go that way.
Here's the setup..
Wired:
192.168.1.0/24 Gateway = 192.168.1.1
Route internet through here
Wireless
192.168.2.0/24 Gateway = 192.168.2.1
If my computer sends a packet to the internet, it should be routed through 192.168.1.1
If I send a packet to one of the local hosts of the wireless network, it should be routed through 192.168.2.1.
Here's the routing table I've set up(This is one of many configurations I've tried)
Code:
$ ip route show
192.168.2.1 dev wlan0 scope link
192.168.2.0/24 via 192.168.2.1 dev wlan0 src 192.168.2.4
192.168.1.0/24 dev eth2 proto kernel scope link src 192.168.1.36
169.254.0.0/16 dev eth2 scope link metric 1000
default via 192.168.1.1 dev eth2
With this, and everything else, I get destination host unreachable when pinging.
The strange thing is that, if I unplug my eth cable, reboot and connect to the wireless network, everything is fine and I can access the router and the others.
That's about it.
I would seriously appreciate any help and input I can get on this. I'm trying to improve my networking skills, as I've had this idea of setting up a small linux box as a router for quite some time, for the fun of it, but I need to get routing under control before I go ruin my network lol.
Thanks!