Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Networking NAT question?

Hi I'm very confused I know how NAT works and what it is BUT what is the need for subnetting if you have NAT on your router/modem,from what I learned every router for a network(house,college etc) has an IP address and instead of using a unique IP for every device NAT provides IP addresses for that network which could be the same on most other networks,Now whats the point of subnetting when you have NAT? does every device on a network need a unique IP or not if so why bothar with NAT???

Update:

@ GTB yes I know that obviously,but what IP does it use lets say my computer on my LAN has an the IP 192.168.1.4 and my external IP is 54.143.8.3(not my actual IP) how would NAT work? isn't the Idea of NAT to save unique IP addresses,so therefore my router would only have an external IP address of 54.143.8.3 but how would that be the case as only one destination and source address can be the Network layers header.So what IP would it use?

Update 2:

If every computer in my house used the external address 54.143.8.3 which NAT implements,an IP header can only have one destination/source IP address how would the packet get to right right computer?

3 Answers

Relevance
  • 8 years ago
    Favorite Answer

    Great question. NAT works in conjunction with a stateful firewall. Here's the packet flow and what happens. You initiate a connection to a web server out on the internet. Your traffic hits the NAT device and your device NAT's it. Before jumping in too deep let's clear up some terminology. If you have one public IP address assigned to your router and you have multiple LAN hosts what your router is doing is called PAT (port address translation) or NAT Overload. It's called that because multiple LAN hosts are using a single public IP. You're 'overloading' the public IP. So the router will NAT your specific traffic and what it does is change the source IP and source port of the packet. The source IP will be your public IP and the source port will be an ephmeral port (1025-65535). The firewall portion will put that information in it's state table. Return traffic will be checked against the state table and if the TCP session is in there it will be allowed and forwarded to the NAT table where the NAT will be "reversed" and sent to your PC. This happens on every flow traversing a firewall/NAT device. With NAT overload all your LAN IP's share the public address and they key concept is that the source ports are changed so return traffic with the same public IP can determine where to send it on the internal LAN. Hope this makes sense.

  • GTB
    Lv 7
    8 years ago

    Every device on the private side has to have an IP address to route packets to and receive them from the device

  • janzen
    Lv 4
    4 years ago

    nicely i bypass with what the different guy merely suggested. there are particular web content that shop a closer look on the consumer's IP address and different very own stuff. Its greater constructive you upload such web content on your browser's block checklist in case you % to be risk-free.

Still have questions? Get your answers by asking now.