It’s a simple question, but the answer is both yes and no. Let me explain.
Become a Patron of Ask Leo! and go ad-free!
IP addresses and hubs
A hub is what I would call a stupid device. It’s actually transparent to all of the devices communicating through it, so there’s nothing to assign an IP address to – nothing inside the hub that would respond to a specific request.
All that a hub does is take data in one port and send it to all of the others without any kind of interpretation of that data. It would need to be able to understand the data that it’s handling to be able to have an IP address assigned to it.
On top of that there would have to be a reason to assign an IP address to the hub – what would you do with it if it had one? A hub is so simple that there’s simply no reason to assign it an IP address.
If you can assign an IP address to something that looks like a hub, it’s probably not a hub at all. It’s either a switch or a router.
IP addresses and routers
Now, a router will typically have at least two IP addresses.
The other IP address is the one that the router defines for itself on your local network. Typically, it looks like 192.168.0.1. That’s what my router happened to assign to itself.
If you run “ipconfig” in the Command Prompt, the IP address of the router is usually the gateway address that’s listed.
Now, you can often alter the IP address or the IP address range that the router will use for the local network. Sometimes, there are reasons to do that, but it’s very rare. In most cases, the default settings for the router are correct; you plug in your computers and things work.
So, the short answer is yes, a router does by default have IP addresses assigned to it: one that’s external and one that’s internal (on your LAN).
And hubs? Nope. They don’t have IP addresses because it just doesn’t make sense.