IP Routing : WirelessLAN and Ethernet in Same Network
My hardware has two interfaces: a) ethernet - eth0 b) WirelessLAN - eth1.
After power on, eth1 gets associated to WirelessLAN access point.
Following is the network Setup:
Hardware eth0 IP address: 192.168.254.254
Hardware eth1 IP address: 192.168.254.253
Wireless LAN Access Point IP address: 192.168.254.1
test PC eth0 IP address: 192.168.254.102
The ethernet interface of Hadrware and test PC is directly connected to Wireless LAN access point through ethernet cable. Hardware is associated to Wireless LAN access point through eth1 interface.
Here is my hardware's routing table:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.254.1 255.255.255.0 UG 0 0 0 eth1
default 192.168.254.1 255.255.255.0 UG 0 0 0 eth0
192.168.254.0 * 255.255.255.0 U 0 0 0 eth0
192.168.254.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.254.1 0.0.0.0 UG 0 0 0 eth0
Now, when ethernet cable is connected to hardware, I can ping 192.168.254.254 from test PC.
When I removed ethernet cable from hardware, I cannot ping 192.168.254.253 from test PC.
I think access point should forward the incoming packet from test pc to hardware's eth1 interface wirelessely.
Where am I wrong? Is it related to Kernel's routing table? If yes, how to detect removal of ethernet cable from hardware and change routing table dynmically?
Re::IP Routing : WirelessLAN and Ethernet in Same Network
Thanks for the response.
Yes, I tried that scenario with different subnets and it also did not work.
Now I need to perform the same scenario within same subnets, like our PC. PC can have ethernet and Wireless LAN card in the same netmask. I want test PC to ping both the interfaces and if anyone gets down, it should ping other interface.
How should I make my system to route it correctly?
I tried using route add -net option. It worked but finally only one interface can be pinged. If I disable one, it should ping the other or vice versa.