how can i find out what is the ip address of the router of my local area network? thank you.

link|improve this question
1  
What Operating system? – Tog Oct 31 '10 at 22:04
my os is mac os x – Mahdi Ijadnazar Oct 31 '10 at 22:26
feedback

2 Answers

Update:

In Terminal.app type

route get default

or

route get default | grep gateway

for more condensed output.

This is the fastest way as pointed out by Daniel. Thanks Dan.

Original Anwser:

There is another way that will take a lot longer:

netstat -r | grep default



The convention is to give the router the first address on the subnet. This means, in most cases, your router's IP address is the same as your IP address except it ends in 1.

For example:

If your IP is 10.0.0.105, then your router's IP is probably 10.0.0.1.
If your IP is 192.168.1.83, then your router's IP is probably 192.168.1.1

link|improve this answer
It should be noted that the router also often is assigned the last IP address in the subnet. For example 192.168.1.254 or 10.0.0.254. For home router's default configurations Jay's addresses are far more likely though. – Tronic Nov 1 '10 at 3:29
1  
What's the difference between this and the faster route get default? – Daniel Beck Nov 1 '10 at 7:55
Also keep in mind that if the LAN you're on has internal DNS that the router's IP may not be shown, but its' hostname. Which you can just give to the host command to get the IP. – SleighBoy Nov 1 '10 at 14:57
@Daniel Beck, The difference is that netstat takes a lot longer :) I updated my answer. +1 for being awesome. – Jay Nov 1 '10 at 16:50
feedback

If you want the local address of the router it's most likely your gateway address. Press the Apple Menu () , got to 'System Preferences', then go to 'Network'. Select any of the items on the left (Ethernet/AirPort) that say connected.

On the right will be a bunch of fields, one of which is 'Router', which is usually 192.168.1.1.

If you want your internet IP address you can just go to http://www.whatsmyip.net/ and it will show you there.

link|improve this answer
you'll have to go into advanced, and click on the TCP/IP tab for the more specific information – Trezoid Oct 31 '10 at 23:32
feedback

Your Answer

 
or
required, but never shown

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