Network problem

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Network problem

Post by gapan »

Tuntematon wrote: 8. May 2019, 08:20 I noticed that I can occasionally "browse" internet using Salix, but it just connects and disconnects all the time. There are periods when "requesting for ethernet address" turns to "ethernet network connection auto ethernet active" and "No network connection" (connect/disconnect)
That alone is a sign that perhaps your router is assigning the same IP to multiple devices. To check if that is the case, unplug all other ethernet connected devices and shutdown everything that is connected with wifi. Reboot your PC, does it work then?
Image
Image
Tuntematon
Posts: 15
Joined: 6. May 2019, 15:51

Re: Network problem

Post by Tuntematon »

I did as you suggested but it makes no difference. I had already done that anyway, I have even tried to reboot the router to factory settings with computer turned on and Salix running. I have only one device connected to ethernet (laptop) and one to wifi (mobile phone), so I don't have a complicated network of household devices running at the same time.

I may have forgotten to mention that I'm using usb ethernet adapter to use ethernet. I have two adapters, the other one is older and the other is brand new. The old one worked briliantly in Salix with the old router. Both of them work really well in Windows. I have tried several usb holes in my laptop but all of them give similar results. The official ethernet connector in the laptop is mechanically weak and doesn't make proper contact anymore.

Still, I don't believe this is exclusively an ethernet problem, cause I should be able to use wireless connection even when ethernet is not found.

In router terminal there is a section for DHCP/DNS. There aren't any option to turn it on or off so one probably can assume that dhcp is always on.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Network problem

Post by mimosa »

I don't want to muddy the waters but just to clear up two possible confusions:

in line with gapan's suggestion, did you turn off your mobile phone so there would only be the laptop trying to connect to the router, whether wirelessly or otherwise?

The point of the ifconfig -a command is not to see what it says about eth0. It is to work out whether your laptop thinks the cable you have plugged into it is 'eth0' or something else, such as 'eth4' (one of the sockets on my computer gets this label). You want the one that has the flags as I posted them, including "RUNNING". Then you could try to connect to it, or test, using dhcpcd, or otherwise. I'm not sure about NetworkManager, but Wicd expects you to tell it the name of both ethernet and wireless sockets, with eth0 and wlan0 as the default, so if it is different you need to change the settings in preferences.

The thing that has struck me about this from the outset is the Tails stick connects with no problems.That leads me to suspect that you may have inadvertently changed something in the configuration of your Salix, earlier on, when you had problems with the ISP. It's unfortunate that Tails (understandably) appears to have a restricted set of networking tools. I wonder if you could try a Live USB from another distribution?
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Network problem

Post by gapan »

If you're using a USB ethernet adapter it's highly unlikely it gets assigned to eth0, since you already have an on-board ethernet port.
Image
Image
Tuntematon
Posts: 15
Joined: 6. May 2019, 15:51

Re: Network problem

Post by Tuntematon »

I did turn my mobile phone off as well. In my router configuration terminal I can see that my laptop, usb ethernet adapter and mobile phone have separate addresses.

As my knowledge is limited, I never really changed anything in my Salix configuration. All I ever did was install, reinstall and unistall NM and wicd several times thinking that the solution was there. I haven't touched anything else. If something is changed, then I suppose my router is to blame.

I have run ifconfig -a several times now and I see that I'm not always getting the same reply. This time it finds 4 things:

The first one has remained unchanged: eth0 flags=4099<up, broadcast, multicast> mtu 1500. There is also wlan0 with identical details.
But now there is also eth4 (it has been there before but not always) flags=4163<up,broadcast, RUNNING, multicast, mtu 1500 and
lo: flags=73, up, loopback, RUNNING, mtu 65536

So eth4 and lo are RUNNING. What is this loop thing by the way? Am I right to assume that eth4 is my usb ethernet adapter then?
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Network problem

Post by mimosa »

Am I right to assume that eth4 is my usb ethernet adapter then?
That is what I would assume. Basically that command tells you about the connections that are available, so the point is, if you plug it into a different socket, it will probably change, and you need to know which one is active ("RUNNING"). I've never used such an adaptor but what gapan says makes sense, because even if your ethernet port is defunct, the computer still thinks it is there, and in the normal course of events, would assign it as eth0, since computers start counting from zero.

Dont' worry about the loopback thing. Google if you are curious.

It may therefore be worth having another go at connecting with dhcpcd using the eth* that actually corresponds to what you have plugged in. I'm sorry, I thought this was clear before ... I do realise it can be confusing when things are unfamiliar. Don't forget to turn your phone off, too. :)

About the configuration, it could also be that NM or wicd retain data from connecting to your old router which is somehow preventing them from connecting properly to the new one. You don't necessarily get a clean slate by reinstalling the application. That's why I suggested connecting with dhcpcd. If that does work, it points the finger at your network client rather than the router. However, I'm no expert on the inner workings of NM or Wicd - they mostly just work for me, especially wicd.
Tuntematon
Posts: 15
Joined: 6. May 2019, 15:51

Re: Network problem

Post by Tuntematon »

So I typed ifconfig -a to make sure that eth4 is running and then I typed sudo dhcpcd -T eth4

I tried it several times. Not even once I got any connection, but the text output varied a bit

The latest one was more or less like this

eth4 soliciting a dhcp lease, soliciting an ipv6 router, probing for an ipv4ll address, using ipv4 address, new broadcast address, new ip address, new network number, new subnet mask....

Nothing interesting happened. Still no connection.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Network problem

Post by mimosa »

Try it without the -T (which means it will just test, and not connect). It might also be helpful if you could post the exact output, though I appreciate this is difficult when you don't have an internet connection.

Did you ever see anything like this?

Code: Select all

eth0: offered 192.168.1.13 from 192.168.1.1
Tuntematon
Posts: 15
Joined: 6. May 2019, 15:51

Re: Network problem

Post by Tuntematon »

Finally some progress!

I have three usb holes in my laptop, one is for 3.0 I believe. I have mainly used 3.0, cause my latest usb adapter is supposed to work best that way.

I had tried other holes too, but this time I decided to try running "sudo dhcpcd eth4" with my adapter in "normal" usb port.

At the beginning it was just like before. The icon was searching and searching. But when i typed dhcpcd, suddenly I was connected!

The message goes:

Code: Select all

eth4: rebinding lease of 192.xxx.x.177
eth4: leased 192.xxx.x.177 for 43200 seconds
eth4: adding route to 192.168.1.1  
usage: service startlstoplrestartlist (service_name), forked to background, child pid 1581
When I used the 3.0 port I got this:

Code: Select all

eth4: soliciting a dhcp lease
eth4: soliciting an IPv6 router
using IPv4ll address.... 169.xxx
adding route to 169.xxx.0.0/16
forked to backgroound, child pid 1453
I can get connected now each time I repeat the same procedure.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Network problem

Post by mimosa »

That does seem encouraging, but I don't know what to make of that 169.... address. Let's see if anyone else has any suggestions as to how you can get this to work using a graphical client (NM or wicd) - including with wireless.

It's a helpful convention by the way when posting output from the terminal to include the exact command(s) preceding that output. Just for future reference. :)
Post Reply