how to start the /sbin/dhcpd to run in slackware 12.2
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761
Rep:
/sbin/dhcpd is the dhcp server which hands out IP addresses.
/sbin/dhcpcd is the dhcp client which requests IP addresses.
It's possible your computer either has a firewall blocking dhcp requests or you don't have a good network connection or your network dhcp server is misconfigured.
By default /sbin/dhcpd is not started in Slackware. An entry can be placed in /etc/rc.d/rc.local for it to start if your computer is configured to hand out IP addresses for your local network. Slackware uses /etc/rc.d/rc.dnsmasq to have your computer be a small DNS/DHCP server.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Quote:
it displays /sbin/dhcpd: not running, then it shows timed out
This is because a network restart first attempts to kill dhcpcd which will report it's not running as it failed first time. It looks like you are having trouble getting any joy from the DHCP server. As a little test you can run this :
Code:
/sbin/dhcpcd -k
/sbin/dhcpcd eth0
Although this is basically the same as running /etc/rc.d/rc.inet1 restart. This considers your network interface is eth0.
Have a look at the two files /var/log/{messages,debug} to see what's going on with the DHCP request. As said it could be a firewall, bad connection or DHCP server misconfiguration. If it's a wireless device your trying there are other problems that can cause it to fail. The logs are the first place, though, to see what's happening.
These are the results in the log file when i issue your sbin commands:
Code:
/sbin/dhcpcd -k
/sbin/dhcpcd eth0
Results from the /var/messages
Code:
Jun 28 15:07:08 slack kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun 28 15:07:08 slack kernel: e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
Jun 28 15:07:08 slack kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Results from /var/debug
Code:
Jun 28 15:03:54 slack dhcpcd[6290]: Broadcasting DHCP_DISCOVER
Jun 28 15:04:05 slack kernel: eth0: no IPv6 routers present
Jun 28 15:07:08 slack dhcpcd[6329]: Broadcasting DHCP_DISCOVER
Jun 28 15:07:19 slack kernel: eth0: no IPv6 routers present
I'm not pro in the networking area. What is the ipv6 router about?
You can run 'netconfig' again to setup your network if the device drivers are installed. 'Configuring your network in Slackware' would be a good place to reference.
What does 'dmesg |grep -i eth' and 'ifconfig -a', 'route -n' from the cli show?
This link and others are available from 'Slackware-Links'. More than just SlackwareŽ links!
Yes, i have already use netconfig to do the setup.
The steps i have done while using netconfig:
1) Enter hostname call slack
2) Enter domain name call slack.com
3) Select dhcp server to configure ethernet
4) the dhcp hostname i leave it blank
5) then i select 'yes' to continue
Below are the responses from each command issue:
Code:
root@slack:~# dmesg |grep -i eth
Driver 'st' needs updating - please use bus_type methods
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
e100: eth0: e100_probe: addr 0x80100000, irq 9, MAC addr 00:00:e2:4d:0b:0a
e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
ADDRCONF(NETDEV_UP): eth0: link is not ready
e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present
Code:
root@slack:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:00:e2:4d:0b:0a
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:632 (632.0 B) TX bytes:632 (632.0 B)
Code:
root@slack:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
Inside /etc/rc.d/rc.inet1.conf, these are the settings:
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]="slack"
Any solutions or reason why i'm not able to set the ethernet? I'm not running behind a firewall and another computer of mine is able to connect to the internet
Thanks
Last edited by vitalstrike82; 06-28-2009 at 08:07 AM.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Quote:
Any solutions or reason why i'm not able to set the ethernet? I'm not running behind a firewall and another computer of mine is able to connect to the internet
Well it simply looks like you're not getting a reply from the DHCP server. If you want to get low level about this one test would be to run this in a terminal :
Code:
su -c "tcpdump -i eth0 'port 67 or port 68'"
then switch to another terminal and run :
Code:
su -c "dhcpcd eth0"
Then switch to the first terminal running tcpdump and look at the output. You should see a "BOOTP/DHCP, Request" but also a "BOOTP/DHCP, Reply". I don't think your getting the reply. This could be down to a DHCP server setting or connection problem. To be honest I think this will just confirm what you are seeing (or not seeing) in the log files - i.e. no DHCP server reply.
However - if you know the subnet address you can just try a static IP setting and get on the network that way. You'll need to know DNS server and gateway (router) address settings (usually just your router) to get on the internet with it. Just because your network is set to DHCP you can should still be able to try static addresses.
Yes, i have already use netconfig to do the setup.
The steps i have done while using netconfig:
1) Enter hostname call slack
2) Enter domain name call slack.com <<<--- WHY
3) Select dhcp server to configure ethernet <<<< --- identify
4) the dhcp hostname i leave it blank <<<<<--- no it was set as 'slack'
5) then i select 'yes' to continue
Below are the responses from each command issue:
Code:
root@slack:~# dmesg |grep -i eth
Driver 'st' needs updating - please use bus_type methods
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
e100: eth0: e100_probe: addr 0x80100000, irq 9, MAC addr 00:00:e2:4d:0b:0a
e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
ADDRCONF(NETDEV_UP): eth0: link is not ready
e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present
Code:
root@slack:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:00:e2:4d:0b:0a
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:632 (632.0 B) TX bytes:632 (632.0 B)
Code:
root@slack:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
Inside /etc/rc.d/rc.inet1.conf, these are the settings:
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]="slack"<<<--- set up as slack
Any solutions or reason why i'm not able to set the ethernet? I'm not running behind a firewall and another computer of mine is able to connect to the internet
Thanks
I would setup a static IP first on your subnet, do as root from cli;
Code:
~#ifconfig -a #get recognized devices
~#ifconfig eth0 192.168.0.10 #set to a available IP
~#route add default gw 192.168.0.1 #set to your gateway
~#route -n #show the route table
~#ifconfig eth0 up #should be up already
~#ping 192.168.0.1 #ping your gateway
~#ping 208.69.32.130 #google.com IP
~#ping google.com #test DNS, if fail then
#check /etc/resolv.conf
You should have your '/etc/resolv.conf' setup with your 'ISP DNS' nameservers.
Code:
sample '/etc/resolv.conf';
search 192.168.0.1
nameserver xxx.xxx.xxx.xxx #ISP DSN 'replace xxx.xxx.xxx.xxx
#with IP from your ISP
nameserver 4.2.2.1 #Verizon third level DNS
nameserver 4.2.2.2
nameserver 4.2.2.3
nameserver 4.2.2.4
I like to use a third level DNS along with my ISP DNS. I've found that verizon is very reliable.
What about the gateway in your '/etc/rc.d/rc.inet1.conf' file?
Post your '/etc/rc.d/rc.inet1.conf'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.