LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-04-2005, 12:12 AM   #1
Ishkabibble
Member
 
Registered: Aug 2003
Location: Worcester MA
Distribution: Ubuntu 8.04
Posts: 120

Rep: Reputation: 15
Slackware release/renew of IP address


Periodically I need to release and renew the IP address on my PC manually. How do you do that on Slackware 10.1?
 
Old 07-04-2005, 01:16 AM   #2
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
$su
#dhcpcd

it might say that you need to remove a file, cause the ip could still be viable.. if so remove it..

#rm /etc/dhcpc/dhcpcd-eth0.pid

then run dhcpcd

#dhcpcd

you can also specify which adapter. say you have a laptop and the ethernet card is eth0 and the wireless eth1 you can just run..

#dhcpcd eth0 -for the network card...

or

#dhcpcd eth1 -for the wireless card.
 
Old 07-04-2005, 01:21 AM   #3
linux-rulz
Member
 
Registered: Dec 2004
Distribution: Windows XP Home, Ubuntu Hoary
Posts: 584

Rep: Reputation: 30
I'm not sure if this is Debian/Ubuntu specific, but I find this command works for me.

ifdown eth0 && ifup eth0

Hopefully one of our responses help
 
Old 07-04-2005, 01:23 AM   #4
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
if you want you could make a script that removes the file then runs dhcpcd that way you dont have to type the rm /etc/.... and all that. just name the script something like dhcp_renew.. so

#pico /root/dhcp_renew

rm /etc/dhcpc/dhcpcd-eth0.pid
rm /etc/dhcpc/dhcpcd-eth1.pid
dhcpcd

then make it executable

#chmod 755 /root/dhcp_renew

you could also add something like

xterm -hold -e ifconfig

to the end of the script and it will display the ip after if finds one... but you mgiht have to set a sleep state like

sleep 10
xterm -h and all that stuff.
 
Old 07-04-2005, 01:25 AM   #5
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
well you could brind the interfaces down and back up,, but you shouldnt need to. the actual commands are

#ifconfig eth0 down - of course eth0 or eth1 or wahtever
#ifconfig eth0 up - " " " " " " " "

but should be able to do it with dhcpcd that is what it is for.
 
Old 07-04-2005, 01:30 AM   #6
linux-rulz
Member
 
Registered: Dec 2004
Distribution: Windows XP Home, Ubuntu Hoary
Posts: 584

Rep: Reputation: 30
Quote:
well you could brind the interfaces down and back up,, but you shouldnt need to. the actual commands are

#ifconfig eth0 down - of course eth0 or eth1 or wahtever
#ifconfig eth0 up - " " " " " " " "

but should be able to do it with dhcpcd that is what it is for.
Hmmm, weird, ifup and ifdown work for me....
 
Old 07-05-2005, 02:31 AM   #7
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
right probably distro specific or a third party tool. not in the install of slack.
 
Old 09-28-2005, 04:48 AM   #8
101MABUS10
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Rep: Reputation: 0
how about on a suse 9.3 ? whats the counterpart for this ?
 
Old 09-28-2005, 10:30 AM   #9
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
suse uses yast... just use yast... dont try to do it by hand, or you will make it mad.. i tried that before.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Release And Renew dna9 Linux - Networking 1 03-09-2005 05:24 PM
IP Release and Renew? keysorsoze Linux - Newbie 4 01-23-2005 11:52 AM
ip release/renew ddu_ Linux - Newbie 5 12-14-2004 11:35 PM
DHCP - Release/renew laoddien Linux - Networking 0 06-25-2004 06:09 AM
Release/renew an ip morfy50 Linux - Networking 1 09-19-2002 01:02 PM


All times are GMT -5. The time now is 08:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration