Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux DHCP question

Status
Not open for further replies.

wabob

IS-IT--Management
Sep 21, 2004
128
0
0
US

I know ifconfig shows my PCs network address, but is there a shell command so I can release / renew my PCs DHCP address?


There are 10 kinds of people in the world.
Those who understand binary, and those who don't...
 
Or, since you have ifconfig, you could...

ifconfig down
ifconfig up

I use Mandrake (mostly), so thedaver's suggestion is what I would use.

Mark

There are 10 types of people in this world, those who understand binary and those who don't.
 
man pump:
Code:
pump is a daemon that manages network interfaces that are controlled by either the DHCP or BOOTP protocol.

       While pump may be started manually, it is normally started automatically by ifup(8) for devices configured via BOOTP or DHCP.

       If pump is managing an interface, you can run it again to query the status of that interface.  For example,
           pump -i eth0 --status
       will print the current status of device eth0.

COMMAND LINE OPTIONS
       switch   long option           description
       -?       --help                Show this help message
       -c       --config-file=FILE    Get configuration from FILE instead of /etc/pump.conf
       -d       --no-dns              Don't update DNS resolver configuration
       -h       --hostname=HOSTNAME   Request HOSTNAME
       -i       --interface=IFACE     Manage IFACE rather than eth0
       -k       --kill                Kill daemon (and disable all interfaces)
       -l       --lease=HOURS         Request least time of HOURS
                --lookup-hostname     Look up hostname in DNS
       -R       --renew               Renew lease immediately
       -r       --release             Release interface
                --no-gateway          Don't configurate a default route for this interface
                --no-resolvconf       Don't use the resolvconf program to update resolv.conf
                --no-setup            Don't set up anything
                --script=SCRIPT       Call SCRIPT (or null string to disable)
       -s       --status              Display interface status
                --usage               Display a brief usage message
                --win-client-ident    Specify a Windows(tm)-like client identifier

seeking a job as java-programmer in Berlin:
 

I have SUSE Linux 10.0 and could not get any of those to work (probably will work for other Linux distributions).
But thanks anyways.

I did a little reading and found out how to do it.
I logged in as root and entered the following:

ifdown eth0
ifup eth0

That released and renewed my DHCP address for my PC.

Experience is a tough teacher.
The test comes first, the lesson comes later...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top