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.

So I have two IP addresses - one is on my network settings and is 192.168.0.X. Another one - I checked this address online - is 108.X.X.X. What's the difference between these two IP addresses? Does it have something to do with local vs internet IP addresses? Can someone please explain these two concepts?

share|improve this question

migrated from stackoverflow.com Sep 26 '12 at 3:13

This question came from our site for professional and enthusiast programmers.

add comment

4 Answers

up vote 3 down vote accepted

The 108.x.x.x is the IP address that the rest of the internet sees. The 192.168.0.x is the internal IP assigned to a particular host in your own network, typically from your router.

Lets say you have 5 computers all on one router. When they connect to the internet, they all look like 108.x.x.x.

When the server responds, and returns the message to the router, the router determines which internal IP that the message was intended for. This is called Network address translation

share|improve this answer
    
so the internal address is the address that goes 192.168.0.0 and then 192.168.0.1 for the next machine hooked up, etc, while the public IP address remains the same for ALL machines connected in a network? –  Macosx Iam Sep 26 '12 at 0:51
    
Actually 192.168.0.0 is not a valid IP. Usually, 192.168.0.1 is reserved for the router's internal IP. Anything after that, up to 254, is fair game :) Do not choose any addresses that end with ".0" or ".255" - these addresses are generally reserved for use by network protocols. You may want to read up on subnets for a better understanding of the topic –  Tadgh Sep 26 '12 at 0:57
    
@MacosxIam 192.168.0.0 would be the network address itself. The first used IP address would be .1 (often for the router itself). The public IP address would be the same for all machines on that network IF they all use that NAT router to route their traffic to the external network (usually the case). –  Bruno Sep 26 '12 at 0:58
    
so the last three digits are assigned randomly, correct? It's not like one machine is .2, the next is .3, then .4? –  Macosx Iam Sep 26 '12 at 0:59
    
You can choose to set them statically, however most routers do random assignment, at least in my experience. I'm sure you can find one that works sequentially, I just don't see the advantage for a home network. –  Tadgh Sep 26 '12 at 1:01
show 4 more comments

192.168.** is an IP assigned to the machine from a Router.

108.* is an external IP.

See http://en.wikipedia.org/wiki/Domain_Name_System

share|improve this answer
    
That's a bit misleading. Whether an IP address is public or private has nothing to do with the fact it's assigned by a router (or its DHCP server, to be precise). Some DHCP servers (or routers if they're on the same box) can assign public IP addresses to some devices (typically done by ISPs). In addition, this has nothing to do with DNS. –  Bruno Sep 26 '12 at 0:52
add comment

You are correct, one is your local IP address(assigned to you by your router) and one is your public Internet IP address (Actually the IP Address of your router).

You internet service provider(ISP) assigns your router the 108.x.x.x IP address and that is how all computers connected (either wired or wirelessly) to your router connect to the internet. All of your traffic goes through your router before going to the internet and vice versa. Your router assigns all the devices connected to it an internal IP address(192.16.8.0.x) and handles routing all traffic to the computer it needs to go to (which is where it gets its name from).

share|improve this answer
add comment

192.168.x.x is an IP address used on a private network. There are 3 reserved ranges of addresses for private networks, and this is one of them (there are other reserved ranges for other purposes). These IP addresses are meant not to be routed directly outside a local network (e.g. within the home/institution).

108.x.x.x would be a public IP address, routable from anywhere on the public internet.

Most modern routers that are in between the internet and a private network can convert the traffic from an private IP address (and vice versa) using Network Address Translation (NAT). Other methods for being able to access machines outside a private network include using a proxy server with an interface on both networks.

share|improve this answer
    
Also, as I understand, there are three classes for private networks (A,B and C). But then what did the CDIR do (which got rid of those classes)? –  Macosx Iam Sep 26 '12 at 0:56
    
The classes themselves are not really relevant, except if you have a larger networks to administer (or if you need to make multiple private networks co-exist via VPNs for example). You can choose to use what you like for a private network, but few people need 16 million addresses, even on a corporate LAN. It's handy if some of your machines need to be on multiple networks, e.g. 192.168.0.0/24 for your normal LAN and 10.0.0.0/xx for multiple VMs on the same machine. –  Bruno Sep 26 '12 at 1:02
    
wait, I thought networks usually signify the 10.x.x, and the last eight bits (reading from left to right) are reserved for hosts. –  Macosx Iam Sep 26 '12 at 1:12
1  
What's after the slash defines the number of bits that define the network range. For example, using 192.168.0.0/24, you keep 24 bits (so the first 3 numbers), so the addresses are from 192.168.0.0 to 192.168.0.255 (although those two addresses at the end are not used for machines: one is the network address, the other is the broadcast address). Although the entire 10.0.0.0/8 range is reserved for private networks as a whole, as a network admin, you can choose to sub-divide it for your internal routers, e.g. 10.0.1.0/24 for the accounting department, and 10.0.2.0/24 for another dept –  Bruno Sep 26 '12 at 1:22
add comment

Your Answer

 
discard

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