Senin, 08 Juli 2013

Howto install and configure DHCP Server on Fedora 18

Howto install and configure DHCP Server on Fedora 18
install configure DHCP Server Fedora 18



1. Install DHCP package by yum :
[root@fedora18 ~]# yum -y install dhcp
Loaded plugins: langpacks, presto, refresh-packagekit
fedora/18/i386/metalink | 9.6 kB 00:00
updates/18/i386/metalink | 5.8 kB 00:00
updates | 4.6 kB 00:00
updates/primary_db | 7.4 MB 00:43
updates/group_gz | 368 kB 00:01
Resolving Dependencies
–> Running transaction check
—> Package dhcp.i686 12:4.2.5-7.fc18 will be installed
–> Processing Dependency: dhcp-libs(x86-32) = 12:4.2.5-7.fc18 for package: 12:dhcp-4.2.5-7.fc18.i686
–> Processing Dependency: dhcp-common = 12:4.2.5-7.fc18 for package: 12:dhcp-4.2.5-7.fc18.i686
–> Running transaction check
—> Package dhcp-common.i686 12:4.2.4-23.P2.fc18 will be updated
–> Processing Dependency: dhcp-common = 12:4.2.4-23.P2.fc18 for package: 12:dhclient-4.2.4-23.P2.fc18.i686
—> Package dhcp-common.i686 12:4.2.5-7.fc18 will be an update
—> Package dhcp-libs.i686 12:4.2.4-23.P2.fc18 will be updated
—> Package dhcp-libs.i686 12:4.2.5-7.fc18 will be an update
–> Running transaction check
—> Package dhclient.i686 12:4.2.4-23.P2.fc18 will be updated
—> Package dhclient.i686 12:4.2.5-7.fc18 will be an update
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dhcp i686 12:4.2.5-7.fc18 updates 510 k
Updating for dependencies:
dhclient i686 12:4.2.5-7.fc18 updates 275 k
dhcp-common i686 12:4.2.5-7.fc18 updates 167 k
dhcp-libs i686 12:4.2.5-7.fc18 updates 122 k
Transaction Summary
================================================================================
Install 1 Package
Upgrade ( 3 Dependent packages)
Total download size: 1.0 M
Downloading Packages:
Setting up and reading Presto delta metadata
dhcp-4.2.5-7.fc18.i686.rpm FAILED
http://mirrors.ispros.com.bd/fedora/updates/18/i386/dhcp-4.2.5-7.fc18.i686.rpm: [Errno 14] HTTP Error 404 – Not Found : http://mirrors.ispros.com.bd/fedora/updates/18/i386/dhcp-4.2.5-7.fc18.i686.rpm
Trying other mirror.
warning: /var/cache/yum/i386/18/updates/packages/dhcp-libs-4.2.5-7.fc18.i686.rpm: Header V3 RSA/SHA256 Signature, key ID de7f38bd: NOKEY
Public key for dhcp-libs-4.2.5-7.fc18.i686.rpm is not installed
(1/4): dhcp-libs-4.2.5-7.fc18.i686.rpm | 122 kB 00:08
(2/4): dhcp-common-4.2.5-7.fc18.i686.rpm | 167 kB 00:09
(3/4): dhcp-4.2.5-7.fc18.i686.rpm | 510 kB 00:06
(4/4): dhclient-4.2.5-7.fc18.i686.rpm | 275 kB 00:29
——————————————————————————–
Total 36 kB/s | 1.0 MB 00:29
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386
Importing GPG key 0xDE7F38BD:
Userid : “Fedora (18) <fedora@fedoraproject.org>”
Fingerprint: 7efb 8811 dd11 e380 b679 fced ff01 125c de7f 38bd
Package : fedora-release-18-1.noarch (@anaconda)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : 12:dhcp-libs-4.2.5-7.fc18.i686 1/7
Updating : 12:dhcp-common-4.2.5-7.fc18.i686 2/7
Installing : 12:dhcp-4.2.5-7.fc18.i686 3/7
Updating : 12:dhclient-4.2.5-7.fc18.i686 4/7
Cleanup : 12:dhclient-4.2.4-23.P2.fc18.i686 5/7
Cleanup : 12:dhcp-common-4.2.4-23.P2.fc18.i686 6/7
Cleanup : 12:dhcp-libs-4.2.4-23.P2.fc18.i686 7/7
Verifying : 12:dhcp-4.2.5-7.fc18.i686 1/7
Verifying : 12:dhcp-common-4.2.5-7.fc18.i686 2/7
Verifying : 12:dhclient-4.2.5-7.fc18.i686 3/7
Verifying : 12:dhcp-libs-4.2.5-7.fc18.i686 4/7
Verifying : 12:dhcp-common-4.2.4-23.P2.fc18.i686 5/7
Verifying : 12:dhclient-4.2.4-23.P2.fc18.i686 6/7
Verifying : 12:dhcp-libs-4.2.4-23.P2.fc18.i686 7/7
Installed:
dhcp.i686 12:4.2.5-7.fc18
Dependency Updated:
dhclient.i686 12:4.2.5-7.fc18 dhcp-common.i686 12:4.2.5-7.fc18
dhcp-libs.i686 12:4.2.5-7.fc18
Complete!
2. Set static IP address for DHCP Server:
[root@fedora18 ~]# vi /etc/sysconfig/network-scripts/ifcfg-p3p1
HWADDR=00:0C:29:EB:67:E9
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=p3p1
UUID=6e8bde7b-1469-43f9-b4eb-1a95e84d0f91
ONBOOT=yes
IPADDR=192.168.117.2
NETMASK=255.255.255.0
BROADCAST=192.168.117.255
NETWORK=192.168.117.0
GATEWAY=192.168.117.1
3. Configure DHCP subnet for the network:
[root@fedora18 ~]# vi /etc/dhcp/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.example
# see dhcpd.conf(5) man page
#
subnet 192.168.117.0 netmask 255.255.255.0 {
range 192.168.117.10 192.168.117.254;
option domain-name “ithelpblog.com”;
option domain-search “ithelpblog.com”, “linux.ithelpblog.com”, “windows.ithelpblog.com”, “cisco.ithelpblog.com”;
option domain-name-servers 192.168.117.3;
option routers 192.168.117.1;
}
4. Start and enable DHCP Server at boot time:
[root@fedora18 ~]# systemctl start dhcpd.service
[root@fedora18 ~]# systemctl enable dhcpd.service
5. Now clients can get IPs from our DHCP Server:
install configure DHCP Server Fedora 18 2

Tidak ada komentar:

Posting Komentar