It should go without saying, I'm new and still learning about networking. One of the things I'm not clear on and couldn't find a satisfying answer to, although I've done some digging around, is how devices that are connected to a switch get their IP address and what kind of IP address they are?
What I mean is, from what I've found, switches don't operate at the IP address level, but the MAC Address level.
So the question is:
How do the devices connected to a particular switch get their IP? Who hands it out to them? Do you have to assign it manually or does (I assume) the router hand it out automatically?
Do switches automatically create a sub-net? That is, if I have two switches connected to my router, will the devices connected to those 2 switches be on 2 different subnets? If so, is that the default, or do I have to set it up, and can I change that (ie, make it so that they're actually on the same subnet)?
I know it's more questions than one, but they're all in the bracket of how a switch-connected device is assigned an IP. I'd appreciate it if you could maybe throw some light on this.