Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rmbrown09

macrumors 6502a
Original poster
Jan 25, 2010
949
1
USA
Well I am not sure what to make of all this, I am connected to the internet via a Airport Extreme, and sites that tell you your IP say

content


But when I run ifconfig | grep "inet" in Terminal, I get this stuff

So what exactly is this telling me??
Thanks

content
 
Your apartment or your office has an internal network where they assign a private ip to your computer. However when your computer talks to the world outside the internal network, the traffic is routed through an external ip address belonging to a gateway or router.

This way, they restrict the amount of unwarranted traffic (spammers, hackers, or you running various services like website/ftp etc).

This is why you have two ip addresses. The internal ip addresses always start with numbers like 192.168 or 10.200 etc.
 
Your apartment or your office has an internal network where they assign a private ip to your computer. However when your computer talks to the world outside the internal network, the traffic is routed through an external ip address belonging to a gateway or router.

This way, they restrict the amount of unwarranted traffic (spammers, hackers, or you running various services like website/ftp etc).

This is why you have two ip addresses. The internal ip addresses always start with numbers like 192.168 or 10.200 etc.

Ah I see, so the one that is 127.whatever is my external
and then there are 4 different ones with the 192..... 2 are netmask and 2 are broadcast. Plus there is the 10..

Plus why does it seem the external is different than what the websites tell me?? is that a different address too? I was thinking the external is basically the IP of the router?
 
Research 'NAT'

By just giving the router an IP address, you can use 1 IP address to connect many, many computers to the Internet. It is a much better way to get computers onto the Internet, as there are a limited amount of IP addresses. You're basically sharing the external IP address with the other computers.

It's not perfect, because you have to do tricks if you want to run a server on that external IP address. But for just surfing the Internet, it works great.
 
To put it simple. Your router ( airport ) is a DHCP server that uses NAT. Network Address Translation. It allows the external IP ( The real one that is seen on the internet and is assigned to your modem by your ISP ) to translate it to a loop-back address ( the 10.*,192.* ). This allows you to see the internet from behind a DHCP server and translates the IP from an external one to an internal one. Or called a loop-back IP.

A loop-back address is for LAN ( local area networks ) only.

So when you go to the real internet a website ( normally ) sees the address of your Cable,DSL modem.

Is that confusing enough ? :)
 
To put it simple. Your router ( airport ) is a DHCP server that uses NAT. Network Address Translation. It allows the external IP ( The real one that is seen on the internet and is assigned to your modem by your ISP ) to translate it to a loop-back address ( the 10.*,192.* ). This allows you to see the internet from behind a DHCP server and translates the IP from an external one to an internal one. Or called a loop-back IP.

A loop-back address is for LAN ( local area networks ) only.

So when you go to the real internet a website ( normally ) sees the address of your Cable,DSL modem.

Is that confusing enough ? :)

I see ( I think)
Router flips me a different IP, along with everyone else on it. But we all broadcast the same thing? there are probably about 37 macs on this airport. (and about 5 phones)

last Q,
so my external..does the airport change that and that is what the websites see...


so

Internal<External<Airport or...
 
The router assigns every device on the local network an internal IP.

The modem is assigned an external IP from your ISP.

Person A doesn't see what person B sees because they are assigned a different IP.

The person with admin rights on the Airport can look at the config logs and see what IP other devices on the router are at.
 
I drew up a quick diagram:

2zxvwop.gif


As far as the rest of the internet is concerned, any computer coming from the internal network is seen as the external IP address of the Airport (which is the Cable/DSL router in the diagram)
 
I drew up a quick diagram:

2zxvwop.gif


As far as the rest of the internet is concerned, any computer coming from the internal network is seen as the external IP address of the Airport (which is the Cable/DSL router in the diagram)

Awesome thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.