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 network that the router is connected to (this is usually your ISP) gives it one address. This is your external IP address on the internet.
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.
Im planning to expand my 8port hub using a spare wifi router. the map should be like this: Modem Router Located 1st floor on my house connected to an 8 port Hub all has pc connected and connected also a Wifi Router on the second floor which has 3 pc connected on it. how can i make all the computer connect each other in lan games since the wifi router seems giving different ip than the hub? i cant even use file sharing with all the pc i have in 1st and 2nd floor? im typically confused using the DHCP settings or it is rather unrelated?