我正在努力使用服务器 18.04 上的 wlan。
这是我的01-netcfg.yaml:
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
dhcp4: yes
optional: true
enp3s0:
dhcp4: no
optional: true
enp4s0:
dhcp4: no
optional: true
wifis:
wlp1s0:
optional: true
dhcp4: no
dhcp6: no
access-points:
"SSID":
password: "SSID_pwd"
bridges:
br0:
optional: true
- enp3s0
- enp4s0
- wlp1s0
dhcp4: no
addresses: [10.11.12.1/24]
routes:
- to: 0.0.0.0
via: 10.11.12.1
metric: 100
nameservers:
addresses: [8.8.8.8,8.8.4.4]
我用
netplan generate
其次netplan apply
配置没有错误
这是 networkctl 和 service systemd-networkd status 之后的屏幕
#networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 enp2s0 ether routable configured
3 enp3s0 ether no-carrier configuring
4 enp4s0 ether no-carrier configuring
5 wlp1s0 wlan no-carrier failed
6 br0 ether no-carrier configuring
#service systemd-networkd status:
● systemd-networkd.service - Network Service
Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled-runtime; vendor preset: enabled)
Active: active (running) since Tue 2019-01-29 13:11:00 CET; 21min ago
Docs: man:systemd-networkd.service(8)
Main PID: 672 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 4642)
CGroup: /system.slice/systemd-networkd.service
└─672 /lib/systemd/systemd-networkd
Jan 29 13:11:00 3rdeye systemd-networkd[672]: enp2s0: IPv6 successfully enabled
Jan 29 13:11:00 3rdeye systemd-networkd[672]: wlp1s0: Could not join netdev: Operation not supported
Jan 29 13:11:00 3rdeye systemd-networkd[672]: wlp1s0: Failed
Jan 29 13:11:00 3rdeye systemd-networkd[672]: enp4s0: IPv6 successfully disabled
Jan 29 13:11:00 3rdeye systemd-networkd[672]: enp3s0: IPv6 successfully disabled
Jan 29 13:11:03 3rdeye systemd-networkd[672]: enp2s0: Gained carrier
Jan 29 13:11:05 3rdeye systemd-networkd[672]: enp2s0: Gained IPv6LL
Jan 29 13:11:06 3rdeye systemd-networkd[672]: enp2s0: DHCPv4 address 10.10.10.149/24 via 10.10.10.1
Jan 29 13:11:06 3rdeye systemd-networkd[672]: enp2s0: Configured
Jan 29 13:11:06 3rdeye systemd-networkd[672]: enp2s0: DHCPv6 address fdd1:f5cd:9b6a::a32/128 timeout preferred -1
到目前为止,我还没有找到任何关于如何让 wifi 工作的解决方案,也没有找到界面设置中存在什么问题
请指教
谢谢
答案1
尝试将此作为起点。调整静态地址以适应您的特定环境。
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
dhcp4: yes
optional: true
enp3s0:
optional: true
enp4s0:
optional: true
wifis:
wlp1s0:
access-points:
"SSID":
password: "SSID_pwd"
bridges:
br0:
interfaces:
- enp3s0
addresses: [10.11.12.2/24]
routes:
- to: 0.0.0.0
via: 10.11.12.1
metric: 100
nameservers:
addresses: [8.8.8.8,8.8.4.4]
br1:
interfaces:
- enp4s0
addresses: [10.11.12.3/24]
routes:
- to: 0.0.0.0
via: 10.11.12.1
metric: 100
nameservers:
addresses: [8.8.8.8,8.8.4.4]