Solved

need linux commands

Posted on 2002-07-10
6
255 Views
Last Modified: 2010-04-20
Does anyone know the equivalent commands in linux for "ipconfig /release" and "ipconfig /renew"?
0
Comment
Question by:kyiu
  • 3
  • 2
6 Comments
 
LVL 24

Expert Comment

by:SunBow
Comment Utility
How about "dhcpcd -k" (kill) and "dhcpcd" (start, which usually acts same as renew)

I think this remains dependent on what product was loaded from what vendor, for what client, for what server, which distro, which ftp site.  So you might try "man dhcpcd" first. Generally, client initial request for address is network packet akin to client request for renewal of existing address, so server treats them the same (if subnetted properly). Server should continue to retain address mapping for a period after the release, permitting the same address assignment if user/client restarts dhcp service in a reasonable time frame.
0
 

Author Comment

by:kyiu
Comment Utility
"The server continue to retain the address mapping" is exactly the problem with my ISP.  It wouldn't renew my IP address if I change the NIC, unless I release the old one first.  In Windows, it is done quite easily...send "ipconfig /release", replace NIC, then "ipconfig /renew". Everything will be happy. I want to do the same in my Linux.  I think what you've suggested does the same during (re)boot.  I need to send the server the "address release" first before the "renew".  This is what I belived how my ISP server works.  
0
 
LVL 4

Accepted Solution

by:
MFCRich earned 50 total points
Comment Utility
According to man dhcpcd:

dhcpcd -k # DHCP release and destroy its own cache

dhcpcd -n # renew lease if dhcpcd is already running, otherwise follow normal startup procedure
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:kyiu
Comment Utility
I supposed you both are correct.  The problem was the version of linux (RH7.1) which uses "Pump" as the default dhcp client service.  I managed to run the test on a newer versioh RH7.3 that does use dhcpcd as default.  It works just like the Windows IPCONFIG command.  Thanksyou.

Sorry, this support site allows me to award to one guy only.  
0
 
LVL 24

Expert Comment

by:SunBow
Comment Utility
Oh, but you can give points on the side!!!!!!!!!! <sigh>
Never mind, I don't need 'em. I am happy if you are.
 : ^ )                    Good Fortune!
0
 
LVL 24

Expert Comment

by:SunBow
Comment Utility
> It wouldn't renew my IP address if I change the NIC, unless I release the old one first.

Uh, that sounds bad somewhere. DHCP assigns by MAC - which is usually the NIC. To change NIC you power off. Power on and you should look like a newbie in either OS, and to ISP. Renew is (at least used to be) the same format (bits in packet) of getting new IP. The difference being the context, of whether or not the server has you listed. But I do remember more poorly these days.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now