Installing and Configuring DHCP Server (DHCPd) on FreeBSD התקנה והגדרת התצורה DHCP Server (DHCPd) on FreeBSD
DHCP, the Dynamic Host Configuration Protocol, describes the means by which a system can connect to a network and obtain the necessary information for communication upon that network. DHCP, Dynamic Host Configuration Protocol, מתאר את האמצעי שבעזרתו מערכת יכולה להתחבר לרשת ולקבל את המידע הדרוש לצורך תקשורת על רשת.
When dhclient, the DHCP client, is executed on the client machine, it begins broadcasting requests for configuration information. כאשר dhclient, הלקוח DHCP, מבוצע במחשב הלקוח, זה מתחיל השידור בקשות לקבלת מידע תצורה. By default, these requests are on UDP port 68. כברירת מחדל, לבקשות אלה על יציאת ה-UDP 68. The server replies on UDP 67, giving the client an IP address and other relevant network information such as netmask, router, and DNS servers. שרת ב-UDP 67 תגובות, לתת ללקוח כתובת IP ומידע רלוונטיים אחרים ברשת כגון netmask, נתב, ואת שרתי ה-DNS. All of this information comes in the form of a DHCP ?lease? כל המידע הזה מגיע בצורה של חכירה DHCP?? and is only valid for a certain time (configured by the DHCP server maintainer). ו תקפה רק עבור זמן מסוים (מוגדר על ידי מתחזק שרת ה-DHCP). In this manner, stale IP addresses for clients no longer connected to the network can be automatically reclaimed. באופן זה, מעופש כתובות ה-IP עבור לקוחות כבר לא מחובר לרשת ניתן שיובשה באופן אוטומטי.
DHCP Server (or DHCPd) is the server that provides the DHCP client the information it needed, and it's the server portion of the suite is not provided as part of FreeBSD, and so it needs to install from the net/isc-dhcp3-server port to provide this service. DHCP Server (או DHCPd) הוא שרת המספק את לקוח DHCP את המידע שהוא זקוק לו, וזה החלק השרת של חבילת אינו מסופק כחלק FreeBSD, ולכן הוא צריך להתקין מן net/isc-dhcp3-server יציאה לספק שירות זה.
FreeBSD comes with ISC DHCP, and it comes with FreeBSD as ports net/isc-dhcp3-server. FreeBSD מגיעה עם ISC DHCP, והיא מגיעה עם FreeBSD כפי net/isc-dhcp3-server יציאות.
To install it, change to ports net/isc-dhcp3-server directory and execute the following command: כדי להתקין אותה, לשנות יציאות net/isc-dhcp3-server בספרייה ולבצע את הפקודה הבאה:
# make install clean # Make install נקי
DHCPd is configured by using a configuration file, normally dhcpd.conf located at /usr/local/etc directory. DHCPd מוגדר באמצעות קובץ התצורה, בדרך כלל dhcpd.conf הממוקם usr / local / etc directory. Normally there is an example configuration file which is dhcpd.conf.example at the directory. בדרך כלל יש קובץ הגדרות לדוגמה שנמצא ב dhcpd.conf.example במדריך. Copy dhcpd.conf.example to dhcpd.conf or create a new dhcpd.conf before proceeding to make changes on DHCP Server. Dhcpd.conf.example העתק dhcpd.conf או ליצור dhcpd.conf חדש לפני שתמשיך לבצע שינויים ב DHCP Server.
dhcpd.conf is comprised of declarations regarding subnets and hosts, and is perhaps most easily explained using an example : dhcpd.conf מורכב הצהרות בנוגע לרשתות משנה ואת המארחים, והוא אולי הכי בקלות הסביר באמצעות דוגמה:
option domain-name “example.com”; (1) תחום האפשרות שם "example.com"; (1)
option domain-name-servers 192.168.4.100; (2) תחום באפשרות-שם שרתי 192.168.4.100; (2)
option subnet-mask 255.255.255.0; (3) אפשרות מסכת רשת משנה 255.255.255.0; (3)
default-lease-time 3600; (4) ברירת המחדל-זמן החכירה-3600; (4)
max-lease-time 86400; (5) max-lease-86400 זמן; (5)
ddns-update-style none; (6) DDNS-עדכון-סגנון לא; (6)
subnet 192.168.4.0 netmask 255.255.255.0 { subnet 192.168.4.0 netmask 255.255.255.0 (
range 192.168.4.129 192.168.4.254; (7) טווח 192.168.4.129 192.168.4.254; (7)
option routers 192.168.4.1; (8) נתבים אפשרות 192.168.4.1; (8)
} )
host mailhost { mailhost המארח (
hardware ethernet 02:03:04:05:06:07; (9) Ethernet חומרה 02:03:04:05:06:07; (9)
fixed-address mailhost.example.com; (10) כתובת קבועה mailhost.example.com; (10)
} )
(1) This option specifies the domain that will be provided to clients as the default search domain. (1) אפשרות זו מציינת את תחום כי יסופקו ללקוחות כמו תחום החיפוש המוגדר כברירת מחדל.
(2) This option specifies a comma separated list of DNS servers that the client should use. (2) אפשרות זו מציינת רשימה של ערכים מופרדים שרתי DNS אשר הלקוח אמור להשתמש.
(3) The netmask that will be provided to clients. (3) netmask כי יסופקו ללקוחות.
(4) A client may request a specific length of time that a lease will be valid. (4) לקוח יכול לבקש ספציפית של אורך זמן חכירה יהיו תקפות. Otherwise the server will assign a lease with this expiry value (in seconds). אחרת השרת תקצה חכירה עם ערך זה תפוגה (בשניות).
(5) This is the maximum length of time that the server will lease for. (5) זהו האורך המקסימלי של זמן כי השרת יהיה החכירה. Should a client request a longer lease, a lease will be issued, although it will only be valid for max-lease-time seconds. צריך בקשת הלקוח חכירה ארוך, חכירה יונפקו, אם כי זה יהיה רק תקף Max-החכירה-זמן שניות.
(6) This option specifies whether the DHCP server should attempt to update DNS when a lease is accepted or released. (6) אפשרות זו מציינת האם שרת DHCP צריכים לנסות לעדכן שליטת כאשר חכירה מקובל או שוחרר. In the ISC implementation, this option is required. ביישום ISC, אפשרות זו חובה.
(7) This denotes which IP addresses should be used in the pool reserved for allocating to clients. (7) זה מסמל כתובות IP אשר יש להשתמש בבריכה שמורות ההקצאה ללקוחות. IP addresses between, and including, the ones stated are handed out to clients. בין כתובות ה-IP, כולל, כאמור אלה הם חילקו ללקוחות.
(8) Declares the default gateway that will be provided to clients. (8) מכריז על שער ברירת מחדל, כי יסופקו ללקוחות.
(9) The hardware MAC address of a host (so that the DHCP server can recognize a host when it makes a request). (9) החומרה כתובות MAC של מחשב מארח (כך שרת DHCP יכול לזהות מארח כאשר זה גורם בקשה).
(10) Specifies that the host should always be given the same IP address. (10) מציין כי המארחת צריכה להיות תמיד נתון אותה כתובת IP. Note that using a hostname is correct here, since the DHCP server will resolve the hostname itself before returning the lease information. שים לב כי שימוש נכון המארח כאן, מאז שרת ה-DHCP יפתור את המארח עצמו לפני שחזר את המידע החכירה.
Once you have finished writing your dhcpd.conf, you can proceed to start the server by issuing the following command: לאחר שתסיים לכתוב dhcpd.conf שלך, תוכל להמשיך להפעיל את השרת על ידי הנפקת את הפקודה הבאה:
# /usr/local/etc/rc.d/isc-dhcpd.sh start # / Usr / local / etc / rc.d / ISC-להתחיל dhcpd.sh
Should you need to make changes to the configuration of your server in the future, it is important to note that sending a SIGHUP signal to dhcpd does not result in the configuration being reloaded, as it does with most daemons. אם עליך לבצע שינויים בתצורת השרת שלך בעתיד, חשוב לציין כי שולח איתות SIGHUP כדי dhcpd אינו תוצאה בתצורת להיות מחדש, כפי שהיא עושה עם daemons ביותר. A SIGTERM signal to stop the process, and then restart it using the command above. איתות SIGTERM כדי לעצור את התהליך, ולאחר מכן הפעל אותו מחדש באמצעות הפקודה לעיל. For example: לדוגמה:
# ps wax | grep dhcpd # PS שעווה | grep dhcpd
pid of dhcpd will be shown PID של dhcpd יוצגו
# kill -15 (pid of dhcpd) # להרוג -15 (PID של dhcpd)
IMPORTANT : The page is machine translated and provided "as is" without warranty. חשוב: הדף מכונת תירגם מתפרסם "כמות שהוא" ללא אחריות. Machine translation may be difficult to understand. תרגום מכונה יכול להיות קשה להבין. Please refer to נא עיין original English article המאמר המקורי באנגלית whenever possible. בכל הזדמנות אפשרית.
Related Articles מאמרים קשורים
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 2 התקנת שרת אינטרנט ב FreeBSD 6.0 עם Apache 2.2, MySQL 5.0 ו-PHP 5 - חלק 2
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 5 התקנת שרת אינטרנט ב FreeBSD 6.0 עם Apache 2.2, MySQL 5.0 ו-PHP 5 - חלק 5
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 3 התקנת שרת אינטרנט ב FreeBSD 6.0 עם Apache 2.2, MySQL 5.0 ו-PHP 5 - חלק 3
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 4 התקנת שרת אינטרנט ב FreeBSD 6.0 עם Apache 2.2, MySQL 5.0 ו-PHP 5 - חלק 4
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 1 התקנת שרת אינטרנט ב FreeBSD 6.0 עם Apache 2.2, MySQL 5.0 ו-PHP 5 - חלק 1
- Tips of How to Switch between DHCP and Static IP Network Automatically in Windows טיפים של איך לעבור בין DHCP וגם IP סטטי רשת אוטומטית ב-Windows
- FreeBSD 6.0 on VMware Server Time and Clock Slow Down FreeBSD 6.0 ב-VMware Server שעה ו שעון Slow Down
- Could Not Find Valid System Volume Error When Installing Windows Server 2008 (R2) לא יכולתי מצא Valid System Volume שגיאה בעת התקנת Windows Server 2008 (R2)
- Missing CD/DVD Device Driver Problem While Installing Vista on VMWare Server/ESX חסר CD / DVD Device Driver בבעיה בעת התקנה של Windows Vista ב-VMWare Server / ESX
- Checking Free Disk Space on FreeBSD Server בדיקת שטח דיסק חינם על שרת FreeBSD









































