Question: do subnet masks have to match?
Answer: Subnets can have different masks, it's called VLSM (see Classless Inter-Domain Routing). ... The router will select matched route with the longest prefix when deciding where to route a packet. So destination IP 192.168. 0.0-3 will match the first route, 192.168.