免费注册 查看新帖 |

Chinaunix

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

一台DHCP服务器,怎样才能让它为多个网段分配IP地址? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-07-03 11:51 |只看该作者 |倒序浏览
通常在/etc/dhcpd.conf下只能为一个网段分配IP,那我怎么才能让它为多个网段分配IP呢?谢谢,哪位大师最好能写上您的多网段配置文件,小弟不胜感激!!!

论坛徽章:
0
2 [报告]
发表于 2003-07-03 12:46 |只看该作者

一台DHCP服务器,怎样才能让它为多个网段分配IP地址?

[root@firewall etc]# more dhcpd.conf
ddns-update-style interim;
ignore client-updates;

subnet 192.168.0.0 netmask 255.255.0.0 {

# --- default gateway
        option routers                  192.168.0.2;
        option subnet-mask              255.255.254.0;

        option nis-domain               "szbb.com";
        option domain-name              "szbb.com";
        option domain-name-servers      202.102.15.162,202.102.14.141;

        option time-offset              -18000; # Eastern Standard Time
#       option ntp-servers              192.168.1.1;
#       option netbios-name-servers     192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#       option netbios-node-type 2;

        range dynamic-bootp 192.168.0.21 192.168.1.254;
        default-lease-time 43200;
        max-lease-time 64800;
        host dellserver{  
       hardware ethernet  00:06:5B:F7:77:14;  
       fixed-address 192.168.0.236;  
       }  

}     
下面是我的租约文件中部分内容:
[root@firewall etc]# cd /var/lib/dhcp/
[root@firewall dhcp]# ls
dhcpd.leases  dhcpd.leases~
[root@firewall dhcp]# more dhcpd.leases
****************
lease 192.168.1.182 {
  starts 2 2003/04/29 10:25:55;
  ends 2 2003/04/29 10:27:55;
  tstp 2 2003/04/29 10:27:55;
  binding state free;
  hardware ethernet 00:e0:4c:a1:36:53;
}
lease 192.168.0.183 {
  starts 2 2003/04/29 10:25:59;
  ends 2 2003/04/29 10:27:59;
  tstp 2 2003/04/29 10:27:59;
  binding state free;
  hardware ethernet 00:e0:4c:a1:36:53;
}
lease 192.168.0.241 {
  starts 2 2003/04/29 10:28:42;
  ends 2 2003/04/29 10:30:42;
  tstp 2 2003/04/29 10:30:42;
  binding state free;
  hardware ethernet 00:e0:4c:a1:36:53;
}
lease 192.168.1.242 {
  starts 2 2003/04/29 23:40:07;
  ends 2 2003/04/29 23:42:07;
  tstp 2 2003/04/29 23:42:07;
  binding state free;
  hardware ethernet 00:10:dc:40:6b:95;
}
************
非常正常...

论坛徽章:
0
3 [报告]
发表于 2003-07-03 12:53 |只看该作者

一台DHCP服务器,怎样才能让它为多个网段分配IP地址?

option subnet-mask 255.255.254.0;

range dynamic-bootp 192.168.0.21 192.168.1.254;
这不是在同一个网段里吗?

论坛徽章:
0
4 [报告]
发表于 2003-07-03 20:30 |只看该作者

一台DHCP服务器,怎样才能让它为多个网段分配IP地址?

是呀,没有错
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP