Solved

need linux commands

Posted on 2002-07-10
6
259 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
ID: 7144796
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
ID: 7145123
"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
ID: 7145975
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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:kyiu
ID: 7148135
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
ID: 7292835
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
ID: 7292850
> 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
installing docker on ubuntu 6 36
Rebooted a CentOS 7 server and it wouldn't boot into the later Core version 5 80
Samba Question 11 75
PHP error function not working on AWS 10 70
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

856 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