Discussion:
missing gw in route -n
Gene Heskett
2018-07-12 04:13:02 UTC
Permalink
Greetings;

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.

Where does this assignment belong in a static defined eth0 configuration?

I know several places where it doesn't work, but what I need to know is
where do I put, in what file, the "gateway = www.xxx.yyy.zzz" and make
it just work for a stretch install on a rock64. Thats an arm64 family
card.

All I have been able to get out of route is the gibberishy help when
there is a syntax error.

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.

Help please.

Thanks.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Christian Knoke
2018-07-12 11:22:03 UTC
Permalink
Post by Gene Heskett
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
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
Alan Corey
2018-07-12 12:50:26 UTC
Permalink
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
Post by Gene Heskett
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
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
Gene Heskett
2018-07-12 14:18:23 UTC
Permalink
Post by Alan Corey
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.
Here its not, and because I can't get a gateway assigned, I can't even
update it, it cannot get past my router and out on the net. And I just
discovered that I can't even change eth0's address by
editing /etc/interfaces.d/eth0 and restarting the networking with the
service command.

Thanks Alan. I'm going to go lose another pint of blood, removing and
reinstalling the rusty mower deck on my old john deere, required to
change the decks drive belt. I found out yesterday the book spec for the
belt is at least 5" too long. So I have to do it all over again today.
I think I'll send john deere an invoice for a pint of blood.
Post by Alan Corey
Sent from my Motorola XT1527i
Post by Gene Heskett
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
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
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Gene Heskett
2018-07-12 14:07:29 UTC
Permalink
Post by Christian Knoke
Post by Gene Heskett
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
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
Just purged it, still no change
I've even changed the eth0 devices address, but once I have the hosts
file matching, and logged back in, no route is assigned.

as root, route -n returns:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 202 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 202 0 0 eth0
192.168.71.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

/etc/resolv.conf is a real file, and contains:
nameserver 192.168.71.1
search hosts,dns
domain coyote.den

I've even changed the "dns" above to "nameserver", no diff on a
networking restart.

And I'm at the end of my wits. Not only that, and despite the eth0
address change, restarting the network does not change it. ifconfig says
its still at the old address:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.71.2 netmask 255.255.255.0 broadcast 192.168.71.255
ether 3e:1b:98:17:e3:8c txqueuelen 1000 (Ethernet)
RX packets 2952 bytes 349284 (341.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2414 bytes 213883 (208.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 40

So its, even with nm purged, inventing its own data, and I cannot change
it. WTH? Where is the cache that is overriding me?

Thanks Christian.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Christian Knoke
2018-07-12 18:16:43 UTC
Permalink
Hello,
Post by Gene Heskett
Post by Gene Heskett
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
I've even changed the eth0 devices address, but once I have the hosts
file matching, and logged back in, no route is assigned.
so

any dhcp server in the neighborhood?

pls check syntax again in interfaces and interfaces.d/*

can you ping the gateway?

remove allow-hotplug eth0 directive

check route with: ip route

see what happens when you do ifdown -a and ifup -a

hth
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
Gene Heskett
2018-07-12 20:57:57 UTC
Permalink
Post by Christian Knoke
Hello,
Post by Gene Heskett
Post by Gene Heskett
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
I've even changed the eth0 devices address, but once I have the
hosts file matching, and logged back in, no route is assigned.
so
any dhcp server in the neighborhood?
pls check syntax again in interfaces and interfaces.d/*
can you ping the gateway?
yes, in a small fraction of a millisecond.
Post by Christian Knoke
remove allow-hotplug eth0 directive
check route with: ip route
see what happens when you do ifdown -a and ifup -a
This:
***@rock64:~# ifdown -a;sleep 5;ifup -a
RTNETLINK answers: No such process
***@rock64:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 202 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 202 0 0 eth0
192.168.71.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
***@rock64:~# ip route
default dev eth0 proto kernel scope link metric 202
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.216.102 metric 202
192.168.71.0/24 dev eth0 proto kernel scope link src 192.168.71.2
Post by Christian Knoke
hth
Not yet. If I can't fix this tomorrow, I'll write another sd card with the original
files. It worked until an update 2 or 3 weeks ago.
Post by Christian Knoke
Christian
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Christian Knoke
2018-07-12 22:04:54 UTC
Permalink
Post by Christian Knoke
hth
Not yet. If I can't fix this tomorrow, I'll write another sd card with
the original files. It worked until an update 2 or 3 weeks ago.
Sorry that I ask again, but can you please check whether your (static,ipv4)
config is typed in correctly? Esp. no other config interferes like in
/e/n/i AND in /e/n/i.d/* ? I usually put everything in interfaces and remove
the source ... line in that file.

RTNETLINK answers: No such process can mean, you're trying to set up a
*wrong* gateway address.

https://serverfault.com/questions/437598/what-can-cause-rtnetlink-answers-no-such-process-when-adding-a-route
Post by Christian Knoke
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
Gene Heskett
2018-07-13 01:52:13 UTC
Permalink
Post by Christian Knoke
Post by Christian Knoke
hth
Not yet. If I can't fix this tomorrow, I'll write another sd card
with the original files. It worked until an update 2 or 3 weeks
ago.
Sorry that I ask again, but can you please check whether your
(static,ipv4) config is typed in correctly? Esp. no other config
interferes like in /e/n/i AND in /e/n/i.d/* ? I usually put everything
in interfaces and remove the source ... line in that file.
RTNETLINK answers: No such process can mean, you're trying to set up a
*wrong* gateway address.
But the gateway IS the router. By way of 8 port switches, all these machines are 1 or 2 switches away from the router. A route -n
from this machine, running wheezy yet:
***@coyote:/etc# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.71.1 0.0.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
192.168.71.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

And every other machine on this network will answer the same. Even a
pi 3b running jessie:
***@picnc:~ $ sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.71.1 0.0.0.0 UG 0 0 0 eth0
192.168.71.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
except avahi has been disabled on that install.
another machine:
***@GO704:~$ sudo route -n
[sudo] password for gene:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.71.1 0.0.0.0 UG 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
192.168.71.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

I've already posted /e/n/i.d/eth0, but here it is again:
***@rock64:~# cd /etc/network/interfaces.d
***@rock64:/etc/network/interfaces.d# cat eth0
auto eth0

iface eth0 inet static
address 192.168.71.11
netmask 255.255.255.0
gateway 192.168.71.1

Thats a direct copy/paste, so whats wrong with that. Other than the fact
that its been rebooted twice since the address was changed from
192.168.71.2 to the 11 you see above, but ifconfig still says its on
71.2 right now. So where the heck is it getting the .2 address.

Something in a recent (3-4 weeks past) update broke it, is the only conclusion
I can come to. The only clue I might have is /var/cache/apt/archives/partial,
which is empty but carry's a Jun 11 date when it was last touched. So
presumably something was updated then that didn't effect it till it was
rebooted again, at which point I lost access to the outside world.
Post by Christian Knoke
https://serverfault.com/questions/437598/what-can-cause-rtnetlink-answ
ers-no-such-process-when-adding-a-route
This doesn't actually describe what I am seeing.
Post by Christian Knoke
Post by Christian Knoke
Christian
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Christopher Barry
2018-07-13 03:36:13 UTC
Permalink
On Thu, 12 Jul 2018 21:52:13 -0400
hth
Not yet. If I can't fix this tomorrow, I'll write another sd card
...snip

follow the below 5 steps for help solving this.

1.) highlight/copy from the NEXT line down to the line '# EOF'
#!/bin/bash
# untested, there may be bugs, ymmv

which ip || {
echo "run 'sudo apt-get install iproute2' for needed tools"
exit 1
}
$0.out
function out() {
echo -e "\n#### running: ${@} ####\n"; $@ | tee -a $0.out
}

out ip a
out ip l
out ip r
out ps ax
out cat /etc/resolv.conf

for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done

echo "data saved to $0.out"

# EOF

2.) paste/save that into a new text file named ck-ifaces

3.) then in terminal as root, run:

***@box:~# sh /path/to/ck-ifaces

4.) post 'contents' of ck-ifaces.out to pastebin.com (not here on list)

5.) post 'link' to your pastbin data here
--
Regards,
Christopher Barry
Gene Heskett
2018-07-13 07:53:03 UTC
Permalink
Post by Christopher Barry
On Thu, 12 Jul 2018 21:52:13 -0400
hth
Not yet. If I can't fix this tomorrow, I'll write another sd card
...snip
follow the below 5 steps for help solving this.
1.) highlight/copy from the NEXT line down to the line '# EOF'
#!/bin/bash
# untested, there may be bugs, ymmv
which ip || {
echo "run 'sudo apt-get install iproute2' for needed tools"
exit 1
}
$0.out
function out() {
}
out ip a
out ip l
out ip r
out ps ax
out cat /etc/resolv.conf
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
echo "data saved to $0.out"
# EOF
2.) paste/save that into a new text file named ck-ifaces
***@rock64:~# sh check-ifaces
/sbin/ip
check-ifaces: 11: check-ifaces: Syntax error: "(" unexpected

And the check-ifaces.out is an empty file.

using bash to run it does make a lengthy file, but also reports in the
terminal:
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
check-ifaces: line 22: file: command not found
data saved to check-ifaces.out

link: (one day life)
<https://pastebin.com/p6szHtfT>
Post by Christopher Barry
4.) post 'contents' of ck-ifaces.out to pastebin.com (not here on list)
5.) post 'link' to your pastbin data here
Thanks.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Christian Knoke
2018-07-13 09:02:26 UTC
Permalink
Post by Gene Heskett
Post by Christopher Barry
follow the below 5 steps for help solving this.
[...]
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
[...]
using bash to run it does make a lengthy file, but also reports in the
check-ifaces: line 22: file: command not found
Please install the "file" package and run again.

Christian
--
*** Christian Knoke * 25541 Brunsbüttel * http://cknoke.de ***
John Paul Adrian Glaubitz
2018-07-13 09:11:29 UTC
Permalink
Post by Christian Knoke
Post by Gene Heskett
Post by Christopher Barry
follow the below 5 steps for help solving this.
[...]
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
[...]
using bash to run it does make a lengthy file, but also reports in the
check-ifaces: line 22: file: command not found
Please install the "file" package and run again.
Or, alternatively: Set up systemd-networkd and systemd-resolved and don't
waste endless amounts of time and energy to get this mess fixed which is
bash-script-based network initialization.
Post by Christian Knoke
https://wiki.archlinux.org/index.php/systemd-networkd
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
John Paul Adrian Glaubitz
2018-07-13 11:59:36 UTC
Permalink
Post by John Paul Adrian Glaubitz
Or, alternatively: Set up systemd-networkd and systemd-resolved and don't
waste endless amounts of time and energy to get this mess fixed which is
bash-script-based network initialization.
..which is something that those of us who are investing significant resources into
complex routing and firewalling intend- for the moment at least- to stick with, to
the extent of migrating to a different distro if necessary.
If you need a long discussion over multiple days to get this sorted out, it might
be a good indicator that the current solution isn't probably the best one.
If- as you appear to be saying- Debian is knowingly shipping stuff in a broken
state then my only response can be that we've got enough problems of our own
without trying to fix yours.
Debian isn't shipping stuff that is broken. The default network configuration works
just fine, either with NetworkManager or systemd-networkd. Both of these solutions
also support complex routing and firewalling setups.

The problem here are hacky bash scripts which are racy, prone to various bugs
and they usually break once you make the slightest configuration change. The
whole concept is just outdated and the software often not really maintained
upstream anymore.

If you have an embedded board, server, container or virtual machine which runs
headless, I don't see any compelling argument to not use systemd-networkd. I have
switched my buildds to it and I never looked back. It just works(TM).

Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - ***@debian.org
`. `' Freie Universitaet Berlin - ***@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Gene Heskett
2018-07-13 13:28:45 UTC
Permalink
Post by John Paul Adrian Glaubitz
Post by Christian Knoke
Post by Gene Heskett
Post by Christopher Barry
follow the below 5 steps for help solving this.
[...]
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
[...]
using bash to run it does make a lengthy file, but also reports in
check-ifaces: line 22: file: command not found
Please install the "file" package and run again.
Or, alternatively: Set up systemd-networkd and systemd-resolved and
don't waste endless amounts of time and energy to get this mess fixed
which is bash-script-based network initialization.
Post by Christian Knoke
https://wiki.archlinux.org/index.php/systemd-networkd
This looks like a lot of work, and again would require some systemd stuff
to be installed. But we're back to square one in that without a working
gateway, I cannot access the net to download and install the stuff.

I finally got the eth0 address changed but had to reboot:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.71.11 netmask 255.255.255.0 broadcast
192.168.71.255
ether 3e:1b:98:17:e3:8c txqueuelen 1000 (Ethernet)
RX packets 758 bytes 102329 (99.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1031 bytes 82076 (80.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 40

but that did not get me a gateway in the route -n report
this is the current /e/n/interfaces file

doing this:
***@rock64: route add gw 192.168.71.1 eth0
gw: No address associated with name

And I have a login shell I cannot copy to paste from. ikill it, open a
new tab on konsole and it works again.

Is there anything wrong with the route statement I used?
Thanks Adrian.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Alan Corey
2018-07-13 13:33:21 UTC
Permalink
If it's taking gw as an address something's in the wrong field.

Sent from my Motorola XT1527
Post by Gene Heskett
Post by John Paul Adrian Glaubitz
Post by Christian Knoke
Post by Gene Heskett
Post by Christopher Barry
follow the below 5 steps for help solving this.
[...]
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
[...]
using bash to run it does make a lengthy file, but also reports in
check-ifaces: line 22: file: command not found
Please install the "file" package and run again.
Or, alternatively: Set up systemd-networkd and systemd-resolved and
don't waste endless amounts of time and energy to get this mess fixed
which is bash-script-based network initialization.
Post by Christian Knoke
https://wiki.archlinux.org/index.php/systemd-networkd
This looks like a lot of work, and again would require some systemd stuff
to be installed. But we're back to square one in that without a working
gateway, I cannot access the net to download and install the stuff.
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.71.11 netmask 255.255.255.0 broadcast
192.168.71.255
ether 3e:1b:98:17:e3:8c txqueuelen 1000 (Ethernet)
RX packets 758 bytes 102329 (99.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1031 bytes 82076 (80.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 40
but that did not get me a gateway in the route -n report
this is the current /e/n/interfaces file
gw: No address associated with name
And I have a login shell I cannot copy to paste from. ikill it, open a
new tab on konsole and it works again.
Is there anything wrong with the route statement I used?
Thanks Adrian.
--
Cheers, Gene Heskett
--
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Gene Heskett
2018-07-13 09:32:22 UTC
Permalink
Post by Christian Knoke
Post by Gene Heskett
Post by Christopher Barry
follow the below 5 steps for help solving this.
[...]
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
[...]
using bash to run it does make a lengthy file, but also reports in
check-ifaces: line 22: file: command not found
Please install the "file" package and run again.
How do I do that without access to the net? Interesting question I think.

But now, I've nuked the netmask setting in favor of ending the address
line with a /24, and route now shows a gateway, But now it appears
dd-wrt is feeding wrong dns data to it. From this machine, a ping -c1
yahoo.com, yields a yahoo address of:
PING yahoo.com (98.137.246.8)

but on the rock64 gives
PING yahoo.com (72.30.35.10) 56(84) bytes of data.
From rock64.coyote.den (192.168.71.2) icmp_seq=1 Destination Host
Unreachable

Which is correct? hell, even from this machine the yahoo.com address
seems randomized a bit, but it works. And I'm starting to run out of
hair.
Thanks Christian.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Alan Corey
2018-07-13 11:01:58 UTC
Permalink
Try ping 8.8.8.8
It's a Google-run nameserver but it's handy to have an outside IP to ping
if you're having trouble looking up names. I use it as a second nameserver.

Sent from my Motorola XT1527
Post by Gene Heskett
Post by Christian Knoke
Post by Gene Heskett
Post by Christopher Barry
follow the below 5 steps for help solving this.
[...]
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
[...]
using bash to run it does make a lengthy file, but also reports in
check-ifaces: line 22: file: command not found
Please install the "file" package and run again.
How do I do that without access to the net? Interesting question I think.
But now, I've nuked the netmask setting in favor of ending the address
line with a /24, and route now shows a gateway, But now it appears
dd-wrt is feeding wrong dns data to it. From this machine, a ping -c1
PING yahoo.com (98.137.246.8)
but on the rock64 gives
PING yahoo.com (72.30.35.10) 56(84) bytes of data.
From rock64.coyote.den (192.168.71.2) icmp_seq=1 Destination Host
Unreachable
Which is correct? hell, even from this machine the yahoo.com address
seems randomized a bit, but it works. And I'm starting to run out of
hair.
Thanks Christian.
--
Cheers, Gene Heskett
--
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Gene Heskett
2018-07-13 13:33:10 UTC
Permalink
Post by Alan Corey
Try ping 8.8.8.8
It's a Google-run nameserver but it's handy to have an outside IP to
ping if you're having trouble looking up names. I use it as a second
nameserver.
***@rock64:/etc/network# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.71.11 icmp_seq=1 Destination Host Unreachable
From 192.168.71.11 icmp_seq=2 Destination Host Unreachable
From 192.168.71.11 icmp_seq=3 Destination Host Unreachable
From 192.168.71.11 icmp_seq=4 Destination Host Unreachable
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 received, +4 errors, 100% packet loss, time
4001ms
pipe 4
Post by Alan Corey
Sent from my Motorola XT1527
Post by Gene Heskett
Post by Christian Knoke
Post by Gene Heskett
Post by Christopher Barry
follow the below 5 steps for help solving this.
[...]
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
[...]
using bash to run it does make a lengthy file, but also reports
check-ifaces: line 22: file: command not found
Please install the "file" package and run again.
How do I do that without access to the net? Interesting question I think.
But now, I've nuked the netmask setting in favor of ending the
address line with a /24, and route now shows a gateway, But now it
appears dd-wrt is feeding wrong dns data to it. From this machine, a
PING yahoo.com (98.137.246.8)
but on the rock64 gives
PING yahoo.com (72.30.35.10) 56(84) bytes of data.
From rock64.coyote.den (192.168.71.2) icmp_seq=1 Destination Host
Unreachable
Which is correct? hell, even from this machine the yahoo.com address
seems randomized a bit, but it works. And I'm starting to run out of
hair.
Thanks Christian.
--
Cheers, Gene Heskett
--
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Gene Heskett
2018-07-13 13:39:55 UTC
Permalink
Post by Gene Heskett
Thats a direct copy/paste, so whats wrong with that. Other than the
fact that its been rebooted twice since the address was changed from
192.168.71.2 to the 11 you see above, but ifconfig still says its on
71.2 right now. So where the heck is it getting the .2 address.
Possibly from an initrd file that needs to be rebuilt.
That is not a grub using boot scheme, and I have not the knowledge to
do that. The booting of these things is as yet a mystery to me. An ls -l
of /boot might disclose the boot method to trained eyes:

***@rock64:/etc/network# ls -l /boot
total 27048
-rw-r--r-- 1 root root 4660138 May 27 18:39 System.map-4.4.126-rockchip-ayufan-239
-rw-r--r-- 1 root root 148020 May 27 18:39 config-4.4.126-rockchip-ayufan-239
lrwxrwxrwx 1 root root 59 Jun 7 21:32 dtb -> dtbs/4.4.126-rockchip-ayufan-239/rockchip/rk3328-rock64.dtb
lrwxrwxrwx 1 root root 59 Jun 7 21:32 dtb-4.4.126-rockchip-ayufan-239 ->
dtbs/4.4.126-rockchip-ayufan-239/rockchip/rk3328-rock64.dtb
drwxr-xr-x 3 root root 4096 May 27 19:15 dtbs
drwxr-xr-x 3 root root 16384 Jan 1 1970 efi
-rw-r--r-- 1 root root 7940 Apr 27 11:26 filesystem.packages
-rw-r--r-- 1 root root 1 Apr 27 11:26 filesystem.packages-remove
-rw-r--r-- 1 root root 3119706 Jun 7 21:32 initrd.img-4.4.126-rockchip-ayufan-239
-rwxr-xr-x 1 root root 19726344 May 27 18:39 vmlinuz-4.4.126-rockchip-ayufan-239

Thanks Mark.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Gene Heskett
2018-07-13 14:26:39 UTC
Permalink
Post by Gene Heskett
Post by Gene Heskett
Thats a direct copy/paste, so whats wrong with that. Other than
the fact that its been rebooted twice since the address was
changed from 192.168.71.2 to the 11 you see above, but ifconfig
still says its on 71.2 right now. So where the heck is it getting
the .2 address.
Possibly from an initrd file that needs to be rebuilt.
That is not a grub using boot scheme, and I have not the knowledge
to do that. The booting of these things is as yet a mystery to me.
total 27048
-rw-r--r-- 1 root root 4660138 May 27 18:39
System.map-4.4.126-rockchip-ayufan-239 -rw-r--r-- 1 root root
148020 May 27 18:39 config-4.4.126-rockchip-ayufan-239 lrwxrwxrwx 1
root root 59 Jun 7 21:32 dtb ->
dtbs/4.4.126-rockchip-ayufan-239/rockchip/rk3328-rock64.dtb
lrwxrwxrwx 1 root root 59 Jun 7 21:32
dtb-4.4.126-rockchip-ayufan-239 ->
dtbs/4.4.126-rockchip-ayufan-239/rockchip/rk3328-rock64.dtb
drwxr-xr-x 3 root root 4096 May 27 19:15 dtbs
drwxr-xr-x 3 root root 16384 Jan 1 1970 efi
-rw-r--r-- 1 root root 7940 Apr 27 11:26 filesystem.packages
-rw-r--r-- 1 root root 1 Apr 27 11:26
filesystem.packages-remove -rw-r--r-- 1 root root 3119706 Jun 7
21:32 initrd.img-4.4.126-rockchip-ayufan-239 -rwxr-xr-x 1 root root
19726344 May 27 18:39 vmlinuz-4.4.126-rockchip-ayufan-239
And the last automatic updates were done on the 7th June- correct?
Much stuff that I do these days is based on RPIs which don't use an
initrd, but I had to go through this on a PC a few weeks ago after I'd
moved some discs around: the old configuration was still stuck in the
fstab file loaded from the initrd file.
I think it was a simple update-initramfs -u that got me going, but
(a) check your manpages etc. and (b) if EFI really is involved check
whether the boot loader requires any file signing etc... I'm afraid
I've only used EFI on Itanium and there only superficially.
The EFI directory is empty. These arm semi-clones have virtually no
identifiable bios.

But I did just now get it fixed, my syntax for route add was fubar, it
should have been:

***@rock64:/etc/network# cat make-missing-gateway.sh
route add default gw 192.168.71.1 dev eth0

I was missing the default and dev options. routes manpage sucks.

This was the answer to the question I asked several times in this thread
and which was universally ignored by 99% of the responders.

Thanks Mark. Perhaps this fix will be usefull to others.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Alan Corey
2018-07-13 14:31:23 UTC
Permalink
Well, nobody did give you the answer in the end because you have a unique
perspective on the problem.

Sent from my Motorola XT1527
Post by Gene Heskett
Post by Gene Heskett
Post by Gene Heskett
Thats a direct copy/paste, so whats wrong with that. Other than
the fact that its been rebooted twice since the address was
changed from 192.168.71.2 to the 11 you see above, but ifconfig
still says its on 71.2 right now. So where the heck is it getting
the .2 address.
Possibly from an initrd file that needs to be rebuilt.
That is not a grub using boot scheme, and I have not the knowledge
to do that. The booting of these things is as yet a mystery to me.
total 27048
-rw-r--r-- 1 root root 4660138 May 27 18:39
System.map-4.4.126-rockchip-ayufan-239 -rw-r--r-- 1 root root
148020 May 27 18:39 config-4.4.126-rockchip-ayufan-239 lrwxrwxrwx 1
root root 59 Jun 7 21:32 dtb ->
dtbs/4.4.126-rockchip-ayufan-239/rockchip/rk3328-rock64.dtb
lrwxrwxrwx 1 root root 59 Jun 7 21:32
dtb-4.4.126-rockchip-ayufan-239 ->
dtbs/4.4.126-rockchip-ayufan-239/rockchip/rk3328-rock64.dtb
drwxr-xr-x 3 root root 4096 May 27 19:15 dtbs
drwxr-xr-x 3 root root 16384 Jan 1 1970 efi
-rw-r--r-- 1 root root 7940 Apr 27 11:26 filesystem.packages
-rw-r--r-- 1 root root 1 Apr 27 11:26
filesystem.packages-remove -rw-r--r-- 1 root root 3119706 Jun 7
21:32 initrd.img-4.4.126-rockchip-ayufan-239 -rwxr-xr-x 1 root root
19726344 May 27 18:39 vmlinuz-4.4.126-rockchip-ayufan-239
And the last automatic updates were done on the 7th June- correct?
Much stuff that I do these days is based on RPIs which don't use an
initrd, but I had to go through this on a PC a few weeks ago after I'd
moved some discs around: the old configuration was still stuck in the
fstab file loaded from the initrd file.
I think it was a simple update-initramfs -u that got me going, but
(a) check your manpages etc. and (b) if EFI really is involved check
whether the boot loader requires any file signing etc... I'm afraid
I've only used EFI on Itanium and there only superficially.
The EFI directory is empty. These arm semi-clones have virtually no
identifiable bios.
But I did just now get it fixed, my syntax for route add was fubar, it
route add default gw 192.168.71.1 dev eth0
I was missing the default and dev options. routes manpage sucks.
This was the answer to the question I asked several times in this thread
and which was universally ignored by 99% of the responders.
Thanks Mark. Perhaps this fix will be usefull to others.
--
Cheers, Gene Heskett
--
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Gene Heskett
2018-07-13 15:10:08 UTC
Permalink
Post by Gene Heskett
And the last automatic updates were done on the 7th June- correct?
Much stuff that I do these days is based on RPIs which don't use an
initrd, but I had to go through this on a PC a few weeks ago after
I'd moved some discs around: the old configuration was still stuck
in the fstab file loaded from the initrd file.
I think it was a simple update-initramfs -u that got me going,
but (a) check your manpages etc. and (b) if EFI really is involved
check whether the boot loader requires any file signing etc... I'm
afraid I've only used EFI on Itanium and there only superficially.
The EFI directory is empty. These arm semi-clones have virtually no
identifiable bios.
But they do have a loader of some sort, pulling in the kernel, dtd,
and initrd.
Post by Gene Heskett
But I did just now get it fixed, my syntax for route add was fubar,
route add default gw 192.168.71.1 dev eth0
I was missing the default and dev options. routes manpage sucks.
Yes, and route (and ifconfig etc.) is obsolete. But still sometimes
useful.
And will probably continue to be usefull as long as the man pages for ip
and friends continue to suck dead toads thru soda straws. Or something
is changed to totally disable the old standby's. At which point we'll
all have to learn how to use them, but this list and its collective
knowledge will become the man pages for ip and kin that should have been
written in the first place. Keyword is examples, few to non-existent.
In practice, "default" substitutes for "-net x.y.z.t" and so on. Nice,
uniform syntax :-(
Post by Gene Heskett
This was the answer to the question I asked several times in this
thread and which was universally ignored by 99% of the responders.
Thanks Mark. Perhaps this fix will be usefull to others.
But the major thing you were asking was why your interfaces file was
being ignored. You might still have that one lurking.
Of that I'm also sure, but thats the same exact interfaces file contents
I've been using since wheezy was getting stable. The only thing changed
was the ipv4 address for that machine. But I can at least make it work
now.

Thanks Mark.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Gene Heskett
2018-07-13 21:26:00 UTC
Permalink
Post by Gene Heskett
Yes, and route (and ifconfig etc.) is obsolete. But still sometimes
useful.
And will probably continue to be usefull as long as the man pages
for ip and friends continue to suck dead toads thru soda straws. Or
something is changed to totally disable the old standby's. At which
point we'll all have to learn how to use them, but this list and its
collective knowledge will become the man pages for ip and kin that
should have been written in the first place. Keyword is examples,
few to non-existent.
Seriously Gene, you /do/ have to watch out there since the newer
replacements (documented as ip-route etc.) can put things into kernel
tables that the "classic" route command cannot describe adequately.
This may well be true, but until I can decode from the manpage just what
this particular version or cousin of it will do to me, I don't have a
pole long enough to touch it. I don't care if the new man pages if there
are any, are 20 pages long because an adequate description of what it
can do has been added. It needs to be done if its ever to replace
ifconfig and route in common use.

You've obviously figured out some of it, but I've other, sometimes more
important things to do, like keeping my lawn from looking like an amazon
forest, taking care of an invalid wife, etc, etc.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Gene Heskett
2018-07-12 21:10:28 UTC
Permalink
Post by Gene Heskett
Greetings;
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.
Where does this assignment belong in a static defined eth0
configuration?
I know several places where it doesn't work, but what I need to know
is where do I put, in what file, the "gateway = www.xxx.yyy.zzz" and
make it just work for a stretch install on a rock64. Thats an arm64
family card.
All I have been able to get out of route is the gibberishy help when
there is a syntax error.
The obvious (to me that is) place would be
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
Start off with ifconfig -a to check your interface names, if you've
got eth1 rather than eth0 look in something like
/etc/udev/rules.d/70*. Working in /etc/network/interfaces, simplify
your config to something like
allow-hotplug eth0
iface eth0 inet static
address 192.168.71.2/24
gateway 192.168.71.1
dns-nameserver 192.168.71.1
post-up echo ifup > /tmp/eth0
Note that for the dns-nameserver to work you'll need the resolvconf
package.
Its there, but resolv.conf is a real file because resolvconf has yet to
make a link that is not empty except for these comments.

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
Look for /tmp/eth0 which should contain a message telling you that the
"post-up" ran. If it's not there find what's going wrong, there's a
file which in principle tells NetworkManager to never under any
circumstances touch an interface but TBH I've yet to find a
circumstance in which NM is less trouble than it's worth and very
often I just tell systemd not to run it.
No such file(s) exist
***@rock64:~# ls -lR /var/tmp
/var/tmp:
total 20
drwx------ 3 root root 4096 Jul 12 13:12 systemd-private-08e8615f9c6645b3b603d3ddb01a1edb-rtkit-daemon.service-oGu62f
drwx------ 3 root root 4096 Jul 11 19:53 systemd-private-312cad7b6dbe429fa65c3602cf7c0a1d-rtkit-daemon.service-IpLjBC
drwx------ 3 root root 4096 Jul 11 19:50 systemd-private-6d2e2648c6174d879be768dd8f6946b6-rtkit-daemon.service-uSndig
drwx------ 3 root root 4096 Jun 7 21:48 systemd-private-8c0cc04acec746c59f974b045b7dd8ae-rtkit-daemon.service-AarJXq
drwx------ 3 root root 4096 Jun 23 13:17 systemd-private-951aa0a1a04f458fa51724cd9e218136-rtkit-daemon.service-K9V3BQ

/var/tmp/systemd-private-08e8615f9c6645b3b603d3ddb01a1edb-rtkit-daemon.service-oGu62f:
total 4
drwxrwxrwt 2 root root 4096 Jul 12 13:12 tmp

/var/tmp/systemd-private-08e8615f9c6645b3b603d3ddb01a1edb-rtkit-daemon.service-oGu62f/tmp:
total 0

/var/tmp/systemd-private-312cad7b6dbe429fa65c3602cf7c0a1d-rtkit-daemon.service-IpLjBC:
total 4
drwxrwxrwt 2 root root 4096 Jul 11 19:53 tmp

/var/tmp/systemd-private-312cad7b6dbe429fa65c3602cf7c0a1d-rtkit-daemon.service-IpLjBC/tmp:
total 0

/var/tmp/systemd-private-6d2e2648c6174d879be768dd8f6946b6-rtkit-daemon.service-uSndig:
total 4
drwxrwxrwt 2 root root 4096 Jul 11 19:50 tmp

/var/tmp/systemd-private-6d2e2648c6174d879be768dd8f6946b6-rtkit-daemon.service-uSndig/tmp:
total 0

/var/tmp/systemd-private-8c0cc04acec746c59f974b045b7dd8ae-rtkit-daemon.service-AarJXq:
total 4
drwxrwxrwt 2 root root 4096 Jun 7 21:48 tmp

/var/tmp/systemd-private-8c0cc04acec746c59f974b045b7dd8ae-rtkit-daemon.service-AarJXq/tmp:
total 0

/var/tmp/systemd-private-951aa0a1a04f458fa51724cd9e218136-rtkit-daemon.service-K9V3BQ:
total 4
drwxrwxrwt 2 root root 4096 Jun 23 13:17 tmp

/var/tmp/systemd-private-951aa0a1a04f458fa51724cd9e218136-rtkit-daemon.service-K9V3BQ/tmp:
total 0
***@rock64:~# IOW, the */tmp's are all empty.

But ntpd is burning up the sd card, logging an attempt to access a
timeserver about every 2 seconds.

Thanks Mark.
--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
David Billsbrough
2018-07-18 04:46:11 UTC
Permalink
I played with script on an Intel box running Debian and made a few changes:


#!/bin/bash
#
# $Id: check-ifaces.sh,v 0.3 2018/07/17 19:17:46 kc4zvw Exp kc4zvw $

# Somewhat tested, now there may be more bugs, your mileage might vary

REPORT_FILE=$0.out

function check_ip()
{
echo "Run 'sudo apt-get install iproute2' for needed tools."
exit 1
}

function setup_report_file()
{
rm $REPORT_FILE
touch $REPORT_FILE
}

function out()
{
echo -e "\n#### Running: ${@} ####\n" | tee -a $REPORT_FILE
## $@ | tee -a $REPORT_FILE
$@ >> $REPORT_FILE
}

## ----- main begins here -----

echo
echo "Started to collect data ..."
echo

setup_report_file
which ip || check_ip

out ip a
out ip l
out ip route
out ps ax
out cat /etc/resolv.conf

for f in $(find /etc/network -type f)
do
[[ -f "$f" ]] && [[ "$(file "$f")" =~ text ]] && out cat "$f";
done

echo
echo "All data saved to $REPORT_FILE."

# End of File



-=-=-=-=-


regards,

David

-----Original Message-----
Sent: Jul 12, 2018 11:36 PM
Subject: Re: missing gw in route -n
On Thu, 12 Jul 2018 21:52:13 -0400
hth
Not yet. If I can't fix this tomorrow, I'll write another sd card
...snip
follow the below 5 steps for help solving this.
1.) highlight/copy from the NEXT line down to the line '# EOF'
#!/bin/bash
# untested, there may be bugs, ymmv
which ip || {
echo "run 'sudo apt-get install iproute2' for needed tools"
exit 1
}
$0.out
function out() {
}
out ip a
out ip l
out ip r
out ps ax
out cat /etc/resolv.conf
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
echo "data saved to $0.out"
# EOF
2.) paste/save that into a new text file named ck-ifaces
4.) post 'contents' of ck-ifaces.out to pastebin.com (not here on list)
5.) post 'link' to your pastbin data here
--
Regards,
Christopher Barry
--
David - Chuluota, FL

--
Alan Corey
2018-07-18 12:49:14 UTC
Permalink
On a similar note it reminded me of this I'd written about a year ago. It
brings an interface down then up if it can't ping google once as a test.
It would crash hard if there was some billing screwup and my phone got
shut off. You can change the logging location to something other than
/usr/programs/scripts/dhcp/resets.txt and the interface name. The real
world problem I was seeing is that if the cell phone is trying out a
signal from a different tower that dumps the internet temporarily. I was
calling this from a cron job every 10 minutes.

#!/bin/bash
declare tries=0
until (ping -c 1 www.google.com > /dev/null) || (tries > 9) ; do
tries++
/sbin/ifdown wlan0
/bin/sleep 1
/sbin/ifup wlan0
/bin/date >> /usr/programs/scripts/dhcp/resets.txt
if tries > 9 ; then
echo "\nMany retries\n" >> /usr/programs/scripts/dhcp/resets.txt ;
fi;
done

Nothing to do with routes explcitly.
Post by Christopher Barry
#!/bin/bash
#
# $Id: check-ifaces.sh,v 0.3 2018/07/17 19:17:46 kc4zvw Exp kc4zvw $
# Somewhat tested, now there may be more bugs, your mileage might vary
REPORT_FILE=$0.out
function check_ip()
{
echo "Run 'sudo apt-get install iproute2' for needed tools."
exit 1
}
function setup_report_file()
{
rm $REPORT_FILE
touch $REPORT_FILE
}
function out()
{
}
## ----- main begins here -----
echo
echo "Started to collect data ..."
echo
setup_report_file
which ip || check_ip
out ip a
out ip l
out ip route
out ps ax
out cat /etc/resolv.conf
for f in $(find /etc/network -type f)
do
[[ -f "$f" ]] && [[ "$(file "$f")" =~ text ]] && out cat "$f";
done
echo
echo "All data saved to $REPORT_FILE."
# End of File
-=-=-=-=-
regards,
David
-----Original Message-----
Sent: Jul 12, 2018 11:36 PM
Subject: Re: missing gw in route -n
On Thu, 12 Jul 2018 21:52:13 -0400
hth
Not yet. If I can't fix this tomorrow, I'll write another sd card
...snip
follow the below 5 steps for help solving this.
1.) highlight/copy from the NEXT line down to the line '# EOF'
#!/bin/bash
# untested, there may be bugs, ymmv
which ip || {
echo "run 'sudo apt-get install iproute2' for needed tools"
exit 1
}
$0.out
function out() {
}
out ip a
out ip l
out ip r
out ps ax
out cat /etc/resolv.conf
for f in $(find /etc/network -type f); do
[[ -f ${f} && "$(file "${f}")" =~ text ]] && {
out cat "${f}"
}
done
echo "data saved to $0.out"
# EOF
2.) paste/save that into a new text file named ck-ifaces
4.) post 'contents' of ck-ifaces.out to pastebin.com (not here on list)
5.) post 'link' to your pastbin data here
--
Regards,
Christopher Barry
--
David - Chuluota, FL
--
---
Sent from Alpine connected to Gmail on my 64-bit Raspberry Pi

Loading...