-1

I was reading about IP and how it actually saves 2 datas: Network and Host.

But there are few things which aren't that clear to me.

  • What is an example of network? Is each home with its own router considered one network? Or one of those large companies like ATT, Orange etc...

  • What is an example of Host? How is Host different when compared to network? Is every device under same router considered a Host?

  • Does the split (of host and network) hold true too for local devices under same router.

  • If 2 octals are for network then we can only have 2^16 networks in the world which doesn't make sense.

Please Help me understand by answering them all by order.

john
  • 35
  • 3
  • Octets have nothing to do with actual addressing. The octets just make it easier for humans to read a 32-bit unsigned integer. [This two-part answer](https://networkengineering.stackexchange.com/a/53994/8499) explains about IPv4 addressing and subnetting. – Ron Maupin Aug 17 '21 at 13:01
  • @RonMaupin I didn't claim so... please see my comment under the answer – john Aug 17 '21 at 17:02
  • The claim is, "_If 2 octals are for network then we can only have 2^16 networks in the world which doesn't make sense._" That simply is not true, and octets have nothing to do with addressing. Also, your comment, "_maximum networks that we can ever have is 2^24 which we already exceeded without using ipv6!_" is incorrect because the global IPv4 routing table is approaching one million, meaning there are that many networks being advertised on the public Internet. In any case, you are asking on the wrong SE site as this is not a programming question. – Ron Maupin Aug 17 '21 at 17:07
  • See [this answer](https://networkengineering.stackexchange.com/a/53937/8499) about the mitigations used for IPv4 address exhaustion. – Ron Maupin Aug 17 '21 at 17:09

1 Answers1

1

I think perhaps your source of information is not reliable, or you may have misinterpreted some of it. An IP address (in version IPv4, which is still dominant even today) is 32 bits, or 4 "octets" in length. Those 32 bits uniquely identify a single network interface on a single computer. Some number of the upper bits are used to identify what network the computer is on, and the rest to identify the specific machine on that network. How many bits are used to identify the network will vary. Note that, since 32 bits have not been really sufficient for the past 25(?) years, several schemes have been devised to re-use certain address ranges. My personal computer, for instance, is in the range 192.168.x.x, behind a normal consumer-grade router. Other tricks exist.

The best book on IP networking I have found is "TCP/IP Illustrated" by W. Richard Stevens, Addison-Wesley Publishing, ISBN 0-201-63346-9. Quite easy to read; just volume 1 will answer almost any question. Volume 2 is about implementation, while volume 3 is a bit "fluffy", and can be ignored.

Dharman
  • 30,962
  • 25
  • 85
  • 135
J.B.Ward
  • 11
  • 2
  • Sorry I didn't get an answer. Since IP is splitted then we don't have 2^32 IPS for routers... How is this even possible? let's say if 24 are used for network then maximum networks that we can ever have is 2^24 which we already exceeded without using ipv6! – john Aug 17 '21 at 17:01
  • Dude, there is no 'split'. Only a single address. The uppermost bits will identify a network; the number of these bits is variable. The limited space available in the 32 bits of IPv4 can be mitigated by use of things like NAT (Network Address Translation). Wikipedia has a good article on NAT. – J.B.Ward Aug 17 '21 at 20:53