I just learnt about this concept and I have a query which was also asked by someone earlier but was grossly misinterpreted.
Suppose my Router has Routes for Networks: 192.168.22.0/23 and 192.168.22.0/25 in its routing table and if it receives a packet with destination IP address of 192.168.22.1 according to Longest Prefix Matching, it will choose the routing entry with subnet /25 and forward the packet but what if the Destination Network doesn't have the intended IP Address according to my Schema.
Wouldn't it cause connectivity/ packet drops and break my network?
I, as a Network Engineer, would have to setup my network by giving the Overlapping IPs Uniquely to the 192.168.22.0/25 Network or is it sorted/ handled in a different manner?
Please keep in mind that I understand that I cannot configure Networks/ IP Addresses with overlapping subnets on the same router and the topology in consideration is kinda like a router connected to 2 other routers and they are connected to these networks respectively.