New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Need help fixing LAN and wifi

Got problems with your B2 or B3? Share and get helped!
Post Reply
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Need help fixing LAN and wifi

Post by 86ivar »

Hi

I wanted to have an new WAN IP so i foun a a guide that said to do this.
1: "dhclient -r"
2: "dhclient eth0"
after that i accidentally did the command "dhclient" without eth0
The IP I got was the same so i shut down b2 by "shutdown -a now" to see if a reboot would get me an new IP. It did not shutdown nor blink so i shut it off manually and then turned it on agin. After the reboot I was unable to connect to LAN and WIFI, WAN however works fine. It seems that I can not get an IP on my computer when connecting to LAN or wifi.

How can I troubleshoot this problem?
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Need help fixing LAN and wifi

Post by Ubi »

Hi

You need to specify more exactly what you did. Specifically for each command you need to say on which machine you are performing this, which server you are querying, and what your network is. This is because you B2/3 is both a DHCP client and a DHCP server.

Another thing: ususally DHCP servers will give you the same IP address if you requery the service. It seems that you think that getting the same IP address means something broke. This is incorrect.
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: Need help fixing LAN and wifi

Post by 86ivar »

Did this on my B2 over ssh from my laptop that was conected to B2 wifi.
I typed in exactly: "dhclient -r" then "dhclient eth0" and then just "dhclient" in the shell session on the B2
Then after a reboot, B2 LAN and wifi stopped working. I can not conect with eiter my laptop, ipad or android phone.
Hope that makes it clearer.

I guess I replaced some custom B2 settings with some standard debian settings. If I can find the config file for these custom B2settings I can replace them with the original ones from the install image.
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Need help fixing LAN and wifi

Post by Gordon »

dhclient does not overwrite config files (except for resolvconf), so when rebooting it should have read your original network config. It would seem therefore that you must have changed something before being forced to reboot.

If you have the rescue stick you can verify the content of [/dev/sda1] /etc/network/interfaces. A common setup for LAN would look like this:

Code: Select all

iface eth1 inet static
	address 192.168.x.x
	netmask 255.255.255.0

iface wlan0 inet static
	address 192.168.y.y
	netmask 255.255.255.0
or (if using a bridge)

Code: Select all

iface eth1 inet manual

iface wlan0 inet manual

iface br0 inet static
	address 192.168.x.x
	netmask 255.255.255.0
	bridge_ports eth1 wlan0
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Need help fixing LAN and wifi

Post by Ubi »

oh, and next time you change some settings on the B3, do not reboot. Really. These are not Windows systems, pretty much anything less than a kernel upgrade does not require a reboot.
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Need help fixing LAN and wifi

Post by Gordon »

hmmmm... well, in defence of 86ivar rebooting may actually be your only option if you managed to shut yourself out on a headless system. Unless of course when the changes you made are saved to the system and will be restored during boot, because then rebooting to the system itself is pointless.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Need help fixing LAN and wifi

Post by Ubi »

that would be a valid excuse except for this:
86ivar wrote:The IP I got was the same so i shut down b2 by "shutdown -a now" to see if a reboot would get me an new IP.
you cant' really execute 'shutdown -a now' if you're locked out of the network now can you? That and the fact that he states that the reboot was performed specifically because the IP was the same.
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Need help fixing LAN and wifi

Post by Gordon »

Right, but he also says it actually did not reboot and he had to use the button on the B2 to let it do so. So that would indicate some kind of weirdness in his ssh client to allow him to type the shutdown message while the connection was in fact broken (local echo enabled?).

But I agree that the intention to reboot while thinking he was still connected was wrong.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Need help fixing LAN and wifi

Post by Ubi »

it did not reboot because the 'shutdown' command on the B2 does not work the way on a regular PC. You need to set the magic bit in /proc first. This has been regurgitated many many times, please look in the forum. If you just type shutdown, the machine will go into zombie mode. There's no exotic thing with SSH going on here.
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: Need help fixing LAN and wifi

Post by 86ivar »

Ubi wrote:it did not reboot because the 'shutdown' command on the B2 does not work the way on a regular PC. You need to set the magic bit in /proc first. This has been regurgitated many many times, please look in the forum. If you just type shutdown, the machine will go into zombie mode. There's no exotic thing with SSH going on here.
I see, I should have used the reboot command as I usually do. I did a reboot cause I did not know what else would work, as I am not that expert yet. Anyway I got the problem fixed for now!
Post Reply