This is a discussion on OT: What is command to get IP from router? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> This is an academic exercise only, so ignore if busy. Problem: Two Slack 9.1 machines connected to Linksys router ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| This is an academic exercise only, so ignore if busy. Problem: Two Slack 9.1 machines connected to Linksys router via DHCP. One machine (laptop) is powered up each morning and the Linksys config page's DHCP Client table lists it. Other machine has been on for many months, but in that time router has had short outages due to power. Thus, its IP is NOT on the table. (All of this is verified from postings by others in Usenet who are 'Linksys experts'... or more so than am I!) I'm told (by Windows users) that if I re-boot my computer it will request a new IP from router and get back on the Linksys config's DHCP table. I believe there is some Linux command that will cause the router to 'release' my IP and give me a new one and avoid a re-boot. Does anyone know such a command? Everything works fine. I don't NEED to have the IP show up on the table... I know it's 192.168.1.101.... I'm just curious and trying to increase my system admin. knowledge. Thanks, Al |
| |||
| Al C. wrote: > This is an academic exercise only, so ignore if busy. >Snip >>>>> > believe there is some Linux command that will cause the router to > 'release' my IP and give me a new one and avoid a re-boot. Does anyone > know such a command? > Snip >>>>>> > Thanks, > Al Read in the /etc/rc.d/rc.inet1 how to do it. There is a section about how to take down an interface and how to bring it up again. Micke -- # The truth lies in there, # # somewhere in the manual. # |
| |||
| Al C. wrote: > This is an academic exercise only, so ignore if busy. > > Problem: Two Slack 9.1 machines connected to Linksys router via DHCP. > One machine (laptop) is powered up each morning and the Linksys config > page's DHCP Client table lists it. Other machine has been on for many > months, but in that time router has had short outages due to power. > Thus, its IP is NOT on the table. (All of this is verified from > postings by others in Usenet who are 'Linksys experts'... or more so > than am I!) > > I'm told (by Windows users) that if I re-boot my computer it will > request a new IP from router and get back on the Linksys config's DHCP > table. I believe there is some Linux command that will cause the > router to 'release' my IP and give me a new one and avoid a re-boot. > Does anyone know such a command? > > Everything works fine. I don't NEED to have the IP show up on the > table... I know it's 192.168.1.101.... I'm just curious and trying to > increase my system admin. knowledge. > > Thanks, > Al Try; sudo /etc/rc.d/rc.inet1 -- Robert - slackware |
| |||
| On Thu, 26 Aug 2004 11:16:33 -0700, "Al C." <no.spam.acanton@adams-blake.no.spam.com> wrote: >This is an academic exercise only, so ignore if busy. > >Problem: Two Slack 9.1 machines connected to Linksys router via DHCP. One >machine (laptop) is powered up each morning and the Linksys config page's >DHCP Client table lists it. Other machine has been on for many months, but in >that time router has had short outages due to power. Thus, its IP is NOT on >the table. (All of this is verified from postings by others in Usenet who are >'Linksys experts'... or more so than am I!) > >I'm told (by Windows users) that if I re-boot my computer it will request a >new IP from router and get back on the Linksys config's DHCP table. I believe >there is some Linux command that will cause the router to 'release' my IP and >give me a new one and avoid a re-boot. Does anyone know such a command? > >Everything works fine. I don't NEED to have the IP show up on the table... I >know it's 192.168.1.101.... I'm just curious and trying to increase my system >admin. knowledge. > >Thanks, >Al Just a guess, but kill -HUP <pid of dhcpcd> may do it. Scott McMillan |
| |||
| Al C. wrote: > I'm told (by Windows users) that if I re-boot my computer the windows solution for everything. well, if you're lucky. > it will request a > new IP from router and get back on the Linksys config's DHCP table. I believe > there is some Linux command that will cause the router to 'release' my IP and > give me a new one and avoid a re-boot. Does anyone know such a command? read 'man dhcpcd' and you'll know all you need to know. then look through /etc/rc.d/rc.inet19(.conf) and see how slackware implements it. -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) |
| |||
| On Thu, 26 Aug 2004 18:43:34 +0000, micke wrote: > Al C. wrote: > >> This is an academic exercise only, so ignore if busy. >>Snip >>>>> >> believe there is some Linux command that will cause the router to >> 'release' my IP and give me a new one and avoid a re-boot. Does anyone >> know such a command? >> Snip >>>>>> >> Thanks, >> Al > > Read in the /etc/rc.d/rc.inet1 how to do it. There is a section about how to > take down an interface and how to bring it up again. > Micke The daemon that takes care of obtaining IP addresses (and therefore releasing them as well?) is the dhcpcd. (DHCP client daemon). Take a look for that in rc.inet1 perhaps. HTH, sb -- Remove spamtrap to reply by email. |
| |||
| Al C. wrote: > Scott McMillan wrote: > >> Just a guess, but kill -HUP <pid of dhcpcd> may do it. > > I'm not running DHCP. The Linksys router does all of that heavy lifting for > me. Sorry. I should have made that clear. yes you are. if not, your PC's wouldn't be getting an IP address from the router, and they would not show up in the "DHCP table" of the router. -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) |
| |||
| On Thu, 26 Aug 2004 12:44:44 -0700, Al C. wrote: > Scott McMillan wrote: > > >> Just a guess, but kill -HUP <pid of dhcpcd> may do it. > > I'm not running DHCP. The Linksys router does all of that heavy lifting for > me. Sorry. I should have made that clear. > Not a DHCP server no, but you are running the cleint - dhcpcd (DHCP client daemon) A better way to kill than kill -HUP it is to do /sbin/dhcpcd -k Having just got a router myself, I've been looking into this recently, too. HTH, sb -- Remove spamtrap to reply by email. |
| ||||
| standardblue wrote: > On Thu, 26 Aug 2004 12:44:44 -0700, Al C. wrote: > >> Scott McMillan wrote: >> >> >>> Just a guess, but kill -HUP <pid of dhcpcd> may do it. >> >> I'm not running DHCP. The Linksys router does all of that heavy lifting for >> me. Sorry. I should have made that clear. >> > > Not a DHCP server no, but you are running the cleint - dhcpcd (DHCP client > daemon) > Hmmm. I didn't know that. I thought all of this IP stuff was handled by something in the kernel and and that init1 turned it on or off based upon what is in the inet1.conf file. Live and learn. > A better way to kill than kill -HUP it is to do > /sbin/dhcpcd -k > From the man page: -k Sends SIGHUP signal to the dhcpcd process that is currently running. If dhcpcd receives SIGHUP it will send DCHP_RELEASE message to the server and destroy dhcpcd cache. In a case dhcpcd receives SIGTERM which is normally used by shutdown(8) when rebooting the system dhcpcd will not send DHCP_RELEASE and will not destroy cache. When system boots dhcpcd will use cache to request the same IP address from DHCP server which was assigned before the system went down. OK, how do I get the darn thing back up again? re-run rc.d/init1? Or can I just execute it from the command line without an arguement? If you take down the eth0 via ifconfig (ifconfig eth0 -down) , would that have any effect on obtaining a new IP when you brought it back "up" again? I kind of doubt it but you would know better than I. Getting close here. ANC |