0

I just recently learned about IPv4 and the different classes. Let's say I have a following arbritary IP address : 12.123.123.45

Now, the first octet is below 127 and thus, it tells me that this IPv4 address is a Class A address. A class A address is divided as follows enter image description here

From that, I deduce that the first octet (12) in my class is the network ID and the remaining 123.123.45 is the host ID. Now my question is, first of all,

Q1: is network ID (12) the same for everyone on my ISP?

Q2: Why do all devices on my home network share the same IPv4 address? Surely, the hostID part for each of them should change?

In essence, I'm asking what do these NetIDs and HostIDs actually repersent, is a part of the HostID meant to repersent my router? Which part does everyone on my ISP share?

AlfroJang80
  • 103
  • 2

1 Answers1

4

Welcome to network engineering! Classful addressing is hopelessly out of date, replaced by Classless InterDomain Routing since 1993. Since the premise of your question is wrong, it’s hard to give you a meaningful answer to your first question.

The answer to your second question is because we are running out of addresses, so a technique called Network Address Translation is used to have multiple devices appear to the Internet as one IP.

There is a lot of good information on CIDR and NAT just a quick Google search away, or you can look at previous questions on this site.

Ron Trunk
  • 68,291
  • 5
  • 66
  • 126