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

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



Hi Gene,

On Tue, May 17, 2016 at 03:12:45PM -0400, Gene Heskett wrote:
> 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
> RTNETLINK answers: File exists
> Failed to bring up eth1.
> run-parts --verbose /etc/network/if-up.d
> run-parts: executing /etc/network/if-up.d/avahi-autoipd
> run-parts: executing /etc/network/if-up.d/avahi-daemon
> run-parts: executing /etc/network/if-up.d/clamav-freshclam-ifupdown
> run-parts: executing /etc/network/if-up.d/mountnfs
> run-parts: executing /etc/network/if-up.d/ntpdate
> run-parts: executing /etc/network/if-up.d/openssh-server
> run-parts: executing /etc/network/if-up.d/upstart
> run-parts: executing /etc/network/if-up.d/wpasupplicant
> done.
> ====================
> It makes no attempt to shut down eth1, so of course it exists.
> 
> Here is the REAL bug.

I think this problem is quite likely to be as a result of the things
you did in the earlier thread, where you were manually setting eth1
up with ifconfig.

It is a known deficiency of ifupdown that it doesn't know the state
of the system unless it made those state changes itself. It did not
do anything to eth1 because you hadn't earlier told it to manage
eth1. So when it came to shut down all interfaces it didn't do
anything with eth1. And then later when it tries to configure it, it
finds it is already configured.

I think that possibly you could return things to a state that
ifupdown can cope with by either rebooting, or by manually removing
the IP address from eth1 and setting it down:

# ip addr del 192.168.1.3/24 dev eth1
# ip link set down dev eth1

Then assuming eth1 is correctly configured in
/etc/network/interfaces (which you have not yet shown us in full, so
we don't know for sure), I would think that ifup -a and ifdown -a
would work as expected.

But, is this not now all academic since the task you needed this
interface for is done?

Cheers,
Andy

-- 
http://bitfolk.com/ -- No-nonsense VPS hosting

Attachment: signature.asc
Description: Digital signature


Reply to: