dnsmasq与iPhone失败

时间:2013-07-17 22:33:28

标签: linux wifi dhcp access-point dnsmasq

我正在尝试在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

它只是坐在那里!

有任何建议或帮助吗?谢谢!

1 个答案:

答案 0 :(得分:0)

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

dhcp-option=3

注释出来,iPhone可以连接。