1
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ This does not strike me as a CS question but more a sysadmin problem. (Also, your question is probably covered by Wikipedia; did you read anything before asking here?) $\endgroup$ – Raphael Jul 19 '13 at 11:00
  • $\begingroup$ I did read Wikipedia before asking here. $\endgroup$ – user8722 Jul 19 '13 at 18:00
2
$\begingroup$

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 192.168.*.* and 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.1 and 10.0.54.254 would be logically seen as part of the network 10.0.54.0/24.

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 department.myschool.com accordingly. 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.

$\endgroup$
  • $\begingroup$ It is noteworthy that institutions such as universities will not use NAT in order to enable people to have globally accessible machines. In that case, you have to honor the institutions address space, otherwise packages don't reach you (because routing is done according to the convention). $\endgroup$ – Raphael Jul 19 '13 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy