我有一个Debian服务器与以太网电缆连接到一个网络设备访问点(Wnr2000)。
我希望所有无线连接到接入点的用户都以Debian服务器作为网关。
网具wnr2000不允许我这样做,所以我考虑关闭它的dhcp服务器,并使用dnsmasq (如下面的答案所示)作为dhcp服务器。
我有我的dnsmasq.conf:
expand-hosts
domain=test.com
dhcp-range=192.168.1.40,128.0.1.99,12h
dhcp-option=1,255.255.255.0
dhcp-option=3,192.168.1.100
dhcp-option=6,192.168.1.100我的网络设备具有静态配置: 192.168.1.1,我的Debian服务器是(总是静态的):192.168.1.100
看来我的ip不是由dnsmasq服务器分配的.
怎么啦?
dnsmasq正在运行,这是我的ps aux \ grep dnsmasq:
dnsmasq 2974 0.0 0.1 4732 924 ? S 14:13 0:00 /usr/sbin/dnsma sq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg -old,.dpkg-new
root 20772 0.0 0.1 3540 868 pts/2 S+ 21:13 0:00 grep --color=au to dnsmasq发布于 2013-05-02 11:24:37
据推测,您的客户是通过DHCP从Netgear获得他们的IP地址(因此是网关)。如果禁用网络设备上的DHCP服务器并在RPi上运行它,您将能够指定您希望客户端拥有的任何网关。
发布于 2013-05-02 20:28:09
我的dnsmasq.conf错了(检查ip范围)。
以下是正确的答案:
expand-hosts
domain=test.com
dhcp-range=192.168.1.40,192.168.1.99,12h
dhcp-option=1,255.255.255.0
dhcp-option=3,192.168.1.100
dhcp-option=6,192.168.1.100https://serverfault.com/questions/504425
复制相似问题