DHCP server中指定各自域的问题
创始人
2024-07-15 07:31:20
0

DHCP server的设置等问题,历来得到我们的关注。下面我们就重点讲解一个问题:如何给每个VLAN 指定各自的DHCP 域。比如vlan 2 对应dhcp test2 vlan3 对应dhcp test3. 假如:

情况1: 现在有一个router 上做了多个DHCP 域.

然后在switch 上划VLAN 。那么那个交换机上的ip help-address 的IP 是什么呢?是router 上哪个口的IP 呢? 如:在router 上的配制:

  1. 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  
  2.  
  3. 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 

在交换机上:

  1. interface Vlan199 ip address 10.0.199.1 255.255.255.0 ip helper-address ???????????????  
  2. int vlan 200  
  3. 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 服务器使用仍然在其它区域起作用。即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???

  1. FW:ip dhcp pool valn x  
  2. network x.x.x.x x.x.x.x  
  3. default-router x.x.x.x 

其中vlan x 这个pool 是全局pool 的子集

  1. interface vlan x  
  2. ip helper-address x.x.x.x  
  3. The helper address can be a specific DHCP server address, or it can be the network address  
  4. if other DHCP servers are on the destination network segment. Using the network address enables other servers to respond to DHCP requests.  
  5. 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 地址方案如下:

  1. route1:  
  2. 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:  
  3. 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 

配置:

  1. router1: ! ip forward-protocol udp  
  2. ! int fa0/0 ip addr 10.1.1.254 255.255.255.0  
  3. no shutdown ! int fa0/1 ip addr 10.1.2.254 255.255.255.0  
  4. ip helper-address 10.1.1.1 no shut !  
  5. int s0/0 ip addr 192.168.0.1 255.255.255.252 no shut  
  6. encap ppp  
  7. !  
  8. ip route 10.2.0.0 255.255.0.0 192.168.0.2     
  9. ! router2: !  
  10. ip forward-protocol udp ! int fa0/0 ip addr 10.2.1.254 255.255.255.0  
  11. ip helper-address 10.1.1.1 no shutdown !  
  12. int fa0/1 ip addr 10.2.2.254 255.255.255.0 ip helper-address 10.1.1.1 no shut  
  13. ! int s0/0 ip addr 192.168.0.2 255.255.255.252  
  14. 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  
  15. scope 12: router:10.1.2.254 scope 21: router:10.2.1.254  
  16. scope 22:  
  17. router:10.2.2.254 

使用VLAN 的情况配置与此相同。只不过把int fa 换成int vlan 而已。你只需要将VLAN 当做是第N 个SCOPE 的ROUTE 选项就行了。在你的交换机上按常规划分好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 通。

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
Windows恶意软件20年“... 在Windows的早期年代,病毒游走于系统之间,偶尔删除文件(但被删除的文件几乎都是可恢复的),并弹...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
着眼MAC地址,解救无法享受D... 在安装了DHCP服务器的局域网环境中,每一台工作站在上网之前,都要先从DHCP服务器那里享受到地址动...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...