Package: ifupdown
Version: 0.7.2
Severity: important
Under some occasions, ifdown doesn't bring the eth0 interface down:
the if-down.d and if-post-down.d scripts are not run, and eth0 is
still marked as being up. The goal was to reconfigure the interface
by bringing it down then up again, as the route was incorrect.
I temporarily had a different route via usb0:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.15 0.0.0.0 UG 0 0 0 usb0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 usb0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0
But now the usb0 interface is no longer configured, and I want to go
back to the usual routing via eth0.
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
So, I did:
# /sbin/ifdown -v eth0
/sbin/ifdown: interface eth0 not configured
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:e8:97:5f:73
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::224:e8ff:fe97:5f73/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2608525 errors:0 dropped:0 overruns:0 frame:0
TX packets:2132636 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1447325119 (1.3 GiB) TX bytes:378728171 (361.1 MiB)
Interrupt:22 Memory:f6fe0000-f7000000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1023997 errors:0 dropped:0 overruns:0 frame:0
TX packets:1023997 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:562465999 (536.4 MiB) TX bytes:562465999 (536.4 MiB)
# /sbin/ifdown -v --force eth0
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:e8:97:5f:73
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::224:e8ff:fe97:5f73/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2608525 errors:0 dropped:0 overruns:0 frame:0
TX packets:2132636 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1447325119 (1.3 GiB) TX bytes:378728171 (361.1 MiB)
Interrupt:22 Memory:f6fe0000-f7000000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1024125 errors:0 dropped:0 overruns:0 frame:0
TX packets:1024125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:562473135 (536.4 MiB) TX bytes:562473135 (536.4 MiB)
But eth0 is still marked as up. Forcing it up again has no effect
for the route. I have in the /etc/network/interfaces file:
mapping eth0
script /usr/sbin/guessnet-ifupdown
map syslog: true
map default: eth0-dhcp
map debug: true
map timeout: 10
iface eth0-dhcp inet dhcp
iface eth0-home inet static
address 192.168.0.8
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
test peer address 192.168.0.1 mac 00:00:C5:B4:98:74
up sed -i 's/.*[[:space:]]n900\./192.168.0.9\tn900./' /etc/hosts
# /sbin/ifup -v --force eth0
Running mapping script /usr/sbin/guessnet-ifupdown on eth0
[...]
guessnet: Got ARP reply from 192.168.0.1 00:00:c5:b4:98:74
guessnet: Chosen profile: eth0-home
Configuring interface eth0=eth0-home (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/bridge
run-parts: executing /etc/network/if-pre-up.d/dhcp-conf-bind
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/exim4-conf
run-parts: executing /etc/network/if-pre-up.d/home-conf-bind
run-parts: executing /etc/network/if-pre-up.d/postfix-conf
Stopping Postfix Mail Transport Agent: postfix.
Starting Postfix Mail Transport Agent: postfix.
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.0.8/255.255.255.0 broadcast 192.168.0.255 dev eth0
label eth0
RTNETLINK answers: File exists
Failed to bring up eth0-home.
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
I can ping 192.168.0.1, but the route is still wrong. I should have:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.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.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
I first thought that this could be bug 81219 ('ifdown -a' doesn't work
if default route changed), but I got no "SIOCDELRT: No such process"
error messages and I can't reproduce this bug:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default router 0.0.0.0 UG 0 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
# ip route del default
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
link-local * 255.255.0.0 U 1000 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
# ifdown -v eth0
Configuring interface eth0=eth0-home (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/bind9
run-parts: executing /etc/network/if-down.d/postfix
run-parts: executing /etc/network/if-down.d/wpasupplicant
ip route del default via 192.168.0.1 dev eth0 2>&1 1>/dev/null || true
RTNETLINK answers: No such process
ip -4 addr flush dev eth0 label eth0
ip link set dev eth0 down
run-parts --verbose /etc/network/if-post-down.d
run-parts: executing /etc/network/if-post-down.d/avahi-daemon
run-parts: executing /etc/network/if-post-down.d/bridge
run-parts: executing /etc/network/if-post-down.d/wireless-tools
run-parts: executing /etc/network/if-post-down.d/wpasupplicant
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ifupdown depends on:
ii dpkg 1.16.8
ii initscripts 2.88dsf-31
ii iproute 20120521-3
ii libc6 2.13-35
ii lsb-base 4.1+Debian7
ifupdown recommends no packages.
Versions of packages ifupdown suggests:
ii isc-dhcp-client [dhcp-client] 4.2.4-1
ii net-tools 1.60-24.1
ii ppp 2.4.5-5.1+b1
pn rdnssd <none>
-- Configuration Files:
/etc/default/networking changed:
VERBOSE=yes
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]