If a school has an IP that's like 10.0.x.x, and a department in that school has it's own site that's an extension of the school's site, does that department's IP just change the last two numbers in the IP? Does the school have to purchase extra domain space? Could I have additional addresses established at my IP address, just by changing the last numbers? Am I completely wrong with my idea of IP numbers?
As we are talking about IPv4 addresses here, you have to consider two things:
- Usually, your Internet Service Provider (ISP) will assign you one IPv4 address. This can either be changing (the common case for private households) or static. However, there is usually one IP address at a time that you can be reached from the outside of your network.
- Internally, you can organize your network independent from those policy. For this purpose, some standard IP ranges like
10.*.*.*are reserved to be used arbitrarily by the local network administrator.
Hence, it is up to the network administrator how the additional department is included in the school's local address space.
Generally, you want to talk of different loosely coupled networks in terms of subnets. To determine a certain subnet, you specify a subnet mask, which fixes the first $n$ bits of an IP address as "the network's address".
So, the admin would assign the additional department a "network address" of, e.g.,
10.0.54.0/24. This means, the first 24 bits of this IP identify the network and everything after the 24th bit can be assigned arbitrarily to the devices of that network. In this particular example, any device with an IP address between
10.0.54.254 would be logically seen as part of the network
Assuming that the whole school is connected to some kind of router (which uses NAT to "translate" the local IP addresses to the global IP address assigned by the ISP, roughly speaking), it is then up to the router configuration whether the department is reachable directly. This router will most likely run a web server or delegate http requests to a device of the network that runs a web server. Based on the configuration of this delegation or request processing, you can instruct the router to delegate any request to, e.g.,
department.myschool.com to the web server of the department and then you are fine.
However, you have to have a top level domain for this, even with a wildcard contract such that every request to
*.myschool.com is forwarded to your school's router, that then can decide to forward requests to
Another way to have this flexibility would to use different ports for different web servers in your local network. But this would burden anyone who is interested in your department's website to guess or somehow know the port your web server is listening to.