Cannot disable dhcp for network interface

Kernels & Hardware, configuring network, installing services

Re: Cannot disable dhcp for network interface

Postby Head_on_a_Stick » 2019-07-24 17:39

theblueplll wrote:Did anyone metnion removing anything that has to do with dhcp and any network managers?

That wouldn't tell us what caused the OP's problem.

theblueplll wrote:Should have been the first thougt instead of 2 pages of confusing the op and interrogation about the entire system.

No, we just need to see which unit files are enabled. I wonder how we would do that... *cough*

shep wrote:Systemd/udev are now the default for bringing up a connection.

Only in CoreOS ;)
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Cannot disable dhcp for network interface

Postby theblueplll » 2019-07-25 01:22

Head_on_a_Stick


Alright try not to be too rough on me I misunderstood a few things and had a few drinks last night when I posted that. :lol:
theblueplll
 
Posts: 154
Joined: 2019-04-29 01:17

Re: Cannot disable dhcp for network interface

Postby deadwax » 2019-07-26 20:33

Sorry for the delay, parenting and real work took priority.

Systemd/udev are now the default for bringing up a connection.


As I've noted there is nothing in /etc/systemd/network As in, really, really nothing.
Code: Select all
$ ls -laF
total 8
drwxr-xr-x 2 root root 4096 May 25 06:58 ./
drwxr-xr-x 5 root root 4096 Jul 22 09:09 ../


Check which services are enabled:


Code: Select all
#systemctl list-unit-files --state=enabled
UNIT FILE                                  STATE
anacron.service                            enabled
apparmor.service                           enabled
autovt@.service                            enabled
avahi-daemon.service                       enabled
bluetooth.service                          enabled
connman-wait-online.service                enabled
connman.service                            enabled
console-setup.service                      enabled
cron.service                               enabled
dbus-fi.w1.wpa_supplicant1.service         enabled
dbus-org.bluez.service                     enabled
dbus-org.freedesktop.Avahi.service         enabled
dbus-org.freedesktop.ModemManager1.service enabled
dbus-org.freedesktop.timesync1.service     enabled
dundee.service                             enabled
getty@.service                             enabled
haveged.service                            enabled
keyboard-setup.service                     enabled
ModemManager.service                       enabled
networking.service                         enabled
ofono.service                              enabled
rsyslog.service                            enabled
ssh.service                                enabled
sshd.service                               enabled
syslog.service                             enabled
systemd-timesyncd.service                  enabled
udisks2.service                            enabled
wpa_supplicant.service                     enabled
avahi-daemon.socket                        enabled
remote-fs.target                           enabled
anacron.timer                              enabled
apt-daily-upgrade.timer                    enabled
apt-daily.timer                            enabled
logrotate.timer                            enabled
man-db.timer                               enabled

35 unit files listed.
deadwax
 
Posts: 14
Joined: 2019-07-22 08:54

Re: Cannot disable dhcp for network interface

Postby Head_on_a_Stick » 2019-07-27 11:00

OK, so conman is enabled as well as networking.service and it seems to be controlling the interface (as reinob noted earlier). Not sure why wpa_supplicant.service is enabled though, that might cause conflicts for a wireless connection.

So if we could see the outputs requested by reinob in their last post that would clarify exactly which addresses are assigned to which devices.
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Cannot disable dhcp for network interface

Postby deadwax » 2019-07-27 11:25

Ok, during the last two boots it has not brought up the static address. I don't know why, I shutdown immediately after checking the enabled services this morning at which point the static address had come up normally.

So at the moment

Code: Select all
~$ 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
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 3c:d9:2b:02:96:cc brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.108/24 brd 192.168.1.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::3ed9:2bff:fe02:96cc/64 scope link
       valid_lft forever preferred_lft forever


ifconfig not installed.

And https://pastebin.com/Dndsvpz5 for journalctl
deadwax
 
Posts: 14
Joined: 2019-07-22 08:54

Re: Cannot disable dhcp for network interface

Postby Head_on_a_Stick » 2019-07-27 11:28

Try this
Code: Select all
# systemctl stop conman
# systemctl restart networking
# ifdown enp2s0
# ifup enp2s0

Then post any error messages and also the output of
Code: Select all
ip a
ip r

Thanks!
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Cannot disable dhcp for network interface

Postby reinob » 2019-07-27 14:07

@deadwax,

Thanks for the log. Apparently you get your static (.15) address at the beginning, and then later connman assigns the dynamic one (.108).

Unfortunately connman doens't seem to log to the journal. In any case, if you only want a static address you don't need any connection manager, so after testing what @Head_on_a_Stick has recommended, you should

Code: Select all
# systemctl disable connman


Good luck.
reinob
 
Posts: 699
Joined: 2014-06-30 11:42

Re: Cannot disable dhcp for network interface

Postby deadwax » 2019-07-27 23:25

The last two posts from Head_on_a_Stick and reinob result in more sensible behaviour, with the dynamic address disappearing.

I am not certain why connman was running or why it ignores the interfaces config. Only thing I can think of for the former is that it is brought in by the LXQT desktop packages (selected at installation by tasksel). The default beahviour doesn't seem ideal or very clear, I'm not certain anyone would be happy to accept this as a bug report though. Happy to be corrected on that.
deadwax
 
Posts: 14
Joined: 2019-07-22 08:54

Re: Cannot disable dhcp for network interface

Postby reinob » 2019-07-28 10:35

deadwax wrote:The last two posts from Head_on_a_Stick and reinob result in more sensible behaviour, with the dynamic address disappearing.

I am not certain why connman was running or why it ignores the interfaces config. Only thing I can think of for the former is that it is brought in by the LXQT desktop packages (selected at installation by tasksel). The default beahviour doesn't seem ideal or very clear, I'm not certain anyone would be happy to accept this as a bug report though. Happy to be corrected on that.


I imagine that most people will install either gnome or kde, which would automatically install the network manager, while those installing lxqt automatically get connman, and expect it to work out of the box, i.e. with DHCP.

I guess one could file a bug agaist connman, which should respect /etc/network/interfaces. I think NM does that.

Anyway, happy that your issue is solved :)
reinob
 
Posts: 699
Joined: 2014-06-30 11:42

Previous

Return to System configuration

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable