resolv.conf 和 dnsmasq 的问题

resolv.conf 和 dnsmasq 的问题

我正在尝试配置两个接口,eth0 连接到具有互联网的网络并且正在运行,并且在 eth1 中我尝试配置本地网络,通过交叉以太网连接到另一台计算机(主机 b)(我不希望这个本地网络有互联网),这是我在 /etc/network/interface 中所拥有的:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
      address 192.168.1.253
      netmask 255.255.255.0
      gateway 192.168.1.154
      dns-nameservers 10.10.0.10

auto eth1
iface eth1 inet static
      address 192.168.100.1
      netmask 255.255.255.0

我想使用 dnsmasq 通过 eth1 为本地网络中的主机 b 提供网络基础设施,这是我在 dnsmasq.conf 中的内容:

no-resolv
dhcp-host=02:00:01:02:02:08,192,168,100,2
dhcp-option=17,192.168.100.1:/srv/hostb_boot/etch
dhcp-boot=uImage
enable-tftp
tftp-root=/srv/hostb_boot/boot
dhcp-authoritative
interface=eth1
bind-interface
listen-address=127.0.0.1

当我让 /etc/init.d/dnsmasq restart 时,它不起作用。我已让 sudo service network-manager stop(并且 networkmanger 运行也不起作用)但不确定 resolvconf 程序或 DHCP 客户端是否可能覆盖了某些内容。这是我在 /etc/resolvconf/interface-order 中所拥有的:

#interface-order(5)
eth*
lo.dnsmasq
lo.inet*
lo.pdnsd
lo.!(pdns|pdns-recursor)
lo
tun*
tap*
hso*
em+([0-9])?(_+([0-9]))*
p+([0-9])p+([0-9])?(_+([0-9]))*
ath*

在dhclient.conf中:

option rfc3442-classless-static-route code 121 =array of unsigned integer 8;
send host-name"<hostname>"
request subnet-mask,broadcast-address,time-offset,routers, domain-name,doman-name-servers,domain-search,host-name,rfc3442-classless-static-route, ntp-servers, dhcp6.domain-search, dhcp6.fqdn,dhcp6.name-servers,dhcp6.sntp-servers;

我不确定我是否必须禁用某些东西才能使其正常工作,或者我是否做错了什么。这也是我在 /etc/resolv.conf 中所拥有的

nameserver 10.10.0.10 (in red)
nameserver 127.0.0.1

如果有人能帮忙我将不胜感激。

相关内容