VectorLinux
October 31, 2014, 01:10:42 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: solved:restart dhcp..  (Read 2153 times)
ghartl1
Vectorite
***
Posts: 379


« on: December 18, 2007, 04:27:52 am »

hi, i use soho 5.8..

and a cablemodem with dynamic ip..so my box has installed dhcp too..works

just out of curiosity..how can i restart the dhcp server on my box?

first i searched the location...

root:# find / -name dhcp* | grep bin
/sbin/dhcpcd

but there is no dhcp under /sbin
is there a easier way to accomplish this?
i only saw a dump-file there..afaik it is also dhcp related..

btw: how can i restart my networkcard?
/etc/rc.d/rc.inet1   stop|start|restart...if i do this..then the dhcp-server will also be manipulated...but is there a way, how i can manipulate the dhcp-server without affecting the nic?

greets günter
« Last Edit: December 19, 2007, 08:24:23 am by ghartl1 » Logged
nightflier
Administrator
Vectorian
*****
Posts: 4026



« Reply #1 on: December 18, 2007, 05:40:10 am »

Are you referring to the dhcp client daemon on your VL box? That is /sbin/dhcpcd.
The dhcp server would be on your cable modem or router.

To stop the client you can do (as root):
killall dhcpcd

To restart it:
dhcpcd eth0 (assuming your network card is eth0).

Or, are you running your VL box as a router/dhcp server for other computers on your network?
« Last Edit: December 18, 2007, 05:44:42 am by nightflier » Logged
ghartl1
Vectorite
***
Posts: 379


« Reply #2 on: December 18, 2007, 09:12:05 am »

i get the ip from a dhcp server (thats my provider...so i only need a client...) but i cant see the client ?? in /usr/sbin...

killall dhcpcd..says no process killed...

my output from sbin..sorry its not aligned...

antichrist://usr/sbin
root:# ls
NdisConfig*             grpconv*            iwpriv*          removepkg*         udump*
accept*                 grpunconv*          iwspy*           repquota*          umount.cifs*
acpid*                  grub*               keytab-lilo.pl*  restore*           upgradepkg*
adduser*                grub-install*       klogd*           ripquery*          useradd*
alsaconf*               grub-md5-crypt*     lastlog*         routed*            userdel*
alsactl*                grub-set-default*   logoutd*         rpc.bootparamd*    usermod*
apmd*                   grub-terminfo*      logrotate*       rpc.lockd@         utempter*
atd*                    gslapt*             lpadmin*         rpc.mountd*        vigr@
atrun*                  hdparm*             lpc*             rpc.nfsd*          vipw*
automount*              ibench*             lpinfo*          rpc.rquotad*       visudo*
backup*                 icmpinfo*           lpmove*          rpc.rusersd*       warnquota*
cfdisk*                 iconvconfig*        makebootdisk*    rpc.rwalld*        winbindd*
checkinstall*           idecrypt*           makepak*         rpc.statd@         wpa_cli*
chpasswd*               ifplugd*            makewhatis*      rpcinfo*           wpa_passphrase*
clockdiff*              ifplugstatus*       mkinitrd*        rwhod*             wpa_supplicant*
config-services*        ifrename*           mkpasswd*        safe_finger*       xfs_admin*
crond*                  ikeygen*            mount.cifs*      saned*             xfs_bmap*
ctrlaltdel*             in.comsat*          mount.smbfs@     saslauthd*         xfs_check*
cups-genppd.5.0*        in.fingerd*         mouseconfig*     sasldblistusers2*  xfs_copy*
cups-genppdconfig.5.0*  in.identd*          netdate*         saslpasswd2*       xfs_db*
cups-genppdupdate.5.0*  in.ntalkd@          newusers*        setquota*          xfs_estimate*
cupsaddsmb*             in.rexecd*          nfsstat*         sfdisk*            xfs_freeze*
cupsd*                  in.rlogind*         nhfsgraph*       shadowconfig*      xfs_fsr*
dnsmasq*                in.rshd*            nhfsnums*        showmount*         xfs_growfs*
dpasswd*                in.talkd*           nhfsrun*         slapt-get*         xfs_info*
dump-acct*              in.telnetd*         nhfsstone*       slattach*          xfs_io*
dump-utmp*              in.tftpd*           nmbd*            slpd*              xfs_logprint*
edquota*                in.timed*           nscd*            smbd*              xfs_mkfile*
ethtool*                in.writed*          nscd_nischeck*   swat*              xfs_ncheck*
exportfs*               installpkg*         parted*          syslog_tst*        xfs_quota*
faillog*                ip6tables*          partprobe*       syslogd*           xfs_rtcp*
fbmngplay*              ip6tables-restore*  pkgtool*         tcpd*              xfsdump@
fbset*                  ip6tables-save*     pluginviewer*    tcpdchk*           xfsinvutil*
fbtruetype*             iptables*           pwck*            tcpdmatch*         xfsrestore@
fusdd*                  iptables-restore*   pwconv*          testsaslauthd*     xqmstats*
gpm*                    iptables-save*      pwunconv*        testver*           zdump*
groupadd*               iwconfig*           quot*            timeconfig*        zic*
groupdel*               iwevent*            quotastats*      timedc*
groupmod*               iwgetid*            rarpd*           try-from*
grpck*                  iwlist*             rdisc*           udevmonitor*


