Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Well ,when I turn the Router off and then I turn it on again while running Ubuntu , it doesn't obtain an IP address automatically :

enter image description here

I click on disconnect , but it remains like above.

It works only if I log out and switch to another session and then back the default one.

So How do I reset the network adapter using a terminal command, or any another suggestions?

Edit: I've tried using sudo dhclient , but it didn't work.

share|improve this question
    
Have you tried disabling/enabling the whole wireless networking through nm? (cannot remember if 11.04 has this feature, though). –  enzotib Jul 27 '11 at 13:41
    
Network Manager? It used to allow to disable Networking or Wireless Networking in the menu you obtain clicking on its icon. –  enzotib Jul 27 '11 at 13:44
    
Yeah I got it ,You mean to untick "enable wireless" from the network manager? –  Binarylife Jul 27 '11 at 13:44
    
Yeah, I mean this –  enzotib Jul 27 '11 at 13:45
    
Yeah,it didn't work also. –  Binarylife Jul 27 '11 at 13:46

2 Answers 2

up vote 5 down vote accepted

If you really want to reset the network adapter you usually need to unload and reload the kernel module that it uses.

If you just want to reconfigure it you can usually do:

sudo /etc/init.d/network-manager restart

But if you just want a new dhcp lease (that's the technical name for obtain a new IP from the router), you just need to use:

sudo dhclient -v eth1
share|improve this answer
    
So sudo dhclient will obtain a new IP Address? –  Binarylife Jul 27 '11 at 13:48
    
@Binarylife yes, that should get you a new IP address. If it doesnt, the router's DHCP may be at fault, and not your wifi card. –  Thomas W. Jul 27 '11 at 13:52
    
@The Evil Phoenix: Okay, I'll try it when I get the issue again, thanks. –  Binarylife Jul 27 '11 at 13:57
    
If it doesn't work, the messages that it will output can be useful for debugging. –  Javier Rivera Jul 27 '11 at 16:08
2  
IMHO this answer will not work, as both mentioned commands refer to listed devices in /etc/network/interfaces. In a normal Ubuntu install, only 'loopback' is listed there. –  minimec Jul 28 '11 at 14:06

This sound like a network-manager problem to me.

I would try the following: (in a gnome-terminal)

  1. 'Softblock' your wireless device with rfkill block wifi
  2. rfkill list will show you if you were successful.
  3. killall nm-applet You kill the network-manager process (panel icon will be gone).
  4. rfkill unblock wifi Enable wifi again.
  5. nm-applet Load a new network-manager session.

Maybe simply killing/loading nm-applet will do. Also note, that you don't need to use 'sudo' for this.

I do know that some router and wifi devices do not 'like' each other very well. This is often a problem of a somehow 'beta' wifi linux-driver...

share|improve this answer
    
Thanks for your answer, I'll try it also. By the way I am using Siemens ADSL sl2-141router. –  Binarylife Jul 28 '11 at 16:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.