Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i am connected to the internet through a LAN. When I see my IP in Windows 7 when using netstat -a, my IP is 172.19..., but when I used Linux (Ubuntu), for just checking a host name by nslookup, there was my server address which was 192.168....

Why is my IP different in netstat and nslookup?

share|improve this question
    
@iglvzx...i respect your zest to close a duplicate question(nice work )...but i don't think this question is anywhere near the question you suggested...if you look at both of my ip addresses,they are both private(172.16.0.0 – 172.31.255.255 and 192.168.0.0 – 192.168.255.255 )...so there is no question of any IP being of the router...plz comment and clear my doubt as answers have been disabled –  avinash Dec 30 '11 at 14:40
    
Ah. My bad. Thanks for clarifying... Are Windows and Ubuntu on the same machine? Dual-boot? Virtualized? It is possible that Ubuntu is set up to use NAT. –  iglvzx Dec 30 '11 at 16:31
    
Also, note that nslookup is for querying the DNS servers. –  iglvzx Dec 30 '11 at 16:35
add comment

1 Answer

VMs use private internal addressing and NAT to function, mapping these to the actual underlying hardware address of the host machine. This is normal, expected behavior of a virtualized instance.

share|improve this answer
    
@gmari...so in actuality the nat of lan provides me which ip? –  avinash Dec 30 '11 at 17:56
    
I don't understand your question. –  Garrett Dec 30 '11 at 18:01
    
@avinash: each operating system (VM host Windows and VM guest Linux) is on a separate LAN, one LAN is virtual. If so configured, NAT translates the guest's IP-address to that of the host for communicating through the physical LAN. –  RedGrittyBrick Dec 30 '11 at 18:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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