路由DHCP設(shè)置,IP規(guī)劃如下:
VLAN10 192.168.10.1 VLAN20 192.168.20.1 VLAN30 192.168.30.1現(xiàn)用一臺(tái)cisco2811路由器來做DCHP服務(wù)器,。
路由DHCP設(shè)置如下:
enable
configure terminal
no iprouting
interface f0/0
ip address 192.168.30.100 255.255.255.0
no shutdown
exit
ip default gateway 192.168.30.1
service DHCP
ip DHCP pool vlan10(此名可隨意更換)
network 192.168.10.0 255.255.255.0 (VLAN10的網(wǎng)段和子網(wǎng)掩碼)
default-router 192.168.10.1(VLAN10的IP地址)
dns-server 61.134.1.4 218.30.19.40 (陜西省DNS)
lease 8(有效期8天)
exit
service DHCP
ip DHCP pool vlan20(此名可隨意更換)
network 192.168.20.0 255.255.255.0 (VLAN10的網(wǎng)段和子網(wǎng)掩碼)
default-router 192.168.20.1 (VLAN20的IP地址)
dns-server 61.134.1.4 218.30.19.40 (陜西省DNS)
lease 8(有效期8天)
exit
service DHCP
ip DHCP pool vlan30(此名可隨意更換)
network 192.168.10.0 255.255.255.0 (VLAN10的網(wǎng)段和子網(wǎng)掩碼)
default-router 192.168.30.1 (VLAN30的IP地址)
dns-server 61.134.1.4 218.30.19.40 (陜西省DNS)
lease 8(有效期8天)
exit
以上就是路由DHCP設(shè)置,,企業(yè)有幾個(gè)VLAN就要做幾個(gè)DHCP池,畫橫線處可根據(jù)企業(yè)的IP地址另行修改,。
還有要在三層交換上做DHCP中繼,,不做的化就只有DHCP所在的VLAN可以自動(dòng)獲到IP地址,其他VLAN是獲不到的喲!
在上講我們說到了如何在三層交換上做DHCP中繼的命令了,,這里我就只寫一條作為實(shí)例:
interface vlan10
ip helper-address 192.168.30.100 (DHCP服務(wù)器的IP地址)
exit
切記:再做DHCP中繼的時(shí)候要和DHCP池一一對應(yīng),,有幾個(gè)DCHP池就要做幾個(gè)DHCP中繼。