networking – How to find all subnets in network

In many cases like this there’s some mysterious guy who makes this some times ago.. Some time ago i configured couple of routers to work like switches or.. just disabled dhcp, changed ip address to something that cant (as i suppose) interfere with our current or feuture subnets. And forgot what it can (the subnet) be completely. Some day i want to login to it, but is there’s some method to find it?

I’m trying to set my computer’s ip to + then i’m realized that my computer’s ip should be in the same subnet with this router (for now it knows that its /8 or /16 subnet are “local” (accesible just from its network interface but the router dont, am i right?)

I’m thinking about script that in the loop trying different subnets, one by one, and use something like nmap.. Or maybe there’s better solution?