but if i deinstall the dhcp.tgz package..no internetconnection is possible.
with netconfig i set it to dhcp..yes and it works...
so where is my dhcp-client located?

any suggestions??

greets günter
Logged
bigpaws
Vectorian
****
Posts: 1856


« Reply #3 on: December 18, 2007, 09:51:24 am »

Use as root in a console:

updatedb wait for that to finish about 1-2 min

Then:

locate dhcpcd

Should be in /etc

To accomplish what you want then dhcpcd <interface name>

Bigpaws
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4026



« Reply #4 on: December 19, 2007, 05:07:08 am »

I see dnsmasq listed. Brainstorming.. doesn't that one include a dhcp client as well as server?
Logged
bigpaws
Vectorian
****
Posts: 1856


« Reply #5 on: December 19, 2007, 05:30:41 am »

No dnsmasq is a DSN forwarder works similar to bind.

Bigpaws
Logged
ghartl1
Vectorite
***
Posts: 379


« Reply #6 on: December 19, 2007, 06:58:10 am »

i did it...

so at least i found dhcpcd in /etc...
but not in /usr/sbin

also..there is no such process running (dhcpcd)..or is this process only running when retrieving the ip?

here my output...after updatedb

antichrist://home/didi
root:# killall dhcpcd
dhcpcd: no process killed
antichrist://home/didi
root:# dhcpcd eth0..no reaction..
antichrist://home/didi
root:# cd /usr/sbin/
antichrist://usr/sbin
root:# find dhcp
find: dhcp: No such file or directory
antichrist://usr/sbin
root:# find dhcp*
find: dhcp*: No such file or directory
antichrist://usr/sbin
root:# ls
NdisConfig*             icmpinfo*           newusers*          syslogd*
accept*                 iconvconfig*        nfsstat*           tcpd*
acpid*                  idecrypt*           nhfsgraph*         tcpdchk*
adduser*                ifplugd*            nhfsnums*          tcpdmatch*
alsaconf*               ifplugstatus*       nhfsrun*           testsaslauthd*
alsactl*                ifrename*           nhfsstone*         testver*
apmd*                   ikeygen*            nmbd*              timeconfig*
atd*                    in.comsat*          nscd*              timedc*
atrun*                  in.fingerd*         nscd_nischeck*     try-from*
automount*              in.identd*          parted*            udevmonitor*
backup*                 in.ntalkd@          partprobe*         udump*
cfdisk*                 in.rexecd*          pkgtool*           umount.cifs*
checkinstall*           in.rlogind*         pluginviewer*      upgradepkg*
chpasswd*               in.rshd*            pwck*              useradd*
clockdiff*              in.talkd*           pwconv*            userdel*
config-services*        in.telnetd*         pwunconv*          usermod*
crond*                  in.tftpd*           quot*              utempter*
ctrlaltdel*             in.timed*           quotastats*        vigr@
cups-genppd.5.0*        in.writed*          rarpd*             vipw*
cups-genppdconfig.5.0*  installpkg*         rdisc*             visudo*
cups-genppdupdate.5.0*  ip6tables*          removepkg*         warnquota*
cupsaddsmb*             ip6tables-restore*  repquota*          winbindd*
cupsd*                  ip6tables-save*     restore*           wpa_cli*
dnsmasq*                iptables*           ripquery*          wpa_passphrase*
dpasswd*                iptables-restore*   routed*            wpa_supplicant*
dump-acct*              iptables-save*      rpc.bootparamd*    xfs_admin*
dump-utmp*              iwconfig*           rpc.lockd@         xfs_bmap*
edquota*                iwevent*            rpc.mountd*        xfs_check*
ethtool*                iwgetid*            rpc.nfsd*          xfs_copy*
exportfs*               iwlist*             rpc.rquotad*       xfs_db*
faillog*                iwpriv*             rpc.rusersd*       xfs_estimate*
fbmngplay*              iwspy*              rpc.rwalld*        xfs_freeze*
fbset*                  keytab-lilo.pl*     rpc.statd@         xfs_fsr*
fbtruetype*             klogd*              rpcinfo*           xfs_growfs*
fusdd*                  lastlog*            rwhod*             xfs_info*
gpm*                    logoutd*            safe_finger*       xfs_io*
groupadd*               logrotate*          saned*             xfs_logprint*
groupdel*               lpadmin*            saslauthd*         xfs_mkfile*
groupmod*               lpc*                sasldblistusers2*  xfs_ncheck*
grpck*                  lpinfo*             saslpasswd2*       xfs_quota*
grpconv*                lpmove*             setquota*          xfs_rtcp*
grpunconv*              makebootdisk*       sfdisk*            xfsdump@
grub*                   makepak*            shadowconfig*      xfsinvutil*
grub-install*           makewhatis*         showmount*         xfsrestore@
grub-md5-crypt*         mkinitrd*           slapt-get*         xqmstats*
grub-set-default*       mkpasswd*           slattach*          zdump*
grub-terminfo*          mount.cifs*         slpd*              zic*
gslapt*                 mount.smbfs@        smbd*
hdparm*                 mouseconfig*        swat*
ibench*                 netdate*            syslog_tst*

antichrist://usr/sbin
root:# /etc/rc.d/rc.inet1 stop
Deleting gateway ...
Stopping network eth0 ...
****  dhcpcd: not running
antichrist://usr/sbin
root:# /etc/rc.d/rc.inet1 start
Starting network eth0 using a DHCP server...
dhcpcd: MAC address = xx:xx:xx:xx:xx:xx
dhcpcd: your IP address = 1.2.3.4
eth0      Link encap:Ethernet  HWaddr 00:10:DC:24:73:12
          inet addr:1.2.3.4  Bcast:255.255.255.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:37103 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2256 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4478757 (4.2 MiB)  TX bytes:396317 (387.0 KiB)
          Interrupt:20 Base address:0xc800

antichrist://usr/sbin
root:#       

here the line about using dhcp....

     root:# cat /etc/rc.d/rc.inet1.conf
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="YES"
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""


so....no idea where i can manipulate dhcp....
is it possible that the inetd daemon is necessary..in my case this daemon is deactivated...dont need any network services...

anyway..thanks meanwhile for your time

greets günter
Logged
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #7 on: December 19, 2007, 07:08:09 am »

according to your first post dhcpcd is in /sbin
Quote
root:# find / -name dhcp* | grep bin
/sbin/dhcpcd
but you keep trying to find it in /usr/sbin??
as root you can call "dhcpcd eth0" without the path because /sbin is in your path.
to stop it you run "dhcpcd -k eth0"

HTH,
Uelsk8s
Logged
ghartl1
Vectorite
***
Posts: 379


« Reply #8 on: December 19, 2007, 08:24:04 am »

dhcpcd -k eth0...worked...

and yes....dhcpcd is in /sbin

thanks..

greets günter
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!