FREEBSD 6.1 DHCP Server (VLAN) - BBS
By Kama
at 2017-12-13T21:48
at 2017-12-13T21:48
Table of Contents
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
--
我的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
--
Tags:
BBS
All Comments
Related Posts
BSDCon 2017
By Erin
at 2017-08-28T00:10
at 2017-08-28T00:10
檔名順序修改
By Catherine
at 2017-08-13T00:31
at 2017-08-13T00:31
檔名順序修改
By Brianna
at 2017-08-12T16:38
at 2017-08-12T16:38
M3-WindTop-DreamBBS 架設過程記錄 @@
By Lauren
at 2017-07-23T12:34
at 2017-07-23T12:34
登入後立刻斷線
By Edwina
at 2017-07-15T23:58
at 2017-07-15T23:58