免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4494 | 回复: 1
打印 上一主题 下一主题

跨VLAN DHCP的交换机配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-24 11:27 |只看该作者 |倒序浏览

                                继续交换机的配置实验http://blog.chinaunix.net/u/12479/showart_1967521.html
我做了两个测试,一是一台服务器做dhcp服务器,另一个是一台交换机做DHCP服务器
一、DHCP服务器为一台Windows2003,IP为:10.129.20.9
三个scope:
1、10.129.9.10-10.129.5.253,vlan1的主机获得该网段IP
2、10.129.10.10-10.129.10.253,vlan10的主机获得该网段IP
3、10.129.20.10-10.129.20.253,VLAN20的主机获得该网段IP
两台交换机的配置方法相同,以switch01为例在每个vlan设置ip help-server
switch01>en                                          
switch01#config terminal
switch01(config)#interface Vlan1
switch01(config-if)#ip helper-address 10.129.20.9 #指定dhcp服务器地址
switch01(config-if)#exit
switch01(config)#interface Vlan10
switch01(config-if)#ip helper-address 10.129.20.9
switch01(config-if)#exit
switch01(config)#interface Vlan20
switch01(config-if)#ip helper-address 10.129.20.9
switch01(config-if)#exit
switch01(config)#exit
switch01#wr
二、交换机switch01做DHCP服务器
首先switch01和switch02都恢复到测试一之前的状态,只需配置switch01
switch01>en                                          
switch01#config terminal
switch01(config)#no ip dhcp conflict logging
switch01(config)#ip dhcp excluded-address 10.129.5.1 10.129.5.9 #排除10.129.5.1 到10.129.5.9
switch01(config)#ip dhcp excluded-address 10.129.10.1 10.129.10.9
switch01(config)#ip dhcp excluded-address 10.129.20.1 10.129.20.9
switch01(config)#ip dhcp excluded-address 10.129.5.254         #排除10.129.5.254
switch01(config)#ip dhcp excluded-address 10.129.10.254
switch01(config)#ip dhcp excluded-address 10.129.20.254
switch01(config)#ip dhcp pool 1
switch01(dhcp-config)#network 10.129.5.0 255.255.255.0
switch01(dhcp-config)#dns-server 10.129.5.1
switch01(dhcp-config)#default-router 10.129.5.254
switch01(dhcp-config)#exit
switch01(config)#ip dhcp pool 10
switch01(dhcp-config)#network 10.129.10.0 255.255.255.0
switch01(dhcp-config)#default-router 10.129.10.254
switch01(dhcp-config)#dns-server 10.129.5.1
switch01(dhcp-config)#exit
switch01(config)#ip dhcp pool 20
switch01(dhcp-config)#network 10.129.20.0 255.255.255.0
switch01(dhcp-config)#default-router 10.129.20.254
switch01(dhcp-config)#dns-server 10.129.5.1
switch01(dhcp-config)#exit
switch01(config)#exit
switch01#wr
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12479/showart_1975778.html

论坛徽章:
0
2 [报告]
发表于 2010-06-28 10:24 |只看该作者
学习了!!
谢谢!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP