Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #168018

Re: /etc/init.d/networking does not start everything in /etc/network/interfaces

From Gene Heskett <gheskett@shentel.net>
Newsgroups linux.debian.user
Subject Re: /etc/init.d/networking does not start everything in /etc/network/interfaces
Date 2016-05-18 17:00 +0200
Message-ID <rAb73-3s8-13@gated-at.bofh.it> (permalink)
References <rzLZ0-4o9-19@gated-at.bofh.it> <rzQYH-7s5-33@gated-at.bofh.it> <rA7Zw-1wr-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wednesday 18 May 2016 07:31:34 Lisi Reisz wrote:

> On Tuesday 17 May 2016 18:29:36 Elimar Riesebieter wrote:
> > * Gilles Mocellin <gilles.mocellin@nuagelibre.org> [2016-05-17 19:09 
+0200]:
> > > Le 17/05/2016 à 14:34, Mimiko a écrit :
> > > > On 17.05.2016 15:16, Elimar Riesebieter wrote:
> > > > > Ask your search engine: "init.d/networking restart is
> > > > > deprecated"
> > > >
> > > > This was the only tool to fully restart all networking even the
> > > > interface thru which connection is made.
> > > > Are the `ifdown eth & ifup eth` the only option now?
> > >
> > > Just to add these commands in that thread.
> > >
> > > To restart all the interfaces as they are defined in
> > > /etc/network/interfaces, I do :
> > >
> > > # ifdown -a; ifup -a
> >
> > /etc/init.d/networking stop does ifdown -a
> > /etc/init.d/networking start does ifup -a
>
> But
> # ifdown -a; ifup -a
> is much more elegant!!
>
> Lisi

If it worked, but no one, including me, has found where the database of 
devices the -a is supposed to manage.  Apparently this is written at 
boot time. And I have no reason to reboot.

But if some kind soul knows where this database is, or knows of a utility 
that would update it once I have enabled the 2nd RJ45 jack as eth1, now 
that will get a hearty thank you and a tip of my hat in his/her 
direction.   And in terms of hand editing a file, it looks 
like /etc/network/run/ifstate may be that file. It currently contains:
lo=lo
eth0=eth0
so I fired up a root editor and added it. But a sudo service networking 
restart failed, and erased my hand edit from that file.

Snips from the verbose output of the restart:
Configuring interface eth1=eth1 (inet)
run-parts --verbose /etc/network/if-down.d
run-parts: executing /etc/network/if-down.d/avahi-autoipd
run-parts: executing /etc/network/if-down.d/clamav-freshclam-ifupdown
run-parts: executing /etc/network/if-down.d/upstart
run-parts: executing /etc/network/if-down.d/wpasupplicant
 ip route del default via 192.168.1.1  dev eth1 2>&1 1>/dev/null || true 
RTNETLINK answers: No such process
ip -4 addr flush dev eth1 label eth1
ip link set dev eth1 down

So that looks like it worked.  Later;
Configuring interface eth1=eth1 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.1.3/255.255.255.0 broadcast 192.168.1.255 	  dev eth1 
label eth1
ip link set dev eth1   up
 ip route add default via 192.168.1.1  dev eth1 
RTNETLINK answers: File exists
Failed to bring up eth1.

But.....  that router is still connected
gene@coyote:/etc/udev/rules.d$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.831 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=0.340 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=0.342 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.347 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=0.480 ms
64 bytes from 192.168.1.1: icmp_req=6 ttl=64 time=0.287 ms
^C
--- 192.168.1.1 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 4999ms
rtt min/avg/max/mdev = 0.287/0.437/0.831/0.187 ms

So despite the apparent failure, which seems to cause RTNETLINK to 
excrete the bogus fail message, and remove the eh1=eth1 from the ifstate 
file, it does work, but adding that line to the ifstate file everytime 
sure seems like the wrong way. FWIW that file is a link, 
to /var/run/network/ifstate.  And its date is updated when networking 
restart is executed.

RTNETLINK cannot find it going either way. But at least networking can 
find it, one time only.  And that is about as close to the bug as I can 
get, and thats not close enough to fix it.  Somebody else's turn if 
they've a mind to.

The real failure seems to be:
(why the leading space?)
 ip route del default via 192.168.1.1  dev eth1 2>&1 1>/dev/null || true

which if repeated from a root account, should I think, delete that route 
from the routing table, but it does not, the address remains:

root@coyote:/etc/network# ip route del default via 192.168.1.1  dev eth1
RTNETLINK answers: No such process
root@coyote:/etc/network# 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.1.0    0.0.0.0        255.255.255.0 U     0      0      0   eth1
192.168.71.0   0.0.0.0        255.255.255.0 U     0      0      0   eth0

And the route to 1.0 remains, and the router is still pingable. I am 
seeing that sockets led on the router blink at every ping.

Now,  for those complaining about my lack of posting the complete 
interfaces file, here it is:
--------------------------------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

auto lo eth0 eth1

# The loopback network interface
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

# regular network for coyote.den
iface eth0 inet static
address 192.168.71.3
netmask 255.255.255.0
gateway 192.168.71.1

# to access reset routers at 192.168.1.1 on the 2nd cat5 port
iface eth1 inet static
address 192.168.1.3
netmask 255.255.255.0
gateway 192.168.1.1
---------------------thats all folks!-------------
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>

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

/etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-17 14:10 +0200
  Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Peter Ludikovsky <peter@ludikovsky.name> - 2016-05-17 14:20 +0200
    Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-17 14:40 +0200
  Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Elimar Riesebieter <riesebie@lxtec.de> - 2016-05-17 14:20 +0200
    Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Mimiko <vbvbrj@gmail.com> - 2016-05-17 14:40 +0200
      Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Gilles Mocellin <gilles.mocellin@nuagelibre.org> - 2016-05-17 19:20 +0200
        Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Elimar Riesebieter <riesebie@lxtec.de> - 2016-05-17 19:30 +0200
          Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Lisi Reisz <lisi.reisz@gmail.com> - 2016-05-18 13:40 +0200
            Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Lisi Reisz <lisi.reisz@gmail.com> - 2016-05-18 16:00 +0200
            Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Elimar Riesebieter <riesebie@lxtec.de> - 2016-05-18 16:00 +0200
              Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces <tomas@tuxteam.de> - 2016-05-18 16:10 +0200
            Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-18 17:00 +0200
              Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces <tomas@tuxteam.de> - 2016-05-18 17:10 +0200
                Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-18 17:20 +0200
                Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Lisi Reisz <lisi.reisz@gmail.com> - 2016-05-18 17:40 +0200
                Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-18 18:00 +0200
                Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Lisi Reisz <lisi.reisz@gmail.com> - 2016-05-18 18:10 +0200
                Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Curt <curty@free.fr> - 2016-05-19 17:20 +0200
              Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Darac Marjal <mailinglist@darac.org.uk> - 2016-05-18 17:40 +0200
              Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces David Wright <deblis@lionunicorn.co.uk> - 2016-05-18 18:00 +0200
                Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Brian <ad44@cityscape.co.uk> - 2016-05-18 18:50 +0200
                Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces David Wright <deblis@lionunicorn.co.uk> - 2016-05-18 19:40 +0200
                Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Brian <ad44@cityscape.co.uk> - 2016-05-19 00:40 +0200
        Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-17 21:00 +0200
          Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces David Wright <deblis@lionunicorn.co.uk> - 2016-05-17 21:40 +0200
    Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-17 15:00 +0200
    Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces <tomas@tuxteam.de> - 2016-05-17 15:10 +0200
      Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Elimar Riesebieter <riesebie@lxtec.de> - 2016-05-17 15:50 +0200
        Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces <tomas@tuxteam.de> - 2016-05-17 15:50 +0200
      Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-17 16:00 +0200
        Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Elimar Riesebieter <riesebie@lxtec.de> - 2016-05-17 16:40 +0200
          RE: /etc/init.d/networking does not start everything in  /etc/network/interfaces Bonno Bloksma <b.bloksma@tio.nl> - 2016-05-17 17:20 +0200
          Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Lisi Reisz <lisi.reisz@gmail.com> - 2016-05-17 17:30 +0200
          Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-17 17:30 +0200
            Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces David Wright <deblis@lionunicorn.co.uk> - 2016-05-17 18:50 +0200
              Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-17 20:10 +0200
              Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces <tomas@tuxteam.de> - 2016-05-18 11:00 +0200
                Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces David Wright <deblis@lionunicorn.co.uk> - 2016-05-18 19:30 +0200
            Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Elimar Riesebieter <riesebie@lxtec.de> - 2016-05-17 19:30 +0200
              Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-17 21:20 +0200
                Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces Andy Smith <andy@strugglers.net> - 2016-05-17 21:30 +0200
                Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-18 00:50 +0200
                Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Lisi Reisz <lisi.reisz@gmail.com> - 2016-05-18 01:40 +0200
                Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Gene Heskett <gheskett@shentel.net> - 2016-05-18 04:10 +0200
          Re: /etc/init.d/networking does not start everything in  /etc/network/interfaces David Wright <deblis@lionunicorn.co.uk> - 2016-05-17 20:30 +0200
  Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Rodary Jacques <rodaryj@free.fr> - 2016-05-20 19:30 +0200
    Re: /etc/init.d/networking does not start everything in /etc/network/interfaces Lisi Reisz <lisi.reisz@gmail.com> - 2016-05-20 20:10 +0200

csiph-web