Your message dated Mon, 21 Nov 2022 15:56:32 +0100
with message-id <Y3uRoJ21pnsu4BZS@bartik>
and subject line Re: Bug#1024405: ifupdown: up command not run on alias
interface
has caused the Debian Bug report #1024405,
regarding ifupdown: up command not run on alias interface
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1024405: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024405
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ifupdown
Version: 0.8.39+b1
Severity: minor
Dear Maintainer,
Editing /etc/network/interfaces
It appears that the 'up' command in an alias interface does not work correctly.
Moreover, since the 'up' command is run before the second alias interface is
brought it, simply moving it does not help.
Fail1: brings up both the primary and alias IPs, but does NOT set up the route
Fail2: does not bring up the second alias interface at all.
Working: Brings up both IPs and the route.
This may just be a documentation issue (if you can't use aliases this way), but
it appears to be a bug.
No journalctl messages are logged on the failures- just no route created.
=== START FAILING EXAMPLE 1 ===
allow-hotplug ens192
iface ens192 inet static
address 123.123.123.146/24
gateway 123.123.123.1
iface ens192 inet static
address 10.200.2.201/16
gateway 10.200.0.1
up ip route add 10.201.0.0/16 dev $IFACE via 10.200.0.1
down ip route del 10.201.0.0/16 dev $IFACE via 10.200.0.1 || true
=== END FAILING EXAMPLE 1 ===
=== START FAILING EXAMPLE 2 ===
allow-hotplug ens192
iface ens192 inet static
address 123.123.123.146/24
gateway 123.123.123.1
up ip route add 10.201.0.0/16 dev $IFACE via 10.200.0.1
down ip route del 10.201.0.0/16 dev $IFACE via 10.200.0.1 || true
iface ens192 inet static
address 10.200.2.201/16
gateway 10.200.0.1
=== END FAILING EXAMPLE 2 ===
=== START WORKING EXAMPLE ===
allow-hotplug ens192
iface ens192 inet static
address 123.123.123.146/24
gateway 123.123.123.1
up ip addr add 10.200.2.201/16 dev $IFACE label $IFACE:0
down ip addr del 10.200.2.201/16 dev $IFACE label $IFACE:0 || true
up ip route add 10.201.0.0/16 dev $IFACE via 10.200.0.1
down ip route del 10.201.0.0/16 dev $IFACE via 10.200.0.1 || true
=== END WORKING EXAMPLE ===
-- Package-specific info:
--- /etc/network/interfaces.d/*:
cat: '/etc/network/interfaces.d/*': No such file or directory
--- up and down scripts installed:
/etc/network/if-down.d:
total 4
-rwxr-xr-x 1 root root 759 Sep 27 09:09 resolved
/etc/network/if-post-down.d:
total 0
/etc/network/if-pre-up.d:
total 4
-rwxr-xr-x 1 root root 344 Jun 30 2016 ethtool
/etc/network/if-up.d:
total 12
-rwxr-xr-x 1 root root 1685 Jun 30 2016 ethtool
-rwxr-xr-x 1 root root 4663 Sep 27 09:09 resolved
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.0.0-4-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8),
LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages ifupdown depends on:
ii adduser 3.129
ii iproute2 6.0.0-1+b1
ii libc6 2.36-4
Versions of packages ifupdown recommends:
ii isc-dhcp-client [dhcp-client] 4.4.3-P1-1
Versions of packages ifupdown suggests:
pn ppp <none>
pn rdnssd <none>
-- no debconf information
--- End Message ---
--- Begin Message ---
Hi,
El 18/11/22 a las 20:45, MK escribió:
> Package: ifupdown
> Version: 0.8.39+b1
> Severity: minor
>
>
> Dear Maintainer,
>
>
> Editing /etc/network/interfaces
>
>
> It appears that the 'up' command in an alias interface does not work
> correctly.
> Moreover, since the 'up' command is run before the second alias interface is
> brought it, simply moving it does not help.
>
> Fail1: brings up both the primary and alias IPs, but does NOT set up the route
> Fail2: does not bring up the second alias interface at all.
> Working: Brings up both IPs and the route.
>
> This may just be a documentation issue (if you can't use aliases this way),
> but it appears to be a bug.
> No journalctl messages are logged on the failures- just no route created.
>
>
> === START FAILING EXAMPLE 1 ===
> allow-hotplug ens192
> iface ens192 inet static
> address 123.123.123.146/24
> gateway 123.123.123.1
>
>
> iface ens192 inet static
> address 10.200.2.201/16
> gateway 10.200.0.1
> up ip route add 10.201.0.0/16 dev $IFACE via 10.200.0.1
> down ip route del 10.201.0.0/16 dev $IFACE via 10.200.0.1 || true
> === END FAILING EXAMPLE 1 ===
...
Try this instead:
auto ens192:0
iface ens192:0 inet static
address 10.200.2.201/16
gateway 10.200.0.1
up ip route add 10.201.0.0/16 dev $IFACE via 10.200.0.1
down ip route del 10.201.0.0/16 dev $IFACE via 10.200.0.1 || true
See: https://www.kernel.org/doc/html/latest/networking/alias.html
ifupdown doesn't support (yet?) more modern methods for having multiple
addresses per interface in Linux.
I am closing this since it is not a bug per se. Please, fell free to
reopen it if you think this is inaccurate or more information to confirm
it is a bug.
Cheers,
-- Santiago
signature.asc
Description: PGP signature
--- End Message ---