[問題] 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