We have a 3rd party Router code for our networking product. I am a novice networking developer and do not have much idea on routing. However we are facing a scenario for which we seek solution.
The issue does not occur as long as we keep adding devices in network connected to router with different subnet. But when we define 2 or more IPs in same network / hosts - packets destined for one device lands to another and vice versa.
Initial debugging leads to find that routing of data packet is not correct from the router. It just routed based on network identifier - hence the host destination is wrong
Since I am not an network expert I understand things logically like below -
A remote router would send to next "hop" if not for same network or not configured for destination network
A router that has devices / network directly connected to itself should identify the destination based on IP (within same network / subnet)
Please confirm my understanding and then how the routing table needs to be setup such that internal network routing is facilitated? Is there any RFC related to same for setup?