Difference between revisions of "FreePBX/en/dhcp server"
From Teknologisk videncenter
m (→Configuring DHCP) |
m |
||
Line 1: | Line 1: | ||
+ | =Static IP on DHCP server= | ||
+ | In order for the DHCP to start when CentOS is bootet it is necesary to have an static IP address on the interface connected to the network. | ||
+ | |||
+ | edit /etc/sysconfig/network-scripts/ifcfg-eth1 to contain | ||
+ | <source lang=cli> | ||
+ | DEVICE=eth0 | ||
+ | ONBOOT=yes | ||
+ | BOOTPROTO=none | ||
+ | NETMASK=255.255.0.0 | ||
+ | IPADDR=172.24.0.2 | ||
+ | </source> | ||
=Install DHCP server on Centos= | =Install DHCP server on Centos= | ||
<source lang=cli> | <source lang=cli> |
Revision as of 12:39, 8 May 2013
Contents
Static IP on DHCP server
In order for the DHCP to start when CentOS is bootet it is necesary to have an static IP address on the interface connected to the network.
edit /etc/sysconfig/network-scripts/ifcfg-eth1 to contain
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.0.0
IPADDR=172.24.0.2
Install DHCP server on Centos
[root@localhost etc]# <input>yum install dhcp</input>
Loaded plugins: fastestmirror, kmod
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package dhcp.x86_64 12:4.1.1-31.0.1.P1.el6.centos.1 will be installed
--> Processing Dependency: portreserve for package: 12:dhcp-4.1.1-31.0.1.P1.el6.centos.1.x86_64
--> Running transaction check
---> Package portreserve.x86_64 0:0.0.4-9.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dhcp x86_64 12:4.1.1-31.0.1.P1.el6.centos.1 updates 818 k
Installing for dependencies:
portreserve x86_64 0.0.4-9.el6 base 23 k
Transaction Summary
================================================================================
Install 2 Package(s)
Total download size: 840 k
Installed size: 1.9 M
Is this ok [y/N]: <input>y</input>
<notice>... OUTPUT OMITTED ...</notice>
Installed:
dhcp.x86_64 12:4.1.1-31.0.1.P1.el6.centos.1
Dependency Installed:
portreserve.x86_64 0:0.0.4-9.el6
Complete!
Configuring DHCP
Configure /etc/dhcp/dhcpd.conf using your favorite UNIX editor.
ddns-update-style none;
option tftp code 150 = ip-address;
server-name "freepbx.henrik.dk";
subnet 172.24.0.0 netmask 255.255.0.0 {
range dynamic-bootp 172.24.100.1 172.24.199.255;
option routers 172.24.0.1;
option subnet-mask 255.255.0.0;
option tftp 172.24.0.2;
option domain-name "Hold2.tekkom.dk";
option domain-name-servers 10.2.1.11
;
}
Starting DHCP
[root@localhost etc]# <input>service dhcpd start</input>
Starting dhcpd: [OK]
[root@localhost etc]# <input>chkconfig --level 2345 dhcpd on</input>