0

我正在尝试在 Linux 上使用 dnsmasq 作为 wifi 接入点。Windows 7 和 Android 智能手机可以很好地连接到 Linux 系统,但我的 iPhone 不能。Windows 和 iPhone 都可以使用 wpa_supplicant 进行身份验证,但问题是 iPhone 永远不会获得 IP 地址。

我的 dnsmasq.conf 配置文件非常简单:

# Only listen for DHCP on wlan0
interface=wlan0 
# Create a dhcp range on your /24 wlan0 network with a lease time
dhcp-range=192.168.1.6,192.168.1.15,255.255.255.0,5m
# Configure DHCP        
dhcp-option=3
dhcp-option=6
# Be authoritative with Windows 
dhcp-authoritative

dnsmasq 调试日志为 Windows 显示了这一点,您可以看到它是成功的:

dnsmasq: started, version 2.65 cachesize 150
dnsmasq: compile time options: no-IPv6 GNU-getopt DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack
dnsmasq-dhcp: DHCP, IP range 192.168.1.6 -- 192.168.1.15, lease time 5m
dnsmasq: failed to access /etc/resolv.conf: No such file or directory
dnsmasq: failed to load names from /etc/hosts: No such file or directory
dnsmasq-dhcp: DHCPREQUEST(wlan0) 192.168.1.14 24:77:03:2b:79:20 
dnsmasq-dhcp: Ignoring domain global.tektronix.net for DHCP host name PC-MSP-183B
dnsmasq-dhcp: DHCPACK(wlan0) 192.168.1.14 24:77:03:2b:79:20 PC-MSP-183B
dnsmasq-dhcp: DHCPINFORM(wlan0) 192.168.1.14 24:77:03:2b:79:20 
dnsmasq-dhcp: DHCPACK(wlan0) 192.168.1.14 24:77:03:2b:79:20 PC-MSP-183B

但是,它为 iPhone 显示了这一点:

dnsmasq: started, version 2.65 cachesize 150
dnsmasq: compile time options: no-IPv6 GNU-getopt DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack
dnsmasq-dhcp: DHCP, IP range 192.168.1.6 -- 192.168.1.15, lease time 5m
dnsmasq: failed to access /etc/resolv.conf: No such file or directory
dnsmasq: failed to load names from /etc/hosts: No such file or directory
dnsmasq-dhcp: DHCPREQUEST(wlan0) 192.168.1.15 84:38:35:df:5f:c2 
dnsmasq-dhcp: DHCPACK(wlan0) 192.168.1.15 84:38:35:df:5f:c2 iPhone
dnsmasq-dhcp: DHCPREQUEST(wlan0) 192.168.1.15 84:38:35:df:5f:c2 
dnsmasq-dhcp: DHCPACK(wlan0) 192.168.1.15 84:38:35:df:5f:c2 iPhone

它就坐在那里!

有什么建议或帮助吗?谢谢!

4

1 回答 1

1

如果您删除以下选项,它适用于 iPhone:

dhcp-option=3

注释掉,iPhone可以连接。

于 2013-07-19T16:06:44.523 回答