LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Dhclient - Second interface? (http://www.linuxquestions.org/questions/linux-networking-3/dhclient-second-interface-487221/)

kellinjar 09-26-2006 07:04 PM

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.

pljvaldez 09-26-2006 07:22 PM

At home all I do is ifup eth1 and dhclient automagically gets an IP for eth1.

kellinjar 09-26-2006 07:37 PM

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.

pljvaldez 09-26-2006 07:45 PM

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. :D

kellinjar 09-26-2006 08:08 PM

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.


All times are GMT -5. The time now is 02:21 PM.