5

I know the basics of NAT technique and public/private IP addressing but I still have one conflict. Let's say that my private address is 192.168.1.2 and my public one is 180.180.1.2. If I ping 180.180.1.2 from my machine what I'm really pinging ?, If it the isp router interface does it means that when I ping a random website, I'm not pinging the server itself but the router before him from the ISP perspective ?

please advice

3

good question
you need to take care of the next ,
1- ISP will give you range of real IPs may this range is 2 IPs only , based on you example , ISP may assign you range of public IPs with 2 IPs (you 180.180.1.2/30 and GW 180.180.1.1/30) , so the IP may you need to NAT to is 180.180.1.2
2- you don't need NAT to ping any website , just routing

enter image description here

to ping www.website_1.com you just need default route on R1 to 180.180.1.1,but if you need to access www.website_1.com (HTTP,HTTPS....etc) you sure will need to NAT on R1
3- as i told you before ISP can give you range of public IPs you can assign one of them to the website server by doing static NATing which is called publishing ,so when you ping this server from any PC in the global this real ip will reply your ping

try to ping any website from your PC ,the real IP of this website will reply you. to check the real ips assigned to any website use nslookup under the CMD

  • It all makes sense now after putting all the scattered pieces together, thanks a lot. – storm Sep 27 '15 at 17:11
2

When you 180.180.1.2, you are actually pinging the outside interface of your router, which connects to your ISP. The inside interface is sitting on the 192.168.1.0/24 network, and in this case it probably is the .1 ip!

Now when you ping a random website, you are actually pinging the web server itself that hosts your site.

1

Like the answer to so many things in networking, it depends.

When you ping your public address, with residential or small business, it is probably a router at your home or office that sits between your network and the ISP.

When you ping a server at a large Internet site, in theory, you are pinging the server directly, but, in reality, you are probably pinging an address used by a load balancer sitting in front of a bunch of servers since one server couldn't keep up.

The difference is that a residential or small business probably doesn't have more than the one public IP address assigned by the ISP. A larger enterprise can afford to have a much larger public IP address range.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.