--- On Fri, 11/14/08, Antonio Olivares <olivares14031@xxxxxxxxx> wrote: > From: Antonio Olivares <olivares14031@xxxxxxxxx> > Subject: Re: Make a DHCP server using Fedora - Help > To: fedora-list@xxxxxxxxxx > Date: Friday, November 14, 2008, 5:52 PM > --- On Fri, 11/14/08, Antonio Olivares > <olivares14031@xxxxxxxxx> wrote: > > > From: Antonio Olivares <olivares14031@xxxxxxxxx> > > Subject: Re: Make a DHCP server using Fedora - Help > > To: "Community assistance, encouragement, and > advice for using Fedora." > <fedora-list@xxxxxxxxxx> > > Date: Friday, November 14, 2008, 5:42 PM > > --- On Fri, 11/14/08, Sam Varshavchik > > <mrsam@xxxxxxxxxxxxxxx> wrote: > > > > > From: Sam Varshavchik > <mrsam@xxxxxxxxxxxxxxx> > > > Subject: Re: Make a DHCP server using Fedora - > Help > > > To: "Community assistance, encouragement, > and > > advice for using Fedora." > > <fedora-list@xxxxxxxxxx> > > > Date: Friday, November 14, 2008, 5:23 PM > > > Antonio Olivares writes: > > > > > > > [root@localhost network-scripts]# ifconfig > -a > > > > eth0 Link encap:Ethernet HWaddr > > > 00:0E:A6:42:59:AF inet > addr:10.154.19.210 > > > Bcast:10.154.19.255 Mask:255.255.255.0 > > > > > > Your eth0 has ip 10.154.19.210 > > > > > > > [root@localhost ~]# dhcpd -f > > > > Internet Systems Consortium DHCP Server > 4.0.0 > > > > Copyright 2004-2007 Internet Systems > Consortium. > > > > All rights reserved. > > > For > > > info, please visit http://www.isc.org/sw/dhcp/ > > > > Not searching LDAP since ldap-server, > ldap-port > > and > > > ldap-base-dn were not specified in the config > file > > > > > > Wrote 0 > > class > > > decls to leases file. > > > > > > 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 eth0 > (10.154.19.210). > > > > > > dhcpd is telling you, right here, what's > broken. > > > > > > > # This is a very basic subnet declaration. > > > > > > > > subnet 10.254.239.0 netmask 255.255.255.224 > { > > > > range 10.254.239.10 10.254.239.20; > > > option > > > routers rtr-239-0-1.example.org, > > rtr-239-0-2.example.org; > > > > } > > > > > > > > > > > > What's this? Your eth0's IP address is > > > 10.154.19.210. You need remove all subnet > declarations > > in > > > dhcp.conf, and provide a subnet declaration for > > > 10.154.19.0/24 > > > > > > > > > -- > > > > Ok, > > I changed the /etc/dhcpd.conf > > > > and I get [root@localhost ~]# dhcpd -f > > Internet Systems Consortium DHCP Server 4.0.0 > > Copyright 2004-2007 Internet Systems Consortium. > > All rights reserved. > > For info, please visit http://www.isc.org/sw/dhcp/ > > Warning: subnet 10.154.19.0/27 overlaps subnet > > 10.154.19.0/24 > > Not searching LDAP since ldap-server, ldap-port and > > ldap-base-dn were not specified in the config file > > > > > Wrote 0 leases to leases file. > > > > > Listening on LPF/eth0/00:0e:a6:42:59:af/10.154.19.0/24 > > > > > Sending on LPF/eth0/00:0e:a6:42:59:af/10.154.19.0/24 > > > > > Sending on Socket/fallback/fallback-net > > ^C > > [root@localhost ~]# service dhcpd start > > Starting dhcpd: > > > [FAILED] > > [root@localhost ~]# service dhcpd stop > > [root@localhost ~]# service dhcpd start > > Starting dhcpd: > > > [FAILED] > > [root@localhost ~]# dhcpd -f > > Internet Systems Consortium DHCP Server 4.0.0 > > Copyright 2004-2007 Internet Systems Consortium. > > All rights reserved. > > For info, please visit http://www.isc.org/sw/dhcp/ > > Warning: subnet 10.154.19.0/27 overlaps subnet > > 10.154.19.0/24 > > Not searching LDAP since ldap-server, ldap-port and > > ldap-base-dn were not specified in the config file > > Wrote 0 leases to leases file. > > Listening on LPF/eth0/00:0e:a6:42:59:af/10.154.19.0/24 > > Sending on LPF/eth0/00:0e:a6:42:59:af/10.154.19.0/24 > > Sending on Socket/fallback/fallback-net > > > > > > but service still fails :( > > > > [root@localhost ~]# service dhcpd start > > Starting dhcpd: > > > [FAILED] > > [root@localhost ~]# service dhcpd stop > > [root@localhost ~]# service dhcpd start > > Starting dhcpd: > > > [FAILED] > > > > > > Here's file: > > > > [root@localhost ~]# cat /etc/dhcpd.conf > > # dhcpd.conf > > # > > # Sample configuration file for ISC dhcpd > > # > > > > # option definitions common to all supported > networks... > > option domain-name "example.org"; > > > > > option domain-name-servers ns1.example.org, > > ns2.example.org; > > > > default-lease-time 600; > > max-lease-time 7200; > > > > # Use this to enble / disable dynamic dns updates > globally. > > #ddns-update-style none; > > > > > # If this DHCP server is the official DHCP server for > the > > local > > # network, the authoritative directive should be > > uncommented. > > authoritative; > > > > # Use this to send dhcp log messages to a different > log > > file (you also > > # have to hack syslog.conf to complete the > redirection). > > log-facility local7; > > > > # No service will be given on this subnet, but > declaring it > > helps the > > # DHCP server to understand the network topology. > > > > subnet 10.154.19.0 netmask 255.255.255.0 { > > } > > > > # This is a very basic subnet declaration. > > > > subnet 10.154.19.0 netmask 255.255.255.224 { > > range 10.154.19.10 10.154.19.20; > > option routers rtr-239-0-1.example.org, > > rtr-239-0-2.example.org; > > } > > > > > > Thank you for helping out! > > > > Antonio > > > > > > > > > > -- > > > Quick question: > > Simple troubleshooting steps and tips For DHCP > > If things didn’t go as you excepted–for example, the > dhcp server didn’t start–you should do a bit of > troubleshooting. DHCP can be very frustrating to fix. Here > are a few things to check: > > 1. Configure DHCP to only listen on a specific interface. > Being explicit is always a safe bet, so you can edit > /etc/sysconfig/dhcpd and define the interface to listen on. > For eth0, this would look like: > > # Command line options here > DHCPDARGS=eth0 > > eth0 is the one that gets an IP from the network, The eth1 > is the one that should send the packets to the Networking > switch which will give out the ips and dns and all. > > I have installed bind as well. I am not sure if the > iptables are masquerading to send the packets out? and also > I am not sure if the DHCPARGS=eth0 or eth1. > > Thanks, > > Antonio > > > > > > -- Breakthrough, changed the ARGS to [olivares@localhost ~]$ cat /etc/sysconfig/dhcpd # Command line options here DHCPDARGS=eth0 and it is working :) [root@localhost ~]# dhcpd -f Internet Systems Consortium DHCP Server 4.0.0 Copyright 2004-2007 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Warning: subnet 10.154.19.0/27 overlaps subnet 10.154.19.0/24 Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file Wrote 0 leases to leases file. Listening on LPF/eth0/00:0e:a6:42:59:af/10.154.19.0/24 Sending on LPF/eth0/00:0e:a6:42:59:af/10.154.19.0/24 Sending on Socket/fallback/fallback-net ^C [root@localhost ~]# service dhcpd stop [root@localhost ~]# service dhcpd start Starting dhcpd: [ OK ] but now selinux gets in the way :( Nov 14 20:03:40 localhost kernel: type=1400 audit(1226714620.135:183): avc: denied { read } for pid=5267 comm="dhcpd" name="dhcpd.pid" dev=dm-0 ino=3244731 scontext=unconfined_u:system_r:dhcpd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file Nov 14 20:03:40 localhost kernel: type=1400 audit(1226714620.135:184): avc: denied { write } for pid=5267 comm="dhcpd" name="dhcpd.pid" dev=dm-0 ino=3244731scontext=unconfined_u:system_r:dhcpd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file Nov 14 20:03:40 localhost dhcpd: Can't create PID file /var/run/dhcpd.pid: Permission denied. How can I allow it to work? Thanks, Antonio -- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines