How can I find the IP address of my router?

12,518

Solution 1

It could be that your router is set to a different IP address, Assuming you are connected to the router you can find the IP by opening a terminal and typing the below command and looking for the Gateway that relates to the destination 0.0.0.0

route -n

Example

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    600    0        0 wlp2s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp2s0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp2s0
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 vboxnet

You can see in this example my routers IP address is 192.168.1.1

Solution 2

I addition to the answer of @stedotmartin, you can get the address fully automated with the following expression:

route -n | grep "^0.0.0.0" | cut -d ' ' -f 10

This only outputs the internal address of your router, like

192.168.1.1

in the above example.

Solution 3

Many routers follow the default IP address. Try following:

192.168.1.0 192.168.0.1

If you still cannot get into your router and you have working internet connection you can copy your public/external IP address from http://whatismyip.live and paste in your browser this will open your router settings directly. So visiting your own public IP address is also your router address. This method works fine for me on TP-link router.

Share:
12,518
Deepesh Meena
Author by

Deepesh Meena

HI, I am Deepesh. I graduated from Indian Institute of Technology Bombay in 2020. I was very active on this site in 2017 but nowadays I am not much active here. Contact information is given below.

Updated on September 18, 2022

Comments

  • Deepesh Meena
    Deepesh Meena over 1 year

    I have read 4-5 articles about it they all tell almost same steps to reset a password of my router. They tend to start with an instruction along the following lines at which I'm stuck already:

    Open a browser and enter the IP-Address mentioned on the back of the router. save the new password.

    Now when I enter 192.168.0.1 in my browser It says the site can not be reached. I also tried it with http://192.168.0.1 but no luck it says the same thing

    Question: Does anyone know what is the problem? Why can't I change the password of my WiFi? Is this an Ubuntu-specific problem but I don't think so I think it is browser-specific or IP-specific problem The problem is either with the IP address or the browser, more chances of an IP-specific problem.

    I am using Google Chrome browser on Ubuntu 16.04.

    • Rainer Blome
      Rainer Blome over 5 years
      Deepesh, as you know, this site is specifically for Ubuntu-related questions. A good site for your question would be superuser.com. For an overview of the Stackexchange sites, see stackexchange.com/sites# , which prominently shows SuperUser as the second-biggest one.
    • Deepesh Meena
      Deepesh Meena over 5 years
      Of course, I know this site is for Ubuntu specific problems thanks for suggesting superuser.com you should vote to migrate it to that site and I request other to do so instead of downvoting or closing it
  • Deepesh Meena
    Deepesh Meena over 5 years
    Ok that worked I was looking for the same That how can I know the changed IP of my router meanwhile you answered it thanks