0

I don't understand why ip adresses are divided into network portion and host portion? is the host portion really necessary when we already have NAT?

for example, if ip addresses only have network portion, and I'm running a big company that has 1000 machines, so I can create 1000 private ip addresses, then NAT can associate thoses 1000 private ip addresses with the router internally, so any machine in my complany can be uniquely identified and can access the public internet via router, then why we still need to divde ip addresses into network portion and host portion?

3 Answers3

3

In addition to @Zac67's points: using NAT would make it impossible for all those hosts to expose services on the same TCP or UDP port, since all hosts would be sharing one public IP address. So on your NAT device you can forward port 80 and 443 for HTTP(S) traffic to one specific internal machine. If you have more than one, you'd have to use other port numbers than the well known defaults. Larger networks often have more than one webserver, mailserver, etc that need to be reachable from the outside.

Teun Vink
  • 17,233
  • 6
  • 44
  • 70
1

In addition to the other comments, keep in mind some networks don't even use NAT. The different portions allow you to take one network and create several smaller networks. In your example, with 1000 hosts, in all likelihood, you don't want all these hosts on the same network.

ajc
  • 11
  • 2
0

NAT is (an ugly) workaround that enables privately addressed host to talk to public addresses and vice versa.

Subnetting is a method to split a given address range into subnets for actual use.

You cannot replace subnetting or subnet routing with NAT or the other way around. With 1000 hosts in total, you might have 10 subnets - for servers, clients, wireless, VoIP, iSCSI, management, DMZ, IoT, etc.

How would you use NAT to route in between all subnets? After all, NAT requires distinct networks (or ranges) to translate in between as well.

And IPv6 does away with all that NAT dreck and uses straight routing throughout.

Zac67
  • 84,333
  • 4
  • 69
  • 133