NetworkManagement/ca: Difference between revisions

From KDE UserBase Wiki
(Created page with "La gestió de xarxa en la majoria d'equips d'escriptori Linux es troba a la part superior d'una gran i fràgil pila de components. Això és necessari per fer front a la gran qua...")
(Created page with "El maquinari sense fils té un sorprenent nombre d'errors. Aquests es tracten a la capa següent, si teniu sort.")
Line 46: Line 46:
=== El maquinari ===
=== El maquinari ===


Wireless hardware has a surprising number of bugs.  These are dealt with at the next layer, if you are lucky.
El maquinari sense fils té un sorprenent nombre d'errors. Aquests es tracten a la capa següent, si teniu sort.


=== El nucli ===
=== El nucli ===

Revision as of 11:20, 24 March 2011

Other languages:

Introducció

En diverses distribucions de Linux, el dimoni NetworkManager proporciona un control configurable per l'usuari de les connexions de xarxa. En KDE, el KNetworkManager (KDE3 i KDE4) i Gestor de xarxa (KDE4) són les principals interfícies d'usuari per a NetworkManager.

Errors

Informes d'error

Per informar d'errors útils contra Network Management, proporcioneu els següents ítems d'informació:

  • La vostra versió de distribució.
  • Està NetworkManager en ús? En algunes distribucions és opcional, atès que està fora de lloc en un sistema estàtic, sistema com servidor. Atureu-lo ara si no ho està.
  • La versió de la miniaplicació Network Management (NetworkManager-kde4.rpm a openSUSE, plasma-widget-network-manager a Kubuntu 9.04, plasma-widget-networkmanagment a Kubuntu 9.10, kde-plasma-networkmanagement a fedora).
  • La versió del paquet NetworkManager.
  • La versió del paquet ModemManager.
  • Vull saber: El maquinari del vostre ordinador és compatible amb vianilla x86?
  • El vostre maquinari de xarxa (useu lshal per a trobar-lo).
  • Un registre de sistema de NetworkManager durant els intents de connexió.
    • Per a openSUSE: /var/log/NetworkManager
    • Per a kubuntu: /var/log/syslog
    • Per a fedora: /var/log/messages
  • Per a xarxes sense fils:
    • Esteu usant un SSID ocult?
    • Tipus de seguretat sense fils: WEP/WPA-PSK/WPA-EAP?
    • Longitud de la clau.
    • Tipus de clau (contrasenya o hexadecimal per WEP).
    • Xifrats (TKIP/AES).
    • Mecanismes d'autenticació (TLS/TTLS/PEAP/...)
  • Per a la banda ampla mòbil:
    • Maquinari.
    • Controlador en ús (vegeu dmesg quan connecteu el maquinari).
    • Xarxa en ús.
    • Tipus de xarxa (GSM/CDMA/UMTS).
    • apn usada, si n'hi ha cap.
    • Els registres de ModemManager («killall NetworkManager», «killall modem-manager», si inicieu «modem-manager --debug», «NetworkManager --no-debug») poden ser útils en la depuració de si NetworkManager detecta el vostre maquinari.

I molt important: Sou capaç de connectar amb un altre client? Per exemple, nm-applet sota GNOME o cnetworkmanager en la consola. Si és així, si us plau, adjunteu la informació de solució de problemes comparativa tal com es descriu al final d'aquest article.

Gestió d'un error

La gestió de xarxa en la majoria d'equips d'escriptori Linux es troba a la part superior d'una gran i fràgil pila de components. Això és necessari per fer front a la gran quantitat de configuracions diferents. Quan falla una connexió, es pot deure a qualsevol d'una sèrie de motius al llarg d'aquesta pila, però els símptomes solen ser una cosa així com «La connexió ha arribat al 28% i després ha fallat -Connection got to 28% and then failed-». Els errors informats a bugs.kde.org es trien per mirar d'esbrinar en quina capa es va produir l'error, de manera que pugui ser arreglat pels responsables.

La pila

El maquinari

El maquinari sense fils té un sorprenent nombre d'errors. Aquests es tracten a la capa següent, si teniu sort.

El nucli

This is where the actual driver that controls the hardware is located. There are many interesting bugs here too. Since the introduction of a standard wireless MAC layer in the Linux kernel, this situation is improving. Some hardware doesn't have a Linux driver, so people control it using the ndiswrapper tool, which loads Windows drivers and their bugs. You can see its output in the system log, and talk to the drivers using the iwtools set of commands.

WPA Supplicant

wpa_supplicant is a low level tool for talking to the driver, providing authentication and encryption settings. It is open source and generally of high quality. Before the advent of NetworkManager, users had to configure it manually with control files in /etc. This has been known to get people out of a tight spot occasionally. It usually logs to /var/log/wpa_supplicant.log. Nowadays it is mostly controlled remotely by....

NetworkManager

NetworkManager is the system daemon at the centre of the networking subsystem on most end user Linux installations. It has root privileges, needed to control the lower layers, and exposes some controls up to clients running in the user session via DBUS. It writes a log in /var/log. NM also controls DHCP clients as needed and rewrites /etc/resolv.conf with the DNS servers it has configured. NetworkManager also provides a SystemSettings service, which is responsible for reading your distribution's network configuration files (system wide) and feeding them into NetworkManager.

Clients d'usuari

KNetworkManager applet for KDE 4, Network Management Plasmoid under KDE 4, KNetworkManager under KDE 3, nm-applet under GNOME, and cnetworkmanager is your last life. These are responsible for

  • giving feedback on the networking status of this system,
  • communicating the user's actions to NetworkManager,
  • and for storing and communicating the user's network connection details (policy) to NM.

While they are the most visible part of the system, they are also the least important to making a successful connection. Since they share a standard interface to NetworkManager, they can be exchanged easily.

Quan les coses van malament

On és el problema?

Simple. Start at the top of the stack and work down. When you find something that works, you found the site of the problem. When you run out of things you can change, hand over to an expert (probably the responsible team at your Linux distribution).

  1. Are you actually using NetworkManager on your system? Mandriva doesn't use it. ArchLinux uses wicd. Moblin uses Connman.
  2. Try a different NetworkManager client. If that helps, continue in the next section to try and further localize the problem in Network Management. Then bugs.kde.org, product "Network Management" is the place to go.
  3. Try to configure a connection using your distro's system configuration tools, so SystemSettings picks it up. It's unlikely but worth a go.
  4. Try a manually configured connection via wpa_supplicant. The documentation is rather sparse but there are example configurations include in the package. Here is the list of supported hardware. If wpa_supplicant on its own works, NetworkManager is at fault. Talk to your distro or report it at bugs.freedesktop.org.
  5. If that didn't work, reconfigure a wireless router to use a different (weaker) encryption type or none at all. If this works, the problem is either in wpa_supplicant or the driver. Either way, take it to your distro.

It's All KDE's Fault!

If you are reading this, you will have been able to make a connection using a different NetworkManager client.

First, make sure that you are not running another client as well as Network Management. This will lead to unpredictable results. If you were, remove and restart Network Management. You can run it externally to Plasma as

plasmoidviewer networkmanagement

if you want.

You should now try to figure out how the connection provided by Network Management differs from that provided by the other client. If you build Network Management from source you can use the tool 'qdbusfornm', which is a version of qdbus extended to handle NM's data types.

If you do not build from source, just replace

./qdbusfornm --system

by

qdbus --system --literal

in the command shown below. It is a bit harder to read but should give you the same output. If you use

qdbus --system --literal

please take the time to format the output so there is one key per line, similar to the qdbusfornm output below. This is easy and just takes time, so it is better for you to do this than a developer.

The value 0 below identifies the connection. Change it if you have more than one until you find the relevant connection.

./qdbusfornm --system org.freedesktop.NetworkManagerUserSettings/org/freedesktop/NetworkManagerSettings/0
org.freedesktop.NetworkManagerSettings.Connection.GetSettings

retorna això:

a{sa{sv}}(==802-11-wireless==
 band: bg
 mode: infrastructure
 security: 802-11-wireless-security
 ssid: opensuse-guest
 ==802-11-wireless-security==
 auth-alg: open
 key-mgmt: wpa-psk
 wep-tx-keyidx: 0
 ==connection==
 autoconnect: true
 id: openSUSE
 type: 802-11-wireless
 uuid: {951cc7d9-1fa0-4525-9ab7-7199849e1b19}
 ==ipv4==
 dns-search:
 method: auto
 )

Ara heu de repetir usant un altre client de treball i copiar les dues sortides, abans d'adjuntar amb seguretat a un informe d'error a bugs.kde.org. Amb aquesta informació serem capaços d'aplicar una solució amb rapidessa.

Petades

Si obteniu una petada assegureu-vos a instal·lar els [http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports símbols de depuració] i agafeu una traça inversa. En Kubuntu cal afegir la repositori debug i instal·leu plasma-widget-networkmanagement-dbgsym.