hei*_*lli 5 wireless-access-point netplan
正如标题所述:我正在寻找有关如何使用 netplan 设置接入点的说明,包括在 eth0 和 wlan0 之间设置桥接。DHCP 服务器将是我的路由器,系统通过 eth0 连接到它。我正在运行 Ubuntu Server 18.04。(我曾经可以使用 ifupdown 和 hostapd 来执行以下示例,但现在我需要继续使用 netplan ..)
由于我远非专家,说明越详细越好......
这是对我有用的序列(n 模式中的 WiFi,静态 IP):
apt-get update,apt-get install hostapdsudo systemctl unmask hostapd,sudo systemctl enable hostapdRun Code Online (Sandbox Code Playgroud)# the interface used by the AP interface=wlan0 driver=nl80211 # "g" simply means 2.4GHz band hw_mode=g # the channel to use channel=1 # limit the frequencies used to those allowed in the country ieee80211d=1 # the country code country_code=DE # 802.11n support ieee80211n=1 # QoS support wmm_enabled=1 # the name of the AP ssid=yourSSID macaddr_acl=0 # 1=wpa, 2=wep, 3=both auth_algs=1 ignore_broadcast_ssid=0 # WPA2 only wpa=2 wpa_passphrase=yourpassphrase wpa_key_mgmt=WPA-PSK #wpa_pairwise=TKIP rsn_pairwise=CCMP
DAEMON_CONF="/etc/hostapd/hostapd.conf"(测试以验证 AP 是否可见,即在手机上:sudo service hostapd start;然后sudo service hostapd stop再次继续设置)
Run Code Online (Sandbox Code Playgroud)network: version: 2 renderer: networkd ethernets: # My Ethernet adapter eth0: # For some reason it seems I must specify at least something here. dhcp4: no # My Wi-Fi adapter wlan0: dhcp4: no bridges: br0: interfaces: - eth0 - wlan0 # Using a static IP for this box. addresses: - 192.168.1.xxx/24 gateway4: 192.168.1.x nameservers: addresses: [1.1.1.1,1.0.0.1]
sudo netplan generate,sudo netplan apply| 归档时间: |
|
| 查看次数: |
5397 次 |
| 最近记录: |