Bug#875308: linklocal ipv6 addresses in debian-installer netcfg

2024-07-07 Thread Marc Haber
Control: tags -1 minor
thanks

Hi Pascal,

thanks for looking into this again. I can reproduce your results. I
don't know why it didn't work in the tests I did last week.

On Sun, Jul 07, 2024 at 10:54:39AM +0200, Pascal Hambourg wrote:
> So I see no need to append the interface suffix to a link-local IPv6 gateway
> address.

It is still what an experienced IPv6 person will intuitively do and be
confused if the input is rejected.

I think the least that could be done is to document that a link local
address can be used as the gateway without specifying the interface as
it's added automatically.

It would be however nicer to have the Installer just do the right thing
for the common way to write things.

I am downgrading this bug again. Sorry for the noise.

Greetings
Marc



Bug#875308: linklocal ipv6 addresses in debian-installer netcfg

2024-07-07 Thread Pascal Hambourg

On 06/07/2024 at 10:53, Marc Haber wrote:

On Sat, Jul 06, 2024 at 12:09:09AM +0200, Pascal Hambourg wrote:



When entering link local ipv6 addresses with interface suffixes
as gateway during the network configuration in the debian installer,
the installer detects the address to be malformed.


Why would you need to do this ? AFAICS entering the plain link-local IPv6
address without the interface suffix creates the expected default route.


That's a common misconception. Since link local addresses are from the
same network (fe80::/64) on all interfaces, a route pointing to a
link-local address, such as the VERY common fe80::1, is ambiguous and
therefore MUST be written like fe80::1%enp2s0


Not if the interface is specified in the command adding the route. E.g.

# ip route add default fe80::1 dev enp2s0


While we're at it, on a system with more than one interface, does D-I
allow to leave the default gateway field empty?


Yes, but AFAICS the Debian installer netcfg allows to select and 
configure only one "primary" interface, so the question seems irrelevant.


I made a few quick tests with the Debian 12.6 installer in expert mode.

With one interface, just entering fe80::1 in the gateway field produces 
the expected result: "ip -6 route" shows the correct default route via 
fe80::1 on the interface.


With two interfaces, "ip -6 route" show that the default route is 
correctly configured as above on the selected interface. The other 
interface is set down.


In both cases, the expected working /etc/network/interfaces is generated:

iface  inet6 static
address /
gateway fe80::1

So I see no need to append the interface suffix to a link-local IPv6 
gateway address.


The only issue I see is if you enter a DNS IPv6 link-local address: the 
interface suffix is required in /etc/resolv.conf so it should be 
appended there. Additionnally, either netcfg should append it in 
/etc/network/interfaces dns-nameservers, or ifupdown should append it 
when passing the address to resolvconf, or resolvconf should append it 
when generating /etc/resolv.conf.


I did not check the configuration generated for NetworkManager nor other 
supported network managers.




Bug#875308: linklocal ipv6 addresses in debian-installer netcfg

2024-07-06 Thread Marc Haber
On Sat, Jul 06, 2024 at 12:09:09AM +0200, Pascal Hambourg wrote:
> From: Pascal Hambourg 
> Subject: Bug#875308: linklocal ipv6 addresses in debian-installer netcfg
> To: Marc Haber , 875...@bugs.debian.org
> Reply-To: Pascal Hambourg , 875...@bugs.debian.org
> Date: Sat, 6 Jul 2024 00:09:09 +0200
> User-Agent: Mozilla Thunderbird
> 
> > > When entering link local ipv6 addresses with interface suffixes
> > > as gateway during the network configuration in the debian installer,
> > > the installer detects the address to be malformed.
> 
> Why would you need to do this ? AFAICS entering the plain link-local IPv6
> address without the interface suffix creates the expected default route.

That's a common misconception. Since link local addresses are from the
same network (fe80::/64) on all interfaces, a route pointing to a
link-local address, such as the VERY common fe80::1, is ambiguous and
therefore MUST be written like fe80::1%enp2s0 which D-I does not allow.
In theory, on systems with only one interface, this could be omitted but
it would break immediately when a second interface is added.

At the time when the default gateway is entered, we are configuring ONE
interface with its name already known, so D-I would be able to add the
interface by itself automatically, but sadly it not only does not do
this, doing so manually fails the buggy plausibility check that was
implemented.

While we're at it, on a system with more than one interface, does D-I
allow to leave the default gateway field empty?

Greetings
Marc



Bug#875308: linklocal ipv6 addresses in debian-installer netcfg

2024-07-05 Thread Pascal Hambourg

When entering link local ipv6 addresses with interface suffixes
as gateway during the network configuration in the debian installer,
the installer detects the address to be malformed.


Why would you need to do this ? AFAICS entering the plain link-local 
IPv6 address without the interface suffix creates the expected default 
route.




Bug#875308: linklocal ipv6 addresses in debian-installer netcfg

2024-07-05 Thread Marc Haber
Control: severity -1 important
thanks

On Sun, Sep 10, 2017 at 05:02:29PM +0200, Michael Gebhard wrote:
> When entering link local ipv6 addresses with interface suffixes
> as gateway during the network configuration in the debian installer,
> the installer detects the address to be malformed.
> 
> Error message:
> "The IP address you provided is malformed. It should be in the form
> x.x.x.x where each 'x' is no larger than 255 (an IPv4 address), or a
> sequence of blocks of hexadecimal digits separated by colons (an IPv6
> address). Please try again."

This bug is still present in the current installer. Can we please allow
to install Debian in the most common IPv6 network setup in 2024?

Greetings
Marc



Bug#875308: linklocal ipv6 addresses in debian-installer netcfg

2017-09-10 Thread Michael Gebhard
> You redacted your link-local address to be dead:beef::. I suppose what
> you actually mean is one with a fe80:: prefix? (I.e. it'd have been more
> helpful to redact the MAC/actual address.)

No, the scenario this came from is the following:
A server with a public ipv6 address,
A vm on this server with another public ipv6 address,
connected to the outside via a bridge on the server.
Server-side:
ip link add br0 type bridge
ip address add fe80::1 dev br0
ip link set dev br0 up
ip rourte add dead:beef::::1/68 dev br0
VM-side:
set up with virt-manager to use bridge br0
ip a add dead:beef::::1 dev eth0
ip l set dev eth0 up
ip r add default via fe80::1 dev eth0

So fe80::1%eth0 is the address of the bridge seen from the vm,
the redacted address is my vms public ipv6 address.

I admit, not the simplest test setup, but this has no influence
on netcfg not accepting % type addresses

Cheers,
Michael


signature.asc
Description: PGP signature


Bug#875308: linklocal ipv6 addresses in debian-installer netcfg

2017-09-10 Thread Philipp Kern
On 09/10/2017 05:02 PM, Michael Gebhard wrote:
> Package: debian-installer
> Version: 20170615+deb9u1
> 
> When entering link local ipv6 addresses with interface suffixes
> as gateway during the network configuration in the debian installer,
> the installer detects the address to be malformed.
> 
> Error message:
> "The IP address you provided is malformed. It should be in the form
> x.x.x.x where each 'x' is no larger than 255 (an IPv4 address), or a
> sequence of blocks of hexadecimal digits separated by colons (an IPv6
> address). Please try again."
> 
> Preseed file from attempting to use the debian installer with
> its network console to reproduce the error:
> 
> d-i debian-installer/locale string en_US
> d-i keyboard-configuration/xkb-keymap select us
> d-i debconf/priority select critical
> d-i auto-install/enabled boolean true
> d-i netcfg/choose_interface select eth0
> d-i netcfg/disable_dhcp boolean true
> d-i netcfg/get_nameservers string dead:beef::::2
> d-i netcfg/get_ipaddress string dead:beef::::1
> d-i netcfg/get_netmask string :::::
> d-i netcfg/get_gateway string fe80::1%eth0
> d-i netcfg/confirm_static boolean true
> d-i netcfg/get_hostname string somehostname
> d-i netcfg/get_domain string somedomain
> d-i network-console/password password 
> d-i network-console/password-again password 
> 
> Entering the same ip address netmask and gateway manually produces the same 
> error.
> 
> Configuring the same from a shell in the installer with:
> ip a add dead:beef::::1 dev eth0
> ip l set dev eth0 up
> ip r add default via fe80::1 dev eth0
> Produces a functioning network configuration.
> 
> I suggest the debian installer should be able to deal with link local ipv6 
> addresses.

You redacted your link-local address to be dead:beef::. I suppose what
you actually mean is one with a fe80:: prefix? (I.e. it'd have been more
helpful to redact the MAC/actual address.)

Kind regards
Philipp Kern



signature.asc
Description: OpenPGP digital signature


Bug#875308: linklocal ipv6 addresses in debian-installer netcfg

2017-09-10 Thread Michael Gebhard
Package: debian-installer
Version: 20170615+deb9u1

When entering link local ipv6 addresses with interface suffixes
as gateway during the network configuration in the debian installer,
the installer detects the address to be malformed.

Error message:
"The IP address you provided is malformed. It should be in the form
x.x.x.x where each 'x' is no larger than 255 (an IPv4 address), or a
sequence of blocks of hexadecimal digits separated by colons (an IPv6
address). Please try again."

Preseed file from attempting to use the debian installer with
its network console to reproduce the error:

d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select us
d-i debconf/priority select critical
d-i auto-install/enabled boolean true
d-i netcfg/choose_interface select eth0
d-i netcfg/disable_dhcp boolean true
d-i netcfg/get_nameservers string dead:beef::::2
d-i netcfg/get_ipaddress string dead:beef::::1
d-i netcfg/get_netmask string :::::
d-i netcfg/get_gateway string fe80::1%eth0
d-i netcfg/confirm_static boolean true
d-i netcfg/get_hostname string somehostname
d-i netcfg/get_domain string somedomain
d-i network-console/password password 
d-i network-console/password-again password 

Entering the same ip address netmask and gateway manually produces the same 
error.

Configuring the same from a shell in the installer with:
ip a add dead:beef::::1 dev eth0
ip l set dev eth0 up
ip r add default via fe80::1 dev eth0
Produces a functioning network configuration.

I suggest the debian installer should be able to deal with link local ipv6 
addresses.

Cheers,
Michael


signature.asc
Description: PGP signature