So what you need is a method to find out what subnet you have been assigned while making your non static connection VIA DHCP. I don't know that this is currently possible with basic good question!
have you tried this below once connected to router?
May or may not want to read what is below as it is slightly off topic chatter so if you want to stick to the point just read what is above to avoid any confusion.
----------------------------------------------------------------------------------------------
I did not understand the question default gateway kind of threw me off you could figure out the subnet if you connect to the same network with a phone or PC for the time being. However not so sure how to do this in basic. I am sure it is handled and stored somewhere. And you are correct it is not always default.
My knowledge of subnets is vague at best I only have an assumed knowledge of them just through using them I've never read a word about subnets I only know of them through doing networking and study of the effects of a subnet. From my experience subnets seem to be in place to allow for separation in intranets. So in theory you could have many intranets with a single point of entry that point being the one that is connecting to the other subnet from which you would access it from. Now could this be incorrect yes! I have discerned everything about subnets by use and cause and effect. Sometimes you draw improper conclusions learning things in this manner if you don't investigate deep enough. Like I suppose it is entirely possible to connect to a router on 255.255.255.0 with two other routers that are on 255.255.255.254 for instance having two points of entry however, it is possible that this may cause a conflict instead and not be doable I have never had the need to test this but it is just a though that came to mind.