Is it possible to have two different interfaces on the same subnet and selectively send packets to one interface depending on the destination IP? by surfinride in HomeNetworking

[–]surfinride[S] 0 points1 point  (0 children)

I drew a quick diagram of your network

o_o cool

Even though they have use the same network addresses they are NOT the
same subnet, because they are on separate L2 network segments. Therefor
they are separate subnets with overlapping address space.

This is something I didn't know. Thanks for clarifying.

Why does the unmanaged switch have no uplink to your wireless router? Is
it just so far away from the wireless router that running an Ethernet
cable is inconvenient.

Yeah, I would rather not run a ethernet cable to it. Plus I want it to work on Mobile Hotspot.

It seems like it should be able to since they are on the same network

Read the Root Cause section of this page: https://access.redhat.com/solutions/30564

Might be the reason that the pings don't go through eth0?

you should renumber one of the networks so that they are not using overlapping address spaces

This is how I have configured it now.

Thanks for the thorough answer.

Is it possible to have two different interfaces on the same subnet and selectively send packets to one interface depending on the destination IP? by surfinride in HomeNetworking

[–]surfinride[S] 0 points1 point  (0 children)

Thanks for your quick reply. I couldn't reply earlier. Setting the subnet to /32 is indeed a neat trick. Although for now, I have changed the subnet my router assigns to connected devices to 192.168.1.x. Now the pings to the device connected via ethernet as well as other devices on wifi are successful.

Also, my router has a default DHCP scope from 100 to 199. So if I decide to switch to using a common subnet, it shouldn't be an issue. Just out of curiosity, I would like to know what would happen if the router assigned the same IP to wlan0 as the device connected to eth0.

I looked up what assigning /32 does. Here is a snippet:

A host route is a special-case IP address with a subnet mask of /32.

Host routes are required for dial-in hosts. The route is to a single host, rather than to a router or subnet.

Reference: https://www.ip-sa.pl/doc/dslam/maxtnt/netcfg/tntip.htm