You are not logged in.
I run Arch in VirtualBox. After sleep the network connection is no longer working, although the host's connection still works. I need some some help.
Probing I get the following:
$ networkctl
WARNING: systemd-networkd is not running, output will be incomplete.
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback n/a unmanaged
2 enp0s3 ether n/a unmanaged
2 links listed.
$ networkctl status
WARNING: systemd-networkd is not running, output will be incomplete.
State: n/a
Address: fe80::59be:de3a:c2a7:383d on enp0s3
$ systemctl status systemd-networkd systemd-resolved
systemd-networkd.service - Network Service
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; vendor preset:
Active: inactive (dead)
Docs: man:systemd-networkd.service(8)
systemd-resolved.service - Network Name Resolution
Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; disabled; vendor preset:
Active: inactive (dead)
Docs: man:systemd-resolved.service(8)
http://www.freedesktop.org/wiki/Software/systemd/resolved
http://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-man
http://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
So I tried restaring systemd-networkd. State then became degraded:
$ sudo systemctl restart systemd-networkd
$ networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 enp0s3 ether degraded unmanaged
2 links listed.
$ networkctl status
State: degraded
Address: fe80::59be:de3a:c2a7:383d on enp0s3
$ systemctl status systemd-networkd systemd-resolved
systemd-networkd.service - Network Service
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; vendor preset:
Active: active (running) since mån 2016-08-22 11:01:06 CEST; 34s ago
Docs: man:systemd-networkd.service(8)
Main PID: 825 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 4915)
CGroup: /system.slice/systemd-networkd.service
└─825 /usr/lib/systemd/systemd-networkd
aug 22 11:01:06 mycomp systemd[1]: Starting Network Service...
aug 22 11:01:06 mycomp systemd-networkd[825]: enp0s3: Gained IPv6LL
aug 22 11:01:06 mycomp systemd-networkd[825]: Enumeration completed
aug 22 11:01:06 mycomp systemd[1]: Started Network Service.
systemd-resolved.service - Network Name Resolution
Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; disabled; vendor preset:
Active: inactive (dead)
Docs: man:systemd-resolved.service(8)
http://www.freedesktop.org/wiki/Software/systemd/resolved
http://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-man
http://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Here are excerpts from dmsg:
$ dmesg | grep -E 'eth|enp0'
[ 5.139249] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 08:10:27:XX:XX:XX
[ 5.139261] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
[ 5.144399] e1000 0000:00:03.0 enp0s3: renamed from eth0
[ 5.240960] IPv6: ADDRCONF(NETDEV_UP): enp0s3: link is not ready
[ 5.242212] e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ 5.242625] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s3: link becomes ready
[ 73.470672] e1000: enp0s3 NIC Link is Down
[ 77.482455] e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ 168.499737] e1000: enp0s3 NIC Link is Down
[ 172.517555] e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
I think the Link Up at the end is because I put it to sleep twice. The first time it didn't lose the connection.
For completeness, here is what it looks like at startup when the connection works:
$ networkctl
WARNING: systemd-networkd is not running, output will be incomplete.
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback n/a unmanaged
2 enp0s3 ether n/a unmanaged
2 links listed.
$ networkctl status
WARNING: systemd-networkd is not running, output will be incomplete.
State: n/a
Address: 192.168.43.45 on enp0s3
fe80::59be:de3a:c2a7:383d on enp0s3
Gateway: 192.168.43.1 (LONGCHEER TELECOMMUNICATION LIMITED) on enp0s3
$ systemctl status systemd-networkd systemd-resolved
systemd-networkd.service - Network Service
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-networkd.service(8)
systemd-resolved.service - Network Name Resolution
Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-resolved.service(8)
http://www.freedesktop.org/wiki/Software/systemd/resolved
http://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
http://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Interestingly systemd-networkd is not running.
Offline
networkd isn't started in the first output, so why REstarting? Try only to start it.
Maybe the IP is set by dhcpcd. Try it.
Last edited by akarvi (2016-08-22 18:03:12)
aka
Offline
It appears that you are using Bridge mode on your VM. This means that your guest has access to the physical network interface and will obtain an address from your LAN's router. This is fine, but I'll bet the problem is that you are losing that binding when you sleep and it is not being restored.
Can you use NAT instead? Provided you are not running any services to which other computers to to initiate connections (like a webserver) there really is not a need for bridge mode. Try shutting down the VM and changing the networking method to NAT. Now your VM will see a virtual LAN that exists only between itself and the VM host software. The VM host software provides the DHCP server and will assign an address in the 10.x,x.x space. When the VM attempts to contact something out of the 10.x.x.x space, it will provide NAT forwarding to the physical interface. I suspect this will be more robust where it comes to the system sleeping.
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