關于VLAN中DHCP域的問題
更新時間:2007年09月19日 10:20:30 作者:
我的問題就是如何給每個VLAN 指定各自的DHCP 域。比如vlan 2 對應dhcp test2 vlan3 對應dhcp test3. 假如:
情況1: 現在有一個router 上做了多個DHCP 域.
然后在switch 上劃VLAN 。那么那個交換機上的ip help-address 的IP 是什么呢?是router 上哪個口的IP 呢? 如:在router 上的配制:
ip dhcp excluded-address 10.0.199.200 10.0.199.254 ! ip dhcp pool test 1 network 10.0.199.0 255.255.255.0 default-router 10.0.199.1 dns-server 10.0.199.252 lease 0 0 5
ip dhcp pool test 2 network 10.0.200.0 255.255.255.0 default-router 10.0.200.1 dns-server 10.0.199.252 lease 0 0 5
在交換機上:
interface Vlan199 ip address 10.0.199.1 255.255.255.0 ip helper-address ???????????????
int vlan 200
ip address 10.0.200.1 255.255.255.0 ip helper-address ??????????? 這時在這里指定的helper-address 是什么呢?才能把vlan199 和vlan200 里的電腦取得相
應DHCP scope???
第二種情況:利用局域網中的win2000's DHCP server 假如dhcp server 的ip 192.168.10.1 在DHCP 上劃分兩個scope.
第一個scope 192.168.10.10 -----192.168.10.255 第二個scope 192.16.20.10 ------192.16.20.255.
交換機劃分VLAN 之后,如何保證DHCP 服務器使用仍然在其它區(qū)域起作用。即VLAN10 里的機器取得第一個scope 里的ip: 即從192.168.10.10 -----192.168.10.255 同樣,vlan20 取得相應第二個scope 里的IP. 這時在這里指定的helper-address 是什么呢? 才能把vlan199 和vlan200 里的電腦取得相應DHCP scope???
第三種情況:假如在一個3550emi 上劃分多個DHCP 域。由于它本身就可路由。并能劃VLAN。那么這時在這里指定的helper-address 是什么呢?才能把vlan199 和vlan200 里的電腦取得相應DHCP scope???
FW:ip dhcp pool valn x
network x.x.x.x x.x.x.x
default-router x.x.x.x
其中vlan x 這個pool 是全局pool 的子集
interface vlan x
ip helper-address x.x.x.x
The helper address can be a specific DHCP server address, or it can be the network address
if other DHCP servers are on the destination network segment. Using the network address enables other servers to respond to DHCP requests.
If you have multiple servers, you can configure one helper address for each server.
DHCP relay:
http://www.cisco.com/en/US/products...00800c6ed2.html
FW: 以一個配置案例來做總結吧:
router1 的int fa0/0 上接有dhcp server 。和router2 通過s0/0 連接IP 地址方案如下:
route1:
int fa0/0 10.1.1.254/24 int fa0/1 10.1.2.254/24 int s0/0 192.168.0.1/30 route2:
int fa0/0 10.2.1.254/24 int fa0/1 10.2.2.254/24 int s0/0 192.168.0.2/30 dhcp server adderss:10.1.1.1
配置:
router1: ! ip forward-protocol udp
! int fa0/0 ip addr 10.1.1.254 255.255.255.0
no shutdown ! int fa0/1 ip addr 10.1.2.254 255.255.255.0
ip helper-address 10.1.1.1 no shut !
int s0/0 ip addr 192.168.0.1 255.255.255.252 no shut
encap ppp
!
ip route 10.2.0.0 255.255.0.0 192.168.0.2! router2: !
ip forward-protocol udp ! int fa0/0 ip addr 10.2.1.254 255.255.255.0
ip helper-address 10.1.1.1 no shutdown !
int fa0/1 ip addr 10.2.2.254 255.255.255.0 ip helper-address 10.1.1.1 no shut
! int s0/0 ip addr 192.168.0.2 255.255.255.252
no shut encap ppp ! ip route 10.1.0.0 255.255.0.0 192.168.0.1 ! dhcp server: scope 11: router:10.1.1.254
scope 12: router:10.1.2.254 scope 21: router:10.2.1.254
scope 22:
router:10.2.2.254
使用VLAN 的情況配置與此相同。只不過把int fa 換成int vlan 而已。
轉:
你只需要將VLAN 當做是第N 個SCOPE 的ROUTE 選項就行了。
在你的交換機上按常規(guī)劃分好VLAN:
假設有:VLAN20 和VLAN30, 你先在交換機上劃分好(這步應該都會做), 然后在路由器上設置VLAN 網關(假設是FA0/0.1:192.168.20.254/24 和FA0/0.2:192.168.30.254/24), 在VLAN20 接口和VLAN30 接口下分別設置ip help-address DHCP_SERVER_ADD,IP FORWARD UDP 等,其實DHCP_SERVER 接在哪里無所謂,只要能夠ROUTE 通,就行。關鍵是DHCP_SERVER 上設置SCOPE 時,你分兩個,其中一個為192.168.20.0 網段的,它的相應ROUTE 選項為192.168.20.254, 另一個SCOPE 為192.168.30.0 網段的,它的相應ROUTE 選項為192.168.30.254 。上述設置完成后,記得在兩個網段都要能和DHCP_SERVER 通。 文章錄入:csh 責任編輯:csh
情況1: 現在有一個router 上做了多個DHCP 域.
然后在switch 上劃VLAN 。那么那個交換機上的ip help-address 的IP 是什么呢?是router 上哪個口的IP 呢? 如:在router 上的配制:
ip dhcp excluded-address 10.0.199.200 10.0.199.254 ! ip dhcp pool test 1 network 10.0.199.0 255.255.255.0 default-router 10.0.199.1 dns-server 10.0.199.252 lease 0 0 5
ip dhcp pool test 2 network 10.0.200.0 255.255.255.0 default-router 10.0.200.1 dns-server 10.0.199.252 lease 0 0 5
在交換機上:
interface Vlan199 ip address 10.0.199.1 255.255.255.0 ip helper-address ???????????????
int vlan 200
ip address 10.0.200.1 255.255.255.0 ip helper-address ??????????? 這時在這里指定的helper-address 是什么呢?才能把vlan199 和vlan200 里的電腦取得相
應DHCP scope???
第二種情況:利用局域網中的win2000's DHCP server 假如dhcp server 的ip 192.168.10.1 在DHCP 上劃分兩個scope.
第一個scope 192.168.10.10 -----192.168.10.255 第二個scope 192.16.20.10 ------192.16.20.255.
交換機劃分VLAN 之后,如何保證DHCP 服務器使用仍然在其它區(qū)域起作用。即VLAN10 里的機器取得第一個scope 里的ip: 即從192.168.10.10 -----192.168.10.255 同樣,vlan20 取得相應第二個scope 里的IP. 這時在這里指定的helper-address 是什么呢? 才能把vlan199 和vlan200 里的電腦取得相應DHCP scope???
第三種情況:假如在一個3550emi 上劃分多個DHCP 域。由于它本身就可路由。并能劃VLAN。那么這時在這里指定的helper-address 是什么呢?才能把vlan199 和vlan200 里的電腦取得相應DHCP scope???
FW:ip dhcp pool valn x
network x.x.x.x x.x.x.x
default-router x.x.x.x
其中vlan x 這個pool 是全局pool 的子集
interface vlan x
ip helper-address x.x.x.x
The helper address can be a specific DHCP server address, or it can be the network address
if other DHCP servers are on the destination network segment. Using the network address enables other servers to respond to DHCP requests.
If you have multiple servers, you can configure one helper address for each server.
DHCP relay:
http://www.cisco.com/en/US/products...00800c6ed2.html
FW: 以一個配置案例來做總結吧:
router1 的int fa0/0 上接有dhcp server 。和router2 通過s0/0 連接IP 地址方案如下:
route1:
int fa0/0 10.1.1.254/24 int fa0/1 10.1.2.254/24 int s0/0 192.168.0.1/30 route2:
int fa0/0 10.2.1.254/24 int fa0/1 10.2.2.254/24 int s0/0 192.168.0.2/30 dhcp server adderss:10.1.1.1
配置:
router1: ! ip forward-protocol udp
! int fa0/0 ip addr 10.1.1.254 255.255.255.0
no shutdown ! int fa0/1 ip addr 10.1.2.254 255.255.255.0
ip helper-address 10.1.1.1 no shut !
int s0/0 ip addr 192.168.0.1 255.255.255.252 no shut
encap ppp
!
ip route 10.2.0.0 255.255.0.0 192.168.0.2! router2: !
ip forward-protocol udp ! int fa0/0 ip addr 10.2.1.254 255.255.255.0
ip helper-address 10.1.1.1 no shutdown !
int fa0/1 ip addr 10.2.2.254 255.255.255.0 ip helper-address 10.1.1.1 no shut
! int s0/0 ip addr 192.168.0.2 255.255.255.252
no shut encap ppp ! ip route 10.1.0.0 255.255.0.0 192.168.0.1 ! dhcp server: scope 11: router:10.1.1.254
scope 12: router:10.1.2.254 scope 21: router:10.2.1.254
scope 22:
router:10.2.2.254
使用VLAN 的情況配置與此相同。只不過把int fa 換成int vlan 而已。
轉:
你只需要將VLAN 當做是第N 個SCOPE 的ROUTE 選項就行了。
在你的交換機上按常規(guī)劃分好VLAN:
假設有:VLAN20 和VLAN30, 你先在交換機上劃分好(這步應該都會做), 然后在路由器上設置VLAN 網關(假設是FA0/0.1:192.168.20.254/24 和FA0/0.2:192.168.30.254/24), 在VLAN20 接口和VLAN30 接口下分別設置ip help-address DHCP_SERVER_ADD,IP FORWARD UDP 等,其實DHCP_SERVER 接在哪里無所謂,只要能夠ROUTE 通,就行。關鍵是DHCP_SERVER 上設置SCOPE 時,你分兩個,其中一個為192.168.20.0 網段的,它的相應ROUTE 選項為192.168.20.254, 另一個SCOPE 為192.168.30.0 網段的,它的相應ROUTE 選項為192.168.30.254 。上述設置完成后,記得在兩個網段都要能和DHCP_SERVER 通。 文章錄入:csh 責任編輯:csh
相關文章
微軟Windows XP操作系統(tǒng)優(yōu)化精髓
微軟Windows XP操作系統(tǒng)優(yōu)化精髓...2007-09-09