Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to switch setup from fixed IP to receive dynamic IP from DHCP server (and vice versa)?

Reply
Thread Tools Display Modes

How to switch setup from fixed IP to receive dynamic IP from DHCP server (and vice versa)?

 
 
Matthew Lincoln
Guest
Posts: n/a

 
      06-01-2008, 06:39 AM
How can I detect if the current Linux system has an assigned, fixed, static IP
or if it receives at bootup always a new dynamic IP from the in-house-LAN DHCP-server?

How can I change the setup from static to dynamic IP assignment (Resp. the other way)?

Matthew
 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      06-01-2008, 10:27 AM
On 01 Jun 2008 06:39:26 GMT, Matthew Lincoln wrote:

Based on all the provided information, you might consider reading
http://www.catb.org/~esr/faqs/smart-questions.html

> How can I detect if the current Linux system has an assigned, fixed,
> static IP or if it receives at bootup always a new dynamic IP from
> the in-house-LAN DHCP-server?


Read nic's config files.

> How can I change the setup from static to dynamic IP assignment
> (Resp. the other way)?


Change nic's config file, restart interface.

 
Reply With Quote
 
Robert Harris
Guest
Posts: n/a

 
      06-01-2008, 10:50 AM
Matthew Lincoln wrote:
> How can I detect if the current Linux system has an assigned, fixed, static IP
> or if it receives at bootup always a new dynamic IP from the in-house-LAN DHCP-server?
>
> How can I change the setup from static to dynamic IP assignment (Resp. the other way)?
>
> Matthew


It depends on your distribution. What is it?

Robert
 
Reply With Quote
 
Shibu C Varughese
Guest
Posts: n/a

 
      06-01-2008, 11:33 AM
On Jun 1, 11:39 am, kmlincoln...@hotmail.com (Matthew Lincoln) wrote:
> How can I detect if the current Linux system has an assigned, fixed, static IP
> or if it receives at bootup always a new dynamic IP from the in-house-LAN DHCP-server?


===check the network configuration file, that should be under /etc/
sysconfig/network-scripts/ for rpm redhat based distro and ...
under /etc/network/ for debian based distro

> How can I change the setup from static to dynamic IP assignment (Resp. the other way)?
>
> Matthew

=== remove the static IP address info lines from teh file and then
add the dhcp lines

For ubuntu only add the line below.

iface eth0 inet dhcp


 
Reply With Quote
 
goarilla
Guest
Posts: n/a

 
      06-01-2008, 01:13 PM
Matthew Lincoln wrote:
> How can I detect if the current Linux system has an assigned, fixed, static IP
> or if it receives at bootup always a new dynamic IP from the in-house-LAN DHCP-server?
>
> How can I change the setup from static to dynamic IP assignment (Resp. the other way)?
>
> Matthew


pgrep -l dhc
if this returns anything ... you're probably using
a dynamic ip.
 
Reply With Quote
 
Dances With Crows
Guest
Posts: n/a

 
      06-01-2008, 02:20 PM
Matthew Lincoln staggered into the Black Sun and said:
> How can I detect if the current Linux system has a static IP or a
> dynamic IP?


One of "pgrep dhcpcd", "pgrep pump", or "pgrep dhclient" should return a
PID if any of the major DHCP clients are running.

> How can I change the setup from static to dynamic IP assignment [and
> vice versa]?


Distro-dependent. Which distro are you using? Edit /etc/conf.d/net for
Gentoo, /etc/sysconfig/network-scripts/ifcfg-ethN for Redhat-derived
distros, and /etc/network/interfaces for Debian-derived distros.

--
I think I'll have to put on 500 pounds of subwoofers, amps, and other
delicious herbs. --MegaHAL, trained on ASR
My blog and resume: http://crow202.dyndns.org:8080/wordpress/
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a

 
      06-01-2008, 04:48 PM
["Followup-To:" header set to comp.unix.questions.]
On 2008-06-01, Matthew Lincoln <(E-Mail Removed)> wrote:
>
>
> How can I detect if the current Linux system has an assigned, fixed,
> static IP or if it receives at bootup always a new dynamic IP from the
> in-house-LAN DHCP-server?
>
> How can I change the setup from static to dynamic IP assignment (Resp.
> the other way)?
>
> Matthew


For a Debian-based system, edit /etc/network/interfaces or use the GUI.
For an rpm-based system, look in /etc/sysconfig or use the GUI.
For Slackware or others, I don't know, maybe look for "DHCP" in
/var/log/syslog.

 
Reply With Quote
 
Doug Laidlaw
Guest
Posts: n/a

 
      06-04-2008, 08:28 AM
Matthew Lincoln wrote:

> How can I detect if the current Linux system has an assigned, fixed,
> static IP
> or if it receives at bootup always a new dynamic IP from the in-house-LAN
> DHCP-server?
>
> How can I change the setup from static to dynamic IP assignment (Resp. the
> other way)?
>
> Matthew
>

There was a time when I always seemed to get the same IP address, but my ISP
confirmed that it was dynamically assigned, i.e. simply chance. If I
wanted a fixed IP address, I had to pay extra.

Doug.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista sees XP, not vice versa barryadam Wireless Networks 2 09-30-2008 08:09 PM
wired cannot ping w/less and vice-versa margetts Network Routers 1 12-04-2005 07:14 PM
How to automatically configure the Network settings of a specific LAN card from Static IP to Obtain IP through DHCP or vice versa? Marco Windows Networking 3 08-20-2004 06:48 PM
How to automatically configure the Network settings of a specific LAN card from Static IP to Obtain IP through DHCP or vice versa? Marco Windows Networking 3 08-20-2004 06:48 PM
98SE not seeing Win XP vice/versa Cman Windows Networking 3 07-25-2003 07:48 PM



1 2 3 4 5 6 7 8 9 10 11