Chinaunix首页 | 论坛 | 博客
  • 博客访问: 404240
  • 博文数量: 80
  • 博客积分: 8021
  • 博客等级: 中将
  • 技术积分: 1075
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-08 10:36
文章分类

全部博文(80)

文章存档

2010年(3)

2009年(25)

2008年(52)

我的朋友

分类: 系统运维

2009-06-24 11:27:20

继续交换机的配置实验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


阅读(712) | 评论(0) | 转发(0) |
0

上一篇:我的交换机配置实验

下一篇:没有了

给主人留下些什么吧!~~