首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如果我关闭了ubuntu,局域网就会停止工作

如果我关闭了ubuntu,局域网就会停止工作
EN

Ask Ubuntu用户
提问于 2018-07-08 17:55:17
回答 3查看 17.7K关注 0票数 6

我是双引导Ubuntu 18.04和Windows 10。如果我关闭我的电脑与Windows,我可以打开它使用WOL。但是,如果我使用Ubuntu关闭它,如果我使用WOL,计算机就不会打开。

有办法解决这个问题吗?

这个答案之后,我尝试了以下操作,但没有成功:

代码语言:javascript
复制
ignacio@ignacio-XPS-8930:~$ ifconfig 
docker0: flags=4163  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:cff:fea4:9a1e  prefixlen 64  scopeid 0x20
        ether 02:42:0c:a4:9a:1e  txqueuelen 0  (Ethernet)
        RX packets 93  bytes 19417 (19.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 173  bytes 29457 (29.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp4s0: flags=4163  mtu 1500
        inet 192.168.86.31  netmask 255.255.255.0  broadcast 192.168.86.255
        inet6 fe80::955b:12c8:20b9:7645  prefixlen 64  scopeid 0x20
        ether d8:9e:f3:85:42:8a  txqueuelen 1000  (Ethernet)
        RX packets 2879  bytes 2068361 (2.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2313  bytes 515874 (515.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 355  bytes 27658 (27.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 355  bytes 27658 (27.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth76213c1: flags=4163  mtu 1500
        inet6 fe80::5c2b:3aff:fea8:d68c  prefixlen 64  scopeid 0x20
        ether 5e:2b:3a:a8:d6:8c  txqueuelen 0  (Ethernet)
        RX packets 93  bytes 20719 (20.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 214  bytes 34037 (34.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4099  mtu 1500
        ether 5c:ea:1d:4c:61:a7  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ignacio@ignacio-XPS-8930:~$ ifconfig enp4s0 | grep "HWaddr" | awk '{print $5}'
ignacio@ignacio-XPS-8930:~$ /sbin/ethtool -s enp4s0 wol g
Cannot get current wake-on-lan settings: Operation not permitted
  not setting wol

我也试着用sudo:

代码语言:javascript
复制
ignacio@ignacio-XPS-8930:~/docker/greta$ sudo /sbin/ethtool -s enp4s0 wol g
[sudo] password for ignacio: 
Cannot get current wake-on-lan settings: Operation not supported
  not setting wol
EN

回答 3

Ask Ubuntu用户

发布于 2018-09-06 19:10:35

我只是在将两台配置正确的机器升级到18.04之后遇到了这个问题。我记得Ubuntu迁移到netplan,并从论坛中的paulgj中找到了一个答案,这使它再次对我起作用。如果现有答案不工作,您可以尝试这样做。

我添加了宏地址匹配行,下面是完整的.yaml文件: dhcp4: version: 2 renderer: networkd ethernet: enp2s0: match: macaddress: 50:e5:49:b3:fc:97 dhcp4: true wakeonlan: true

注意:您需要更改enp2s050:e5:49:b3:fc:97,并使用.yaml扩展将其保存在/etc/netplan/中。我希望在接下来的几周里,这个配置没有禁用任何会困扰我的东西。

编辑:对于台式机,您应该用renderer: NetworkManager替换D9,然后运行sudo netplan apply

票数 5
EN

Ask Ubuntu用户

发布于 2019-07-24 02:30:51

这是一个旧线程,但没有被接受的答案,我的问题也是相似的,只不过是machine双引导MacOS和Ubuntu18.04;在mac暂停上,我可以从Windows 10计算机上WOL;在Ubuntu上挂起任何事情.

我也有:

代码语言:javascript
复制
marcelo@Ubuntu-Macmini:~$ sudo ethtool -s wlp3s0 wol g
[sudo] senha para marcelo: 
Cannot get current wake-on-lan settings: Operation not supported
  not setting wol

因此,我在这个问题做了所有的步骤,更好地解释了这里,但它仍然不起作用;但是我读了这个线程,并且:

  1. sudo lshw -C network *-网络descri o:以太网接口产品: NetXtreme BCM57765千兆位以太网PCIe制作:.L: enp2s0f0 .autonegotiation=on broadcast=yes ***driver=tg3***
  2. 在此之后,知道驱动程序是tg3:sudo gedit /etc/default/acpi-support,我将# Add模块更改到这个列表中,以便将它们保留在内核中,而不是挂起/恢复MODULES_WHITELIST=“到MODULES_WHITELIST=”tg3;在重新启动网络服务之后,它就像一种魅力,但只对魔力包起作用,这很酷;为了提供魔术包,我使用的是从这里改编的Python脚本;我说是因为这个脚本是用于Python2的,我的安装程序是Python3。希望这能帮助到别人。
票数 5
EN

Ask Ubuntu用户

发布于 2018-09-24 13:26:42

@LiveWireBT的回答对我有效。

https://askubuntu.com/a/1072862/874871

不要忘记在更改配置后运行apply命令。

代码语言:javascript
复制
$ sudo netplan apply
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1053302

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档