配置环境: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 ;}
}
}
阅读(2482) | 评论(0) | 转发(0) |