LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 09-26-2006, 06:04 PM   #1
kellinjar
Member
 
Registered: Mar 2004
Location: South Korea
Posts: 103

Rep: Reputation: 15
Dhclient - Second interface?


Is it possible to run dhclient to get an IP on a second interface, after its already running in the first place? Say I run dhclient eth0 to get an IP. An hour later I decide to turn on my wireless for some reason, and I want to grab an IP... how do I go about doing it without releasing my dhclient or killing it? attempting to run dhclient eth1 at that point complains that its already running.
 
Old 09-26-2006, 06:22 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
At home all I do is ifup eth1 and dhclient automagically gets an IP for eth1.
 
Old 09-26-2006, 06:37 PM   #3
kellinjar
Member
 
Registered: Mar 2004
Location: South Korea
Posts: 103

Original Poster
Rep: Reputation: 15
I'm guessing thats because you have an ifcfg-eth1 file right? I have one for my wired NIC because I use that the most. I don't have an ifcfg-eth1 because I connect to different wireless networks using varying authentication types (working on setting up xsupplicant to handle that right now) so no set config for that.

I notice if I issue an ifconfig eth0 up, it doesn't attempt to get an address, only if I run an ifup... do you know if a way to tell dhclient to get an IP for that interface if you don't have a cfg file for it? I tried making a generic config that was set "onboot=no" to see if that would satisfy it, so I'll test it shortly.
 
Old 09-26-2006, 06:45 PM   #4
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
I don't believe I have an ifcfg-eth1 file. I'm running Debian and I think that file is RH specific. I guess I missed the wireless part too because mine's a desktop w/ two NICs, so no wireless. But eth1 is setup in my /etc/network/interfaces file (which maybe is equivalent to the ifcfg-eth1 file). Sorry, seems I'm pretty useless here.
 
Old 09-26-2006, 07:08 PM   #5
kellinjar
Member
 
Registered: Mar 2004
Location: South Korea
Posts: 103

Original Poster
Rep: Reputation: 15
Nope, you're right. You do have a config file for that interface. I made a dummy file for mine to see if it will work. I'm curious though if it can be made to work if there is no configuration file for that interface.
 
  


Reply

Tags
dhcp


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
Dhclient greengrocer Linux - Newbie 1 10-27-2005 07:22 PM
dhclient laurentwahl Linux - Wireless Networking 6 05-30-2005 12:35 AM
I need dhclient but there is no one g-string 3 Linux - Networking 2 05-19-2005 03:42 PM
dhclient and 2.4.23 townfool Linux - Networking 1 12-16-2003 04:40 PM
dhclient helloworld Linux - Networking 2 03-06-2001 07:57 PM


All times are GMT -5. The time now is 12:42 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