ifconfig - does it look beyond its subnet?
Posted on 2004-10-13
When I plug my linux box directly into the cable modem, among other info, "ifconfig" returns the address assigned to me via DHCP by the ISP.
When Im plugged into a router and then to the cable modem, "ifconfig" returns the local subnet ip (192.168.0.5 in my case).
Is there a command other than ifconfig that can return my cable modem's ip address from a linux box thats behind a router? I want to script my box to monitor the ip address then do something when it changes... it seems that unless Im plugged directly into the cable modem, there is no way to find out that info.. even traceroute to an outside address seems to start at the gateway.