Install the DHCP server on FreeBSD

Source: Internet
Author: User
Install the DHCP server on FreeBSD-general Linux technology-Linux technology and application information. For more information, see. Install the DHCP server on FreeBSD
System installation under Virtual Machine

Partition:/fs 500 M
Swap 256 M
/Usr fs 2048 M
/Var fs 500 M
/Tmp fs 500 M
/Home fs 1024 M
/Soft fs remaining space

Host Name: one
Account: root
Password 123456

# Vi/etc/rc. conf
Sshd_enable = "yes"
Ifconfig em0 (fxp0 in this project) 192.168.2.1 netmask 255.255.255.0
Ifconfig em1 (this project is nfe0) 192.168.3.1 netmask 255.255.255.0"
Under/etc
# Sh netstart // restart the network


Set ssh under/etc/ssh
# Vi sshd_config
// Make a modification
PermitRootLogin yes
PasswordAuthentication yes
PermitEmptyPasswords yes

Install DHCP
Mount to/mnt and copy the installation file to/soft for Installation
Tar zxvf dhcp-4.1.0.tar.gz under/soft
Under the dhcp-4.1.0
#./Configure
# Make
# Make install
Configure DHCP
# Find/-name dhcp. conf
# Cp/usr/local/etc/dhcp. conf/etc/dhcpd. conf
Edit dhcpd. conf under/etc/dhcpd. conf (delete all unused information temporarily)
# Vi/etc/dhcp. conf
Subnet 192.168.2.0 netmask 255.255.255.0 {
Server-identifier 192.168.2.1;
Range 192.168.2.10 192.168.2.250;
Option broadcast-address 192.168.2.255;
Default-lease-time 600;
Max-lease-time 7000;
}

Subnet 192.168.3.0 netmask 255.255.255.0 {
Server-identifier 192.168.3.1;
Range 192.168.3.10 192.168.3.250;
Option domain-name-servers 192.168.3.254;
Option routers 192.168.3.254;
Option broadcast-address 192.168.3.255;
Default-lease-time 600;
Max-lease-time 7000;
}

Host zhaojian {
Hardware Ethernet 00: 1b: fc: 4d: 96: 61
Fixed-address 192.168.2.50
}

Host nefu-jun {
Hardware Ethernet 00: 13: 77: b7: 52: f2
Fixed-address 192.168.2.150
}

Host sunjiachuan {
Hardware Ethernet 00: 24: 81: 6b: 60: 00
Fixed-address 192.168.3.50
}


Edit the resolv. conf file under/etc/


Under/etc
# Whereis dhcp
# Cd/usr/local/sbin
Note: All modified files must be backed up to/soft.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.