You are not logged in.

#1 2016-01-10 08:55:39

apex8
Member
Registered: 2014-03-29
Posts: 60

[SOLVED] Network start up delay

Hi everyone,

I'm have quite an annoying issue with my network configuration and I ran out of ideas, how to fix it. It's a desktop pc with a wired network adapter. When I boot, I find myself on the login screen of the display manager (sddm). I can type in my password an continue logging in.
Anyway it seems that from the moment of entering the display manager I have to wait for about 20 seconds until my network comes up. I would like to fix this.

I'm using NetworkManager via systemd for the network adapter. Furthermore I have a bridge configured to use the network also for my VMs.
Here is a dump of journalctl which shows the delay:

Jan 10 09:34:47 myHost kdeinit5[653]: kscreen.kded: Saving current config to file
Jan 10 09:34:52 myHost kernel: kvmbr0: port 1(enp6s0) entered learning state
Jan 10 09:35:07 myHost kernel: kvmbr0: topology change detected, propagating
Jan 10 09:35:07 myHost kernel: kvmbr0: port 1(enp6s0) entered forwarding state
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  (kvmbr0): link connected
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  Activation (kvmbr0) Beginning DHCPv4 transaction (timeout in 45 seconds)
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  dhclient started with pid 1068
Jan 10 09:35:07 myHost dhclient[1068]: DHCPREQUEST on kvmbr0 to 255.255.255.255 port 67
Jan 10 09:35:07 myHost dhclient[1068]: DHCPACK from 192.168.178.1
Jan 10 09:35:07 myHost NetworkManager[443]: <info>    address 192.168.178.24
Jan 10 09:35:07 myHost NetworkManager[443]: <info>    plen 24 (255.255.255.0)
Jan 10 09:35:07 myHost NetworkManager[443]: <info>    gateway 192.168.178.1
Jan 10 09:35:07 myHost NetworkManager[443]: <info>    server identifier 192.168.178.1
Jan 10 09:35:07 myHost NetworkManager[443]: <info>    lease time 864000
Jan 10 09:35:07 myHost NetworkManager[443]: <info>    nameserver '192.168.178.1'
Jan 10 09:35:07 myHost NetworkManager[443]: <info>    domain name 'router.local'
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  (kvmbr0): DHCPv4 state changed unknown -> bound
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  (kvmbr0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  (kvmbr0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  (kvmbr0): device state change: secondaries -> activated (reason 'none') [90 100 0]
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  NetworkManager state is now CONNECTED_LOCAL
Jan 10 09:35:07 myHost dhclient[1068]: bound to 192.168.178.24 -- renewal in 378747 seconds.
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  NetworkManager state is now CONNECTED_GLOBAL
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  Policy set 'kvmbr0' (kvmbr0) as default for IPv4 routing and DNS.
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  Writing DNS information to /usr/bin/resolvconf
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  (kvmbr0): Activation: successful, device activated.
Jan 10 09:35:07 myHost NetworkManager[443]: <info>  startup complete
Jan 10 09:35:07 myHost dbus[441]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Jan 10 09:35:07 myHost systemd[1]: Starting Network Manager Script Dispatcher Service...
Jan 10 09:35:07 myHost kdeinit5[653]: networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Metered"
Jan 10 09:35:07 myHost dbus[441]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jan 10 09:35:07 myHost systemd[1]: Started Network Manager Script Dispatcher Service.
Jan 10 09:35:09 myHost ntpd[479]: Listen normally on 4 kvmbr0 192.168.178.24:123
Jan 10 09:35:09 myHost ntpd[479]: Listen normally on 5 kvmbr0 [fe80::be5f:f4ff:fe1b:a7f6%3]:123
Jan 10 09:35:09 myHost ntpd[479]: new interface(s) found: waking up resolver
Jan 10 09:35:14 myHost systemd[1]: Time has been changed
Jan 10 09:35:14 myHost systemd[594]: Time has been changed

Can you help me understanding and fixing this issue?

Best Regards
apex

Last edited by apex8 (2016-01-11 17:20:28)

Offline

#2 2016-01-10 17:53:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,209

Re: [SOLVED] Network start up delay

Out of curiosity, Why use NetworkManager for a desktop with a wired connection?   It seems a bit of an overkill; I believe this could be handled more simply by disabling the NetworkManager service and enabling the dhcpcd service.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-01-10 19:06:33

branch
Member
Registered: 2014-03-16
Posts: 209

Re: [SOLVED] Network start up delay

This delay is caused by Spanning Tree Protocol (STP) which is enabled by default to detect and resolve loops in bridged networks. Since your bridge is just for VM's there are unlikely to be loops and you can safely turn this off.

Ideally this can be set through whatever means you are configuring the bridge. If you are setting up the bridge with your own sequence of commands (in a script or systemd unit), the command

brctl stp <BridgeName> off

after creating the bridge but before adding any ports to it should eliminate the delay for the bridge to enter the forwarding state.

Offline

#4 2016-01-10 19:26:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,209

Re: [SOLVED] Network start up delay

Nice catch smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2016-01-11 17:15:18

apex8
Member
Registered: 2014-03-29
Posts: 60

Re: [SOLVED] Network start up delay

branch wrote:

This delay is caused by Spanning Tree Protocol (STP) which is enabled by default to detect and resolve loops in bridged networks. Since your bridge is just for VM's there are unlikely to be loops and you can safely turn this off.

Ideally this can be set through whatever means you are configuring the bridge. If you are setting up the bridge with your own sequence of commands (in a script or systemd unit), the command

brctl stp <BridgeName> off

after creating the bridge but before adding any ports to it should eliminate the delay for the bridge to enter the forwarding state.

This was a nice hint and solved all my problems! smile

Thanks a lot!

Offline

#6 2016-01-11 17:21:26

apex8
Member
Registered: 2014-03-29
Posts: 60

Re: [SOLVED] Network start up delay

ewaller wrote:

Out of curiosity, Why use NetworkManager for a desktop with a wired connection?   It seems a bit of an overkill; I believe this could be handled more simply by disabling the NetworkManager service and enabling the dhcpcd service.

The reason is that I have virtual machines and those get their internet access via the birdge.
BR

Offline

Board footer

Powered by FluxBB