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.

Some body gave me ip 10.120.5x.14x, someone else gave me 12.1.7.x someone else also gave me like 164.x.x.x or 81.x.x.x.

Its very confusing sometimes was it WAN or LAN class IP's. So how can i use some fixed linux tools to directly check it out, to make sure its WAN IPv4 or LAN IPv4?

$ ipcalculator 10.120.5.1/24
Address:   10.120.5.1           00001010.01111000.00000101. 00000001
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   10.120.5.0/24        00001010.01111000.00000101. 00000000
HostMin:   10.120.5.1           00001010.01111000.00000101. 00000001
HostMax:   10.120.5.254         00001010.01111000.00000101. 11111110
Broadcast: 10.120.5.255         00001010.01111000.00000101. 11111111
Hosts/Net: 254                   Class A, Private Internet
share|improve this question

1 Answer 1

up vote 6 down vote accepted

There are 3 IP ranges that have been agreed upon to be used for private addresses (that is, what you call a LAN). See also this wikipedia article. The three ranges are fairly easy to remember or at least recognize (look at the bolded number), although I am not aware of a specific tool for that.:

  • 10.0.0.0 – 10.255.255.255
  • 172.16.0.0 – 172.31.255.255
  • 192.168.0.0 – 192.168.255.255

So, from the addresses you mentioned in your question, only the first one is a LAN address.

However, note that the difference between WAN and LAN is more or less conceptual. A LAN could use any IP address it wants, although in most cases that wouldn't be a good idea.

Edit: Based on the comment below ('I want to ask my Linux, tell me, what is the ip really.') I think I now understand the real question better. I think the poster wants to have an easy tool to remind him of his external ('Internet') IP address.

share|improve this answer
    
Almost all of 169.254/16 (in particular, 169.254.1.0 through 169.254.254.255) are private addresses as well -- used for link-local addressing. –  grawity Sep 23 '11 at 12:52
    
Thanks see above my post, that tools is the only one? –  YumYumYum Sep 23 '11 at 12:53
    
I want to ask my Linux, tell me, what is the ip really. (sometimes i forget those and want to be very sure before i tell). –  YumYumYum Sep 23 '11 at 12:53
    
The IP ranges are fixed, so it's might just be simpler to write it in a post-it note and stick it somewhere visible :) –  Jin Sep 23 '11 at 13:01

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.