Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1363307
  • 博文数量: 632
  • 博客积分: 2778
  • 博客等级: 大尉
  • 技术积分: 3387
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-31 09:09
个人简介

123

文章分类

全部博文(632)

文章存档

2014年(36)

2013年(33)

2012年(563)

分类: LINUX

2014-04-14 11:26:16

原文地址: 单网卡多网段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 ;}
}
}
阅读(1937) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~