Web lists-archives.com

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 =
> Thanks for reply, Max Power.


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.