[问题] DHCP与VirtualBox之问题

楼主: jason860421 (jason)   2014-11-11 00:09:54
各位乡民晚上好,
小弟我在做DHCP时遇到了一些问题,想请教一下各位:
我有一台PC 装着 Fedora 16 (我知道很旧,但是因为某些原因只能用此版本)
上面有两张网卡 分别是eth0 和 eth1
eth0 : 192.168.1.1 / 255.255.255.0
eth1 : 172.16 .1.1 / 255.255.255.0
也建置了DHCP服务 我的dhcpd.conf内容如下:
ddns-update-style none;
default-lease-time 43200;
max-lease-time 86400;
subnet 172.16.1.0 netmask 255.255.255.0 {
option router 176.16.1.1;
option broadcast-address 176.16.1.255;
range 172.16.1.100 172.16.1.200
}
subnet 192.168.1.0 netmask 255.255.255.0 { }
另外透过VirtualBox建立了一个Windows7系统
其中的网络卡是用桥接的,桥接到eth1,IP希望能透过DHCP取得
如果我想的没错,
我希望Windows7能透过DHCP得到172.16.1.100~172.16.1.200这之间的IP
但是实际情形,看了log之后发现,有几行大概是在说
DHCP 发现了 Windows7 透过 eth0 网卡(192.168.1.1) (怎么不是eth1(172.16.1.1)呢?)
之后就有出现没有free lease的错误
于是我把dhcpd.conf中 subnet 192.168.1.0 的部分写 dhcp的设定进去之后:
subnet 192.168.1.0 netmask 255.255.255.0 {
option router 192.168.1.1;
option broadcast-address 192.168.1.255;
range 192.168.1.100 192.168.1.200
}
Windows7 就抓到IP了,不过是192.168.1.0这个subnet的IP
请问是为什么没有透过eth1网卡得到172.16.1.1的IP呢?该怎么解决呢?
另外也有发现有出现类似这样的错误:
dhcpd: No subnet declaration for eth1.
dhcpd: ** Ignoring requests on eth1. If this is not what
dhcpd: you want, please write a subnet declaration
dhcpd: in your dhcpd.conf file for the network segment
dhcpd: to which interface eth1 is attached. **
奇怪的是我确实有设定啊QQ
怎么就不行呢,希望大家可以帮我解惑,谢谢

Links booklink

Contact Us: admin [ a t ] ucptt.com