5
4
I am looking for the address that I type into my browser to get to the router configuration file. It ended up being 192.168.1.1, as usual. But when I enter ifconfig into the command line, this IP address is not listed anywhere.
Why is this? Shouldn't ifconfig give me the IP address of the router?
If the router IP address were something else instead of 192.168.1.1, how would I find out what it is?
2
ifconfig
only displays information about local interfaces. The IP address of your gateway is part of the gateway's local interface information. – Larssend – 2015-06-30T11:26:02.9501i think the easiest way to find the router IP is to use
traceroute 8.8.8.8
- first one on the list will be your router's ip address. If this does not work it will also tell you that you do not have a valid connection established with router. (I'm ommiting situation when your router is blocking ICMP traffic on LAN which is rare configuration). – mnmnc – 2015-06-30T11:34:51.1871@geewee bertieb commented and it should be put here too. (to the point that the public IP wont' be shown there). "OP's question asks about configuration page and mentions a private subnet IP, so the assumption is that he is looking for the LAN interface IP. The router's IPs - WAN or LAN - are not shown by a client ifconfig, hence the enquiry" - bertieb – barlop – 2015-06-30T14:31:31.717
@barlop: doesn't change the fact that the router's interface isn't local to the PC/host, hence beyond the scope of
ifconfig
. – Larssend – 2015-06-30T17:09:06.320@geewee well, one of the router's interfaces is local, one isn't. He's referring to the private/local one though – barlop – 2015-06-30T17:36:13.573
Thanks for reposting that here @geewee, it made more sense in the context of the answer it was attached to. I think there is some confusion over "local" in the sense of 'to a machine' (as barlop means) and "local" in the sense of 'within a LAN'. I think OP is confused about output as ifconfig lists things additional things like broadcast address and subnet mask. Worth knowing about the routing table anyway! – bertieb – 2015-06-30T18:17:12.007
Well I mixed up @barlop and geewee in that comment! – bertieb – 2015-06-30T20:23:31.733
@barlop: you don't understand what is meant by 'local interface'. That's why you get confused. It has nothing to do with private/public interface. – Larssend – 2015-06-30T22:27:10.217
@geewee I see you didn't mean The interface that is on the same subnet as the computer. and you meant the strict definition of local - The interface that is part of the computer. I didn't realise ifconfig was so <ccough> that it doesn't show the default gateway only the local interfaces. I guess I bought too much into the claim often made by users of linux and windows, that ifconfig is the linux alternative to ipconfig(ipconfig of course does show both IPs of local interfaces and the IP of the default gateway) – barlop – 2015-06-30T22:56:40.433