Задача поднять DHCPD, который выдавал бы адреса в каждой подсети.
Начало решения:
конфиг rc.conf
Код: Выделить всё
defaultrouter="10.50.50.1"
gateway_enable="YES"
hostname="t7.mydomen.ru"
ifconfig_em0="inet 10.50.50.23 netmask 255.255.255.0"
ifconfig_em1="inet 192.168.0.1 netmask 255.255.0.0"
inetd_enable="NO"
ipv6_enable="NO"
keymap="ru.koi8-r"
font8x14="cp866-8x14"
font8x16="cp866-8x16"
font8x8="cp866-8x8"
scrnmap="koi8-r2cp866"
nfs_client_enable="YES"
nfs_server_enable="YES"
rpcbind_enable="YES"
sshd_enable="YES"
cloned_interfaces="vlan100 vlan101 vlan102 vlan103 vlan104 vlan105 vlan106 vlan107 vlan108 vlan109 vlan110 vlan111 vlan112 vlan113 vlan114 vlan115 vlan116 vlan117 vlan118 vlan119 vlan120 vlan121 vlan122 vlan123 vlan124 vlan125 vlan126 vlan127 vlan128 vlan129 vlan130 vlan131 vlan132 vlan133 vlan134 vlan135 vlan136 vlan137 vlan138 vlan139 vlan140 vlan141 vlan142 vlan143 vlan144 vlan145 vlan146 vlan147 vlan148 vlan149 vlan150 vlan151 vlan152 vlan153 vlan154 vlan155 vlan156 vlan157 vlan158 vlan159 vlan160 vlan161"
ifconfig_vlan100="inet 192.168.1.1 netmask 255.255.255.0 vlan 100 vlandev em1"
ifconfig_vlan101="inet 192.168.2.1 netmask 255.255.255.0 vlan 101 vlandev em1"
ifconfig_vlan102="inet 192.168.3.1 netmask 255.255.255.0 vlan 102 vlandev em1"
ifconfig_vlan103="inet 192.168.4.1 netmask 255.255.255.0 vlan 103 vlandev em1"
ifconfig_vlan104="inet 192.168.5.1 netmask 255.255.255.0 vlan 104 vlandev em1"
ifconfig_vlan105="inet 192.168.6.1 netmask 255.255.255.0 vlan 105 vlandev em1"
ifconfig_vlan106="inet 192.168.7.1 netmask 255.255.255.0 vlan 106 vlandev em1"
ifconfig_vlan107="inet 192.168.8.1 netmask 255.255.255.0 vlan 107 vlandev em1"
ifconfig_vlan108="inet 192.168.9.1 netmask 255.255.255.0 vlan 108 vlandev em1"
ifconfig_vlan109="inet 192.168.10.1 netmask 255.255.255.0 vlan 109 vlandev em1"
ifconfig_vlan110="inet 192.168.11.1 netmask 255.255.255.0 vlan 110 vlandev em1"
ifconfig_vlan111="inet 192.168.12.1 netmask 255.255.255.0 vlan 111 vlandev em1"
ifconfig_vlan112="inet 192.168.13.1 netmask 255.255.255.0 vlan 112 vlandev em1"
ifconfig_vlan113="inet 192.168.14.1 netmask 255.255.255.0 vlan 113 vlandev em1"
ifconfig_vlan114="inet 192.168.15.1 netmask 255.255.255.0 vlan 114 vlandev em1"
ifconfig_vlan115="inet 192.168.16.1 netmask 255.255.255.0 vlan 115 vlandev em1"
ifconfig_vlan116="inet 192.168.17.1 netmask 255.255.255.0 vlan 116 vlandev em1"
ifconfig_vlan117="inet 192.168.18.1 netmask 255.255.255.0 vlan 117 vlandev em1"
ifconfig_vlan118="inet 192.168.19.1 netmask 255.255.255.0 vlan 118 vlandev em1"
ifconfig_vlan119="inet 192.168.20.1 netmask 255.255.255.0 vlan 119 vlandev em1"
ifconfig_vlan120="inet 192.168.21.1 netmask 255.255.255.0 vlan 120 vlandev em1"
ifconfig_vlan121="inet 192.168.22.1 netmask 255.255.255.0 vlan 121 vlandev em1"
ifconfig_vlan122="inet 192.168.23.1 netmask 255.255.255.0 vlan 122 vlandev em1"
ifconfig_vlan123="inet 192.168.24.1 netmask 255.255.255.0 vlan 123 vlandev em1"
ifconfig_vlan124="inet 192.168.25.1 netmask 255.255.255.0 vlan 124 vlandev em1"
ifconfig_vlan125="inet 192.168.26.1 netmask 255.255.255.0 vlan 125 vlandev em1"
ifconfig_vlan126="inet 192.168.27.1 netmask 255.255.255.0 vlan 126 vlandev em1"
ifconfig_vlan127="inet 192.168.28.1 netmask 255.255.255.0 vlan 127 vlandev em1"
ifconfig_vlan128="inet 192.168.29.1 netmask 255.255.255.0 vlan 128 vlandev em1"
ifconfig_vlan129="inet 192.168.30.1 netmask 255.255.255.0 vlan 129 vlandev em1"
ifconfig_vlan130="inet 192.168.31.1 netmask 255.255.255.0 vlan 130 vlandev em1"
ifconfig_vlan131="inet 192.168.130.1 netmask 255.255.255.0 vlan 131 vlandev em1"
ifconfig_vlan132="inet 192.168.131.1 netmask 255.255.255.0 vlan 132 vlandev em1"
ifconfig_vlan133="inet 192.168.132.1 netmask 255.255.255.0 vlan 133 vlandev em1"
ifconfig_vlan134="inet 192.168.133.1 netmask 255.255.255.0 vlan 134 vlandev em1"
ifconfig_vlan135="inet 192.168.134.1 netmask 255.255.255.0 vlan 135 vlandev em1"
ifconfig_vlan136="inet 192.168.135.1 netmask 255.255.255.0 vlan 136 vlandev em1"
ifconfig_vlan137="inet 192.168.136.1 netmask 255.255.255.0 vlan 137 vlandev em1"
ifconfig_vlan138="inet 192.168.137.1 netmask 255.255.255.0 vlan 138 vlandev em1"
ifconfig_vlan139="inet 192.168.138.1 netmask 255.255.255.0 vlan 139 vlandev em1"
ifconfig_vlan140="inet 192.168.160.1 netmask 255.255.255.0 vlan 140 vlandev em1"
ifconfig_vlan141="inet 192.168.161.1 netmask 255.255.255.0 vlan 141 vlandev em1"
ifconfig_vlan142="inet 192.168.162.1 netmask 255.255.255.0 vlan 142 vlandev em1"
ifconfig_vlan143="inet 192.168.163.1 netmask 255.255.255.0 vlan 143 vlandev em1"
ifconfig_vlan144="inet 192.168.164.1 netmask 255.255.255.0 vlan 144 vlandev em1"
ifconfig_vlan145="inet 192.168.165.1 netmask 255.255.255.0 vlan 145 vlandev em1"
ifconfig_vlan146="inet 192.168.166.1 netmask 255.255.255.0 vlan 146 vlandev em1"
ifconfig_vlan147="inet 192.168.167.1 netmask 255.255.255.0 vlan 147 vlandev em1"
ifconfig_vlan148="inet 192.168.180.1 netmask 255.255.255.0 vlan 148 vlandev em1"
ifconfig_vlan149="inet 192.168.181.1 netmask 255.255.255.0 vlan 149 vlandev em1"
ifconfig_vlan150="inet 192.168.182.1 netmask 255.255.255.0 vlan 150 vlandev em1"
ifconfig_vlan151="inet 192.168.183.1 netmask 255.255.255.0 vlan 151 vlandev em1"
ifconfig_vlan152="inet 192.168.184.1 netmask 255.255.255.0 vlan 152 vlandev em1"
ifconfig_vlan153="inet 192.168.185.1 netmask 255.255.255.0 vlan 153 vlandev em1"
ifconfig_vlan154="inet 192.168.186.1 netmask 255.255.255.0 vlan 154 vlandev em1"
ifconfig_vlan155="inet 192.168.187.1 netmask 255.255.255.0 vlan 155 vlandev em1"
ifconfig_vlan156="inet 192.168.200.1 netmask 255.255.255.0 vlan 156 vlandev em1"
ifconfig_vlan157="inet 192.168.201.1 netmask 255.255.255.0 vlan 157 vlandev em1"
ifconfig_vlan158="inet 192.168.202.1 netmask 255.255.255.0 vlan 158 vlandev em1"
ifconfig_vlan159="inet 192.168.203.1 netmask 255.255.255.0 vlan 159 vlandev em1"
ifconfig_vlan160="inet 192.168.204.1 netmask 255.255.255.0 vlan 160 vlandev em1"
ifconfig_vlan161="inet 192.168.205.1 netmask 255.255.255.0 vlan 161 vlandev em1"
ifconfig_vlan162="inet 192.168.206.1 netmask 255.255.255.0 vlan 162 vlandev em1"
dhcpd_enable="YES"
#dhcpd_flags="-q"
dhcpd_conf="/usr/local/etc/dhcpd.conf"
dhcpd_ifaces="vlan100"
dhcpd_withmask="022"
#dhcpd_chuser="dhcpd"
#dhcpd_wituser="dhcpd"
#dhcpd_chroot_enable="YES"
#dhcpd_devfs_enable="YES"
#dhcpd_rootdir="/var/db/dhcpd"
firewall_enable="YES"
firewall_script="/etc/firewall.conf"
firewall_logging="YES"
Код: Выделить всё
option domain-name-servers 10.11.11.1;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
authoritative;
log-facility local7;
shared-network vlan100 {
subnet 172.16.1.0 netmask 255.255.255.0 {
option routers 172.16.1.1;
range 172.16.1.2 172.16.1.254;
}
Код: Выделить всё
Feb 3 13:24:29 t7 dhcpd:
Feb 3 13:24:29 t7 dhcpd: No subnet declaration for vlan100 (192.168.1.1).
Feb 3 13:24:29 t7 dhcpd: ** Ignoring requests on vlan100. If this is not what
Feb 3 13:24:29 t7 dhcpd: you want, please write a subnet declaration
Feb 3 13:24:29 t7 dhcpd: in your dhcpd.conf file for the network segment
Feb 3 13:24:29 t7 dhcpd: to which interface vlan100 is attached. **
Feb 3 13:24:29 t7 dhcpd:
Feb 3 13:24:29 t7 dhcpd: Not configured to listen on any interfaces!
Feb 3 13:24:29 t7 root: /etc/rc: WARNING: failed to start dhcpd
Где сделал нет в настройках?
Стоит ли искать проблему в железе?