Задача следующая есть реальный компьютер на нем установлена FreeBSD 8.1:
Код: Выделить всё
root@raptor uname -a
FreeBSD raptor.svensk.local 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #0: Thu Dec 30 13:16:22 UTC 2010 root@raptor.svensk.local:/usr/obj/usr/src/sys/GROM i386
Код: Выделить всё
root@raptor ifconfig
alc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c3198<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC,VLAN_HWTSO,LINKSTATE>
ether 6c:f0:49:54:a8:79
inet 192.168.0.86 netmask 0xffffff00 broadcast 192.168.0.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
[b]rl0: [/b]flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:a0:c5:b3:8e:03
media: Ethernet autoselect
status: no carrier - [b][u]как понимаю они друг друга не видят, но думаю если настроить и запустить DHCP ситуация изменится[/u][/b]
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet 127.0.0.1 netmask 0xff000000
Код: Выделить всё
root@raptor pkg_info |grep dhcp
isc-dhcp41-server-4.1.2,1 The ISC Dynamic Host Configuration Protocol server
root@raptor cat /etc/rc.conf
# -- sysinstall generated deltas -- # Thu Dec 30 11:09:43 2010
# Created: Thu Dec 30 11:09:43 2010
# 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.
keymap="ru.koi8-r"
moused_enable="YES"
allscreens_flags="-m on"
samba_enable="YES"
nmbd_enable="YES"
smbd_enable="YES"
winbindd_enable="YES"
sshd_enable="YES"
avahi_daemon_enable="YES"
avahi_dnsconfd_enable="YES"
hald_enable="YES"
dbus_enable="YES"
gdm_enable="YES"
gnome_enable="YES"
ifconfig_alc0="DHCP" - на этом интерфейсе висит интернет
hostname="raptor.svensk.local" - который в домене
ifconfig_rl0="DHCP"
dhcpd_enable="YES"
dhcpd_ifaces="rl0"
root@raptor cat /usr/local/etc/dhcpd.conf
default-lease-time 600; # время аренды по умолчанию
max-lease-time 7200; # максимальное время аренды
#authoritative; # единственный DHCP сервер в сети
#ddns-update-style interim; # динамический стиль обновления DNS
log-facility local7; #
subnet 192.168.6.0 netmask 255.255.255.0 { # подсеть в которой будем выдавать адреса
#range 192.168.6.52 192.168.6.59; # интервалы ip адресов на выдачу клиентам
range 192.168.6.101 192.168.6.200;
option routers 192.168.6.1; # адрес маршрутизатора в Интернет
#option netbios-name-servers 192.168.6.51; # адрес сервера WINS (если есть)
#option domain-name-servers 192.168.6.51; # адрес DNS сервера AD
#option domain-name "office.mydomen.ru"; # полное имя домена AD
}
#для хостов которым требуются постоянные ip адреса создаем следующие записи
#host book { # имя хоста
#hardware ethernet 00:c0:9f:1e:64:92; # MAC адрес сетевой карты хоста
#fixed-address 192.168.1.53; # ip адрес для этого хоста
#}
host general {
hardware ethernet 00:a0:c5:b3:8e:03;
fixed-address 192.168.1.54;
}
Код: Выделить всё
root@raptor /usr/local/etc/rc.d/isc-dhcpd start
Starting dhcpd.
Internet Systems Consortium DHCP Server 4.1.2
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.
No subnet declaration for rl0 (no IPv4 addresses).
** Ignoring requests on rl0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface rl0 is attached. **
Not configured to listen on any interfaces!
If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.
If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.
Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.
exiting.
/usr/local/etc/rc.d/isc-dhcpd: WARNING: failed to start dhcpd