8
7
I SSH into a remote host 194.199.68.165
and then use traceroute to check paths to 132.227.62.122
, and I notice that there are some private IPs, like 10.230.10.1
bash-4.0# traceroute -T 132.227.62.122
traceroute to 132.227.62.122 (132.227.62.122), 30 hops max, 60 byte packets
1 194.199.68.161 (194.199.68.161) 1.103 ms 1.107 ms 1.097 ms
2 sw-ptu.univ.run (10.230.10.1) 1.535 ms 1.625 ms 2.172 ms
3 sw-univ-gazelle.univ.run (10.10.20.1) 6.891 ms 6.937 ms 6.927 ms
4 10.10.5.6 (10.10.5.6) 1.544 ms 1.517 ms 1.518 ms
5 194.167.142.22 (194.167.142.22) 2.993 ms 2.985 ms 2.976 ms
why there are private addresses near the host?
what are the purposes that these private addresses are used? I mean why they want to put the public IP behind private IPs?
thanks!
but why the public IP is behind the private IP? – misteryes – 2013-06-25T14:41:48.243
1because ISPs have huge networks, and if they didn;t use private IPs internally, we would have run out of them decades ago. as you move through the ISP inter-network, you are jumping from router to router, and each of those should be included in your trace. you have to exit your ISPs network, pass onto another ISPs network, through it, and eventually on to the destination. you will probably have more private hops than public ones in most cases. from your perspective they are 'behind' but from their perspective, the public address is 'in front'. leave one network, and enter another. – Frank Thomas – 2013-06-25T16:53:31.317
I thought private IPs are usually used for NATed home network, or LAN inside organizations/companies, and they are behind a public IP. you meant there are routers with private IP addresses? are there many routers with private IP addresses? is it common? are there any articles about this? – misteryes – 2013-06-25T19:41:31.133
how would you subnet a 10.0.0.0 network without routers that could route between 10.1.0.0/16 and 10.2.0.0/16 ? you are inside someones network. the gateways in and out of their network use public IPs but the routers inside it likely use private addresses. why would a school campus pay for public IPs when they can use as many privates as they want for free? your traceroute is tracing the communication from end to end, even when you are inside someones (and ISPs) private network. – Frank Thomas – 2013-06-25T20:09:17.517
maybe my description is a bit vague. I have updated it. The remote host is with a public IP, not a private IP. And the first hop from is is also a public IP. Then the second and third hops are with private IPs. – misteryes – 2013-06-25T21:12:31.193