[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hostname of the modem gateway



On Tue, Jan 02, 2018 at 12:12:47AM +0100, Max Power wrote:
> Hi guys,
> with the new release of Debian 'Stretch', the route command has been replaced
> but what other command returns the hostname of the modem/router gateway...?
> # route
> gateway = home.telecomitalia.it
> # ip route
> gateway = 192.168.1.1
> 
> Thanks for reply, Max Power.

http://mywiki.wooledge.org/XyProblem
http://mywiki.wooledge.org/IpAddress

I bet one or both of those will help, in the long run.

Note that the gateway address given by DHCP is available in a variable
that dhclient-enter-hooks scripts can use.  You probably want to get it
that way instead of running "ip route" or "route" or "netstat -r" or
any other command.


Reply to: