我有两个使用两个DD-WRT AP连接在一起的子网-远程AP处于客户端路由模式,因此它有一个单独的子网,其IP为192.168.2.1/24和192.168.0.5/24。本地AP处于AP模式远程AP的DD-WRT DHCP设置处于转发模式
我在IP 192.168.0.2/24的第一个子网中设置了DNSMASQ,它也是第二个子网的DHCP服务器-这可行,我的远程客户端获得了正确的路由器。DNSMasq机器可以ping通第二个子网中的PC,反之亦然,我也可以从第一个子网中的PC到第二个子网中的PC进行RDP-因此,在我看来,第一到第二个子网中的大多数通信是工作中
我的问题是DNSMasq不会将DNS答复发送到第二个子网-它确实可以工作到第一个子网。有人可以建议原因吗?
需要注意的一件事是,第二个网络的路由位于网关设备(192.168.0.1)上,但我发现它丢弃了许多数据包-因此,每个第一个子网设备都为添加到第二个子网的本地静态路由它。
route add 192.168.2.0 mask 255.255.255.0 192.168.0.5
由于目前的问题,我目前尚未测试DHCP分配的路由
DNSMASQ配置
# Configuration file for dnsmasq.
domain-needed
bogus-priv
addn-hosts=/etc/dnsmasq.hosts
# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. This option only affects forwarding, SRV records originating for dnsmasq (via srv-host= lines) are not
# suppressed by it.
filterwin2k
dhcp-range=set:house,192.168.0.1,192.168.0.254,infinite
dhcp-range=set:backyard,192.168.2.1,192.168.2.254,infinite
# Change this line if you want dns to get its upstream servers from somewhere other that /etc/resolv.conf
resolv-file=/var/run/dnsmasq/resolv.conf
# server=61.9.134.49
# server=61.9.133.193 setup the default gateway
dhcp-option=tag:house,option:router,192.168.0.1
dhcp-option=tag:backyard,option:router,192.168.2.1
# option 42?
dhcp-option=option:ntp-server,192.168.0.2
expand-hosts
domain=wilson.lan
dhcp-range=192.168.0.100,192.168.0.150,12h
dhcp-range=192.168.2.100,192.168.2.150,255.255.255.0,12h
# DO NOT Set The route to that network Done on Gateway
#dhcp-option=121,192.168.2.0/24,192.168.0.5
#Send microsoft-specific option to tell windows to release the DHCP lease when it shuts down. Note the "i" flag,
# to tell dnsmasq to send the value as a four-byte integer - that's what microsoft wants. See
# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true
dhcp-option=vendor:MSFT,2,1i
# Set the DHCP server to authoritative mode. In this mode it will barge in and take over the lease for any client
# which broadcasts on the network, whether it has a record
# of the lease or not. This avoids long timeouts when a machine wakes up on a new network.
# DO NOT enable this if there's the slightest chance that you might end up
# accidentally configuring a DHCP server for your campus/company accidentally.
# The ISC server uses the same option, and this URL provides more information:
# http://www.isc.org/files/auth.html
dhcp-authoritative
# Log lots of extra information about DHCP transactions.
log-dhcp
我还在第二个子网中尝试了8.8.8.8版本的nslookup,并且有效
—
Ross