Can a router be connected to both a subnet 1 and a subnet 1.1 which is a subnet inside of subnet 1?
For example, can a router be connected and sent packets to subnet 223.1.17.128/25 and 223.1.17.192/28?
Thanks.
Yep, it's possible. But the packets will be routed through only one route with longest prefix match.
Let's guess you have router with three interfaces:
192.0.2.10/24
, default gateway - 192.0.2.1
223.1.17.129/25
223.1.17.193/28
And routing table will be seems like:
static 0.0.0.0 0.0.0.0 via 192.0.2.1 dev e0
connected 192.0.2.0/24 dev e0
connected 223.1.17.128/25 dev e1
connected 223.1.17.192/28 dev e2
Simplify the corner cases like routing to local addresses and broadcast addresses, we get following behaviour for overlapped address spaces:
223.1.17.192-223.1.17.207
will be routed through e2
interface.223.1.17.128-233.1.17.191
and 223.1.17.208-223.1.17.255
will be routed through e1
interface.Thus, the hosts with addresses from range 223.1.17.192-223.1.17.207
, connected to e1
interface (that has /25
prefix) will be in the blind spot. They won't have access through the router, only to hosts in same broadcast domain. To avoid this negative behaviour you should use something like vrf
on the router.