Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ip nat question

Status
Not open for further replies.

alex1312

Programmer
Jun 17, 2002
7
US
hi, if two computers on the same network and using NAT. would the two computers have different ip address when they are on the internet? thanks for any help.
 
Im assuming you are one public ip and your two workstation are on a lan with private ip's. If that is the case both your computer would have the same ip on the internet. They would be seen as your public ip.

Jim

Jim Webber
Network Administrator MCSE CNA
 
thanks for ur reply. if the two computers have the same ip address, then how the packet can distinguish from these computers.
 
Whatever device that is performing NAT, maintains a table of what private ip address make a request to a destination address. When the destination address responds, the NAT device checks its table and forwards the packet to the appropriate private ip.

Jim

Jim Webber
Network Administrator MCSE CNA
 
Think of your NAT device as a proxy for your private network. Lets say Computer A is trying to access a website on the Internet. The first hop is your NAT router. The NAT router enters the request in its table and notes the originator. The NAT router then proxies it's own IP and MAC address to the webserver on the Internet. As far as the webserver knows your router is making the request. It therefore replies to the router. The router then needs to check within its table to see if the reply is for a request made a PC or not. Since the router has a NAT table entry it forwards the reply to Computer A. If there is no NAT table entry or the entry had expired then the packet is dropped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top