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

Re: missing gw in route -n



Yeah, I wasn't saying anything because I couldn't remember. I think Debian puts it there. Try the interfaces man page.

There's also a route command. Maybe iproute too.  Something like
route add 192.168.43.1 gw
(or gateway or default instead of gw).

On a command line. There's a routing table, and a way to show what's in it and clear it. See the route man page.

DHCP takes care of that so I forgot. I used to have to change my laptop over everytime I took it somewhere with DHCP and change it back when I got home. But that was OpenBSD too.  And 10 years ago.

Just interfaces should work, that's what I use. It checks both.


Sent from my Motorola XT1527i

On Jul 12, 2018 7:30 AM, "Christian Knoke" <chrisk@cknoke.de> wrote:
Gene Haskett schrieb am 12. Jul um 00:13 Uhr:


> I have been playing the 10k monkeys scene trying to figure out how to add
> a gateway entry to the route -n report on a rock64 with a stretch/xfce
> install on it.

> The obvious (to me that is) place would be
> in /etc/network/interfaces.d/eth0, which has this:
>
> auto eth0
> allow-hotplug eth0
> iface eth0 inet static
> address 192.168.71.2
> netmask 255.255.255.0
> gateway 192.168.71.1
> dns-nameserver 192.168.71.1
>
> But that is ignored.

In /etc/network/interfaces you need an uncommented line like

# source /etc/network/interfaces.d/*

$ ifconfig

might tell you that the interface's name has been changed to something
different.

Maybe the network-manager is active?


Christian

--
***   Christian Knoke  *  25541 Brunsbüttel  *  http://cknoke.de   ***
...                                                                ...
   The prejudices people feel about each other disappear when they
get to know each other.   -- Kirk, "Elaan of Troyius", stardate 4372.5



Reply to: