作者jeffher1024 (小何)
看板FreeBSD
标题[问题] FREEBSD 6.1 DHCP Server (VLAN)
时间Wed Dec 13 21:48:08 2017
Dear Sir,
我的freebsd 6.1,rc.conf 及 dhcpd.conf内容如下
由一台Fortigate 60D做路由 IP:10.10.10.247/24 上面有做第二个IP 10.10.8.1/24 10.10.9.1/24 10.10.11.1/24
10网段锁网卡MAC给10网段的IP , 未锁网卡MAC给11网段的IP
目前是想做 DHCP Server VLAN的设定(11网段),不晓得要如何设定呢?
由於DHCP Server bind 很多IP ,有点搞混了,请大家帮忙指导,谢谢!
Benson
rc.conf
------------------------------------------------------------------------------------------------------------------------
# -- sysinstall generated deltas -- # Tue Feb 13 19:31:46 2007
# Created: Tue Feb 13 19:31:46 2007
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="10.10.10.243"
gateway_enable="YES"
hostname="freebsd.good.com.tw"
#ifconfig_fxp0="inet 220.228.184.71 netmask 255.255.255.224"
ifconfig_rl0="inet 10.10.10.89 netmask 255.255.255.0"
ifconfig_rl0_alias0="inet 10.10.11.89 netmask 255.255.255.0"
ifconfig_rl0_alias1="inet 10.10.8.89 netmask 255.255.255.0"
ifconfig_rl0_alias2="inet 10.10.9.89 netmask 255.255.255.0"
inetd_enable="YES"
keymap="us.iso"
linux_enable="YES"
saver="logo"
sshd_enable="YES"
usbd_enable="NO"
network_interface="lo0 rl0 fxp0"
#ppp_enable="YES"
#ppp_mode="ddial"
#ppp_nat="YES"
#ppp_profile="pppoe"
firewall_enable="YES"
firewall_script="/etc/nat.firewall"
firewall_logging="YES"
ipnat_enable="YES"
ipnat_rules="/etc/ipnat.conf"
pf_enable="YES"
pf_rules="/etc/ipf.rule"
pf_flags=""
pflog_enable="YES"
pflog_logfile="/var/log/pflog"
pflog_flags=""
#named_enable="YES"
static_routes="route1 route2 route3"
static_route1="-net 10.10.8.0/24 10.10.10.247"
static_route2="-net 10.10.9.0/24 10.10.10.247"
static_route3="-net 10.10.11.0/24 10.10.10.247"
------------------------------------------------------------------------------------------------------------------------
dhcpd.conf
------------------------------------------------------------------------------------------------------------------------
#======================================================================#
# 设定档:/usr/local/etc/dhcpd.conf 2001/10/28
# /usr/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf rl0
#======================================================================#
#server-identifier 192.168.1.254 ; # 标明此伺服器名称
default-lease-time 7200; # 租约使用时间: 6 小时
max-lease-time 14400; # 最大租期长度: 1 天
ddns-update-style none;
#### ------ 宣告 NAT 网域之动态IP ------ ####
shared-network good-dhcp { # 宣告一个群组
subnet 10.10.11.0 netmask 255.255.255.0 {
range dynamic-bootp 10.10.11.31 10.10.11.230;
option routers 10.10.11.1;
option broadcast-address 10.10.11.255;
option domain-name-servers 10.10.10.86,168.95.192.1,168.95.1.1,211.78.130.10,211.78.130.11;
option domain-name "good.com.tw";
option netbios-name-servers 10.10.10.86;
option netbios-node-type 8;
option subnet-mask 255.255.255.0;
option perform-mask-discovery on;
option mask-supplier on;
}
subnet 10.10.10.0 netmask 255.255.255.0 { # 子网路与网路遮罩
# range dynamic-bootp 10.10.10.171 10.10.10.230; # 动态分配 IP 位置范围
option routers 10.10.10.243; # 子网路路由器(gateway)
option broadcast-address 10.10.10.255; # 广播封包位置
option domain-name-servers 10.10.10.86,168.95.192.1,168.95.1.1,211.78.130.10,211.78.130.11; #可用的名称伺服器
option domain-name "good.com.tw"; # 所属的网域名称
option netbios-name-servers 10.10.10.86;
option netbios-node-type 8;
option subnet-mask 255.255.255.0;
option perform-mask-discovery on;
option mask-supplier on;
# 下列主机(根据网卡编号-MAC Address)因用途特殊,所以固定IP。
host box {
option host-name "Box";
fixed-address 10.10.10.55;
hardware ethernet 00:03:2d:11:5f:33;
option routers 10.10.10.1;
}
host denyclient { # 让这块网卡不得使用DHCP取得IP
hardware ethernet 00:00:00:00:00:00;
deny booting;
}
}
}
------------------------------------------------------------------------------------------------------------------------
--
Sent from my Windows
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 118.161.33.180
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/FreeBSD/M.1513172890.A.B82.html