Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static ip regression #3428

Closed
tim-moody opened this issue Nov 22, 2022 · 4 comments
Closed

static ip regression #3428

tim-moody opened this issue Nov 22, 2022 · 4 comments
Labels
Milestone

Comments

@tim-moody
Copy link
Contributor

Expected behavior and actual behavior:

In the past I have set a static ip address in Admin Console, saved, and ICO and got a static IP. Today this resulted in a dynamic ip.

The details are in http://sprunge.us/kdrMiI

I also tried running iiab-networking

The details are in http://sprunge.us/Y2Rdcy

@holta
Copy link
Member

holta commented Nov 23, 2022

@jvonau clarified that IIAB networking should today work on Ubuntu 22.04 in much same way as on 20.04.

The reason is that Netplan become "authoritative" during the 2 years between Ubuntu 18.04 (almost 5 years ago now) and Ubuntu 20.04 (31 months ago) — i.e. Netplan has not changed much since.

Still, in contrast with the pre-Netplan era, it sounds like there are a growing number of situations where customizing networking on Ubuntu benefits substantially from (or might possibly require ?) getting to know Netplan, before installing IIAB.

In any case, let's all do our best to document Common Customizations that are attainable and realistic, in places like:

Tangentially related:

@holta holta added the question label Nov 23, 2022
@holta holta added this to the 8.0 milestone Nov 23, 2022
@jvonau
Copy link
Contributor

jvonau commented Nov 24, 2022

Tim, 2:14 PM
I set the following:
gui_desired_network_role: Appliance
gui_static_wan: True
gui_static_wan_ip: 192.168.3.170
gui_static_wan_netmask: 255.255.255.0
gui_static_wan_gateway: 192.168.3.1
gui_static_wan_nameserver: 192.168.3.1
did ICO but still got dhcp ip address

Jerry 4:59 PM
IIAB--------------------------------------------------------------------------
-rw-r--r-- 1 root root 118 Nov 20 18:34 /etc/netplan/00-installer-config.yaml
...ITS LAST 100 LINES FOLLOW...
# This is the network config written by 'subiquity'
network:
ethernets:
enp88s0:
dhcp4: true
version: 2

Jerry 5:06 PM
hostapd_install: False but it was installed
There never was a hostapd_install option, If you want to omit hostapd one would have to skip installing network altogether with 'network_install: False' of course that would force the use of 'network_enabled: False' also.

Tim, 5:08 PM
There never was a hostapd_install option
OK

Tim, 7:04 AM
on the current demo machine:
root@iiab-me:~# cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
enp0s25:
dhcp4: true
version: 2
root@iiab-me:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether b8:ae:ed:78:9e:dc brd ff:ff:ff:ff:ff:ff
inet 192.168.5.170/24 brd 192.168.5.255 scope global dynamic enp0s25
valid_lft 71448sec preferred_lft 71448sec
inet6 fe80::baae:edff:fe78:9edc/64 scope link
valid_lft forever preferred_lft forever

Jerry 7:09 AM
What are you suggesting?

Canoe, 7:11 AM
IIAB's Netplan tips are a bit more organized than a few weeks ago:
https://github.com/iiab/iiab/wiki/IIAB-Networking > Common Customizations -> 10. Netplan
IIAB Networking · iiab/iiab Wiki
https://github.com

Tim, 7:17 AM
I'm suggesting that I made no changes to netplan on either machine and on the old machine configuring for static ip worked even though it looks like it did not in the netplan file. I'm saying that on the new machine I did not get the expected network config from iiab.

Jerry 7:19 AM
What did the 'old' machine start out as? 22.04 from the start or was it upgraded from an earlier version?

Tim, 7:20 AM
'old machine' is and was ub 20.04
both are bare metal installs

Jerry 7:21 AM
with the difference being the 'improvements' made to netplan between the 2 releases.

Tim, 7:23 AM
So iiab does not support ub22.04?

Jerry, 7:28 AM
sure does but is kind of neutered at the request of Mr Holt, where there is this notion that a user can plug/unplug the WAN at will without changing the intended use of the wired device. Just matching the behaviour of RaspiOS as close as possible.

Tim, 7:29 AM
on another tack I did not set wan_ip, but rather gui_static_wan_ip through admin cons
btw I have no /etc/network/interfaces.d/iiab or /etc/dhcpcd.conf

Jerry 7:33 AM
So what? it is working as Mr Holt intended, the wired device is ready to be use as a dhcp client

Jerry 7:33 AM
btw I have no /etc/network/interfaces.d/iiab or /etc/dhcpcd.conf
Tim Moody, Today at 7:32 AM
Why would you? You are running Ubuntu not RasPiOS

Canoe, 7:34 AM
Is there really a change from 20.04 to 22.04? What is that change if so?

Jerry 7:36 AM
the difference being 20.04 just recorded the 'as installed state' with 22.04 the yaml files becomes authoritative.

Canoe, 7:37 AM
Is this related to #3385 (comment) ?

Jerry 7:37 AM
yes

Tim, 7:38 AM
sorry. I misspoke. I now think static ip didn't work on the old machine either and I went with a dhcp issued static ip. I have had it work on vms, however.

Canoe, 7:40 AM
the difference being 20.04 just recorded the 'as installed state' with 22.04 the yaml files becomes authoritative.
Can you put a sentence or 2 in https://github.com/iiab/iiab/wiki/IIAB-Networking#10-netplan making this as clear as we can?

Jerry 7:41 AM
with difference being the yaml file having a different name perhaps

Canoe, 7:42 AM
Or do we need to investigate first.

Tim, 7:43 AM
https://wiki.iiab.io/go/FAQ#How_do_I_set_a_static_IP_address? has different variable names than the gui ones that used to work. do the gui ones no longer work?
FAQ - IIAB
https://wiki.iiab.io
(it says rpi only)

Jerry 7:44 AM
If one setup static ip addressing (or used wifi) during the initial install of ubuntu that would of been what is recorded in /etc/netplan/
Not sure if the FAQ is accurate, there are lots of references to OSs that are no longer supported.

Jerry 8:03 AM
'subiquity' still fails to add 'optional' PR 1634 and the RPi images use 50-cloud-init.yaml as the (yaml) file name that is one file the networking code deals with.

Canoe, 8:46 AM
https://wiki.iiab.io/go/FAQ#How_do_I_set_a_static_IP_address%3F should remain generally very accurate:
\1) Its explanation of /etc/dhcpcd.conf is not relevant to Ubuntu of course:
https://github.com/iiab/iiab/blob/master/roles/network/templates/network/dhcpcd.conf.j2#L71-L88
\2) If 22.04 is imposing new Netplan requirements on people going down certain roads (customizing networking) we need to understand that better & document that.
iiab-network "runs but does not add Ethernet-connected WiFi AP hotspot" on Ubuntu 22.04 Server NUC (22.04 Desktop untested) · Issue #3385 · iiab/iiab
https://github.com

Tim, 9:06 AM
a top level table that shows OS and network control mechanism: netplan, NM, systemd, ?other would be helpful

Jerry 9:10 AM
There is a link to the upstream netplan docs that point directly to: https://ubuntu.com/server/docs/network-configuration
Network - Configuration | Ubuntu
https://ubuntu.com

Canoe, 9:16 AM
a top level table that shows OS and network control mechanism: netplan, NM, systemd, ?other would be helpful
Tim Moody, Today at 9:06 AM
The next release of Raspberry Pi OS will change a lot. They've announced that NetworkManager will essentially be mandatory. I don't know if this will apply to both "Lite" as well as "with desktop."
Whatever they've decided, it sounds like it's very few months away ("the very next release" they say, so possibly just a few weeks away).
https://ubuntu.com/server/docs/network-configuration
Jerry Vonau, Today at 9:10 AM
Definitely a useful doc. Possibly we should highlight that more prominently,
Right now it's mentioned within https://github.com/iiab/iiab/wiki/IIAB-Networking > Common Customizations > 10. Netplan.
IIAB Networking · iiab/iiab Wiki
https://github.com

Tim, 9:22 AM
I thought we don't change the netplan config on ubuntu

Jerry 9:25 AM
Then why would you expect the static addressing to work?

Tim, 9:25 AM
because I have only learned this from the current conversation. when I ran the config I expected the iiab would configure whatever was the network controller for a supported os
I now understand that for ub22 this is not the case

Jerry 9:28 AM
We could, but that is not what was wanted 3-4 years ago..

Tim, 9:29 AM
3 - 4 years ago iiab was not responsible for configuring the network?

Jerry 9:33 AM
yes, but much of the extended functionality has been neutered to support the notion that a user can plug/unplug the WAN at will without changing the intended use of the wired device as per Mr Holt desire
netplan still is buggy and requires an interactive console session
to use 'try' or 'apply'
or that might if been fixed in the last 4 years since 18.04 was released..

Canoe, 9:38 AM
A week ago I wrote up what Jerry told me applies to Raspberry Pi OS only:
IIAB intentionally does not support attaching Wi-Fi Access Points or Ethernet Routers to Raspberry Pi OS. The reason is that field implementers prefer hassle-free Internet using ad hoc Ethernet cables (e.g. from the Raspberry Pi IIAB to any nearby/live cablemodem). If you must attach a Wi-Fi device to your Raspberry Pi IIAB using an Ethernet cable, consider installing 64-bit Ubuntu Server instead of Raspberry Pi OS from the beginning, before you install IIAB.
https://github.com/iiab/iiab/wiki/IIAB-Networking > Common Customizations > 9. Optionally, Attach a Wi-Fi Access Point or Ethernet Router (LAN Side)
Today is the 1st time I've heard that this applies to other OS's than Raspberry Pi OS.
IIAB Networking · iiab/iiab Wiki
https://github.com

Tim, 9:43 AM
what you just wrote is completely irrelevant to my problem

@jvonau
Copy link
Contributor

jvonau commented Nov 24, 2022

Today is the 1st time I've heard that this applies to other OS's than Raspberry Pi OS.

I have to call BS on this one, #3330 (comment)

@holta holta modified the milestones: 8.0, 8.1 Dec 22, 2022
@holta holta modified the milestones: 8.1, 8.2 Jan 1, 2023
@tim-moody
Copy link
Contributor Author

Don't think there's anything more to add to this

@holta holta modified the milestones: 8.2, 8.1 Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants