Chinaunix首页 | 论坛 | 博客
  • 博客访问: 181512
  • 博文数量: 24
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 177
  • 用 户 组: 普通用户
  • 注册时间: 2013-08-26 14:21
个人简介

活在当下

文章分类

全部博文(24)

文章存档

2016年(1)

2014年(7)

2013年(16)

分类: LINUX

2014-01-09 16:51:10

原文地址: 单网卡多网段dhcp配置 作者:kiever

配置环境:centos 5
内网卡    192.168.96网段,同时绑定192.168.100.0 192.168.101.0和192.168.105.0网段
外网卡    公网IP
在内网卡上启用dhcp,默认分配到192.168.105.0网段,A类用户根据mac地址绑定到192.168.100.0网段,B类用户根据mac地址绑定到192.168.101.0网段

/etc/dhcpd.conf

ddns-update-style none;
ignore client-updates;

shared-network network_tag {

subnet 192.168.105.0 netmask 255.255.255.0 {
        option routers                  192.168.105.253;
        option subnet-mask              255.255.255.0;
        option domain-name-servers      192.168.96.13;
        option domain-name-servers      192.168.96.253;
        range dynamic-bootp 192.168.105.10 192.168.105.200;
        default-lease-time 21600;
        max-lease-time 43200;
}

subnet 192.168.100.0 netmask 255.255.255.0 {
        option routers                  192.168.100.253;
        option subnet-mask              255.255.255.0;
        option domain-name-servers      192.168.96.13;
        option domain-name-servers      192.168.96.253;
        default-lease-time 2160000;
        max-lease-time 4320000;
host 11sha-demo00 { hardware ethernet 00:1a:a0:33:32:e5 ; fixed-address 192.168.100.86 ;}
host test { hardware ethernet 00:0c:29:61:45:59 ; fixed-address 192.168.100.48 ;}
host ubuntu { hardware ethernet 00:03:ff:5b:34:8c ; fixed-address 192.168.100.79 ;}
}

subnet 192.168.101.0 netmask 255.255.255.0 {
        option routers                  192.168.101.253;
        option subnet-mask              255.255.255.0;
        option domain-name-servers      192.168.96.13;
        option domain-name-servers      192.168.96.253;
        default-lease-time 2160000;
        max-lease-time 4320000;

host Arch { hardware ethernet 00:03:5c:20:00:de ; fixed-address 192.168.101.42 ;}
host vmware-vista-xz { hardware ethernet 00:0c:29:ed:b5:77 ; fixed-address 192.168.101.57 ;}
host WINDOWSMOBILE21 { hardware ethernet 00:09:2d:f6:f7:b5 ; fixed-address 192.168.101.94 ;}
}
}
阅读(2471) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~