FREEBSD 6.1 DHCP Server (VLAN) - BBS

Kama avatar
By Kama
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

--
Tags: BBS

All Comments

BSDCon 2017

Erin avatar
By Erin
at 2017-08-28T00:10
https://bsdtw.org/ 2017/11/11-12 https://www.facebook.com/BSDTW/ -- 讀者審校網試行版 http://readerreviewnet.twbbs.org/ (哲、史、法、政、經、社,人文翻譯書籍錯譯提報網) ◎洪蘭and#34;毀人不倦a ...

檔名順序修改

Catherine avatar
By Catherine
at 2017-08-13T00:31
目前手邊沒有BSD沒辦法實測,但我想大致上是可行的: ---- #!/bin/bash for file in $(ls a*) do index=$(expr 100 - ${file:1}) mv $file $(printf b%02d $index) done ---- 應該這樣就 ...

檔名順序修改

Brianna avatar
By Brianna
at 2017-08-12T16:38
有個問題想請高手幫忙一下, 如果我有一系列的附檔名,像是a01, a02, a03.... a99, 我想把它的順序修改,例如a99改為b01, a98改為b02.. 依此類推, 請問這樣的script 有人會嗎? 感激不盡 - ...

M3-WindTop-DreamBBS 架設過程記錄 @@

Lauren avatar
By Lauren
at 2017-07-23T12:34
首先感謝眾前輩們無私分享這些 source code 以及不少參考文件 這邊只是就可以try成功的部分做個記錄 作業系統環境: CentOS 5 ~ 7 32-bit 下應該都可以裝起來 ( 7 要裝 Alt-Arch 版本 ) Debian GNU/Linux 下目前還沒有編譯成功atat , 還 ...

登入後立刻斷線

Edwina avatar
By Edwina
at 2017-07-15T23:58
如題, OS 是 Ubuntu 10.04.2 LTS Maple_itoc 版本應該是 NTHU CS MapleBBS Ver 3.10 站址是 telnet://catholic.twbbs.org 不知何時起變成一登入就會斷線 已經重新安裝 make clean linux install ...