|
Expertenforum Netzwerk
Chemnitzer Linux-Tag 2004
Expertenforum: Netzwerkprobleme
Daniel Gebhardt und Jens Weiße
Überblick:
- Huhu, ich habe ein Netzwerkproblem!
- Fehlersuche im Allgemeinen
- Hardware
- Software
- Beispiele
Fehlersuche allgemein:
- Netzwerkkabel steckt?
- Der Switch hat Strom?
- Irgendetwas am Netz verändert?
- Neue Rechner hinzugef¨gt?
- Rebootet eine Maschine (Firewall, Mailserver, Dateiserver,...) gerade?
- Sind alle Dienste ordentlich gestartet?
- Kann man jemanden die Schuld in die Schuhe schieben?
Hardware:
- Verpackung studieren
- welcher Chipsatz (Karte ausbauen und nachsehen)
- Herstellerwebseite
Software (Grundlagen):
- Bootmeldungen anschauen:
|
- Hardware ermitteln:
root@debian:~# lspci   [-v]
|
Hinweis: Oftmals ist die Liste mit den PCI-ID's zu alt. Mit update-pciids
werden die neusten Kennungen aus dem Internet herunter geladen und unter
/usr/share/pci.ids gespeichert.
|
- Kernelmodule laden:
root@debian:~# modprobe <Modulname>
bzw.
root@debian:~# insmod < Modulname>
|
|
- Erfolg kontrollieren:
root@debian:~# lsmod
und
root@debian:~# less /var/log/messages
|
|
- den Link kontrollieren:
root@debian:~# mii-tool [-v]
|
Hinweis: Funktioniert nicht mit jeder Netzwerkkarte.
|
- IP-Adresse konfigurieren und Netzwerkkarte starten:
root@debian:~# ifconfig
eth0 <IP-Adresse> netmask 255.255.255.0 up
|
|
- Default Route festlegen:
root@debian:~# route add
default gw <IP-Adresse des Gateways>
|
|
- Verbindung testen:
root@debian:~# ping <IP-Adresse>
|
Hinweis: Erstmal eine IP-Adresse im lokalen Netzwerk nehmen. Zum Beispiel das Gateway.
Danach externe IP-Adressen. Zum Beispiel einen DNS-Server.
|
- Namensauflösung testen:
root@debian:~# host <URL>
bzw.
root@debian:~# dig <URL>
bzw.
root@debian:~# ping <URL>
|
Hinweis: Falls dies scheitert, dann funktioniert die Namensauflösung nicht.
Entweder der Nameserver ist nicht erreichbar (s.o.) oder er ist nicht richtig
konfiguriert (Eintrag: NAMESERVER <IP-Adresse> in Datei /etc/resolv.conf)
Software (Zusatz):
- Ethernet Layer Tool (mii-tool):
|
Abkürzung der Ethernet Geschwindigkeiten:
Geschwindigkeit der Ports |
Beschreibung |
10baseT-HD |
10 megabit half duplex |
10baseT-FD |
10 megabit full duplex |
100baseTx-HD |
100 megabit half duplex |
100baseTx-FD |
100 megabit full duplex |
|
Den Link Layer Status mit mii-tool ermitteln:
root@debian:~# mii-tool
eth0: negotiated 100baseTx-FD, link ok |
|
root@debian:~# mii-tool [-v]
eth0: negotiated 100baseTx-FD, link ok |
product info: vendor 00:05:be, model 8 rev 0 |
basic mode: autonegotiation enabled |
basic status: autonegotiation complete, link ok |
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control |
|
|
Die gewünschte Ethernet Port Geschwindigkeit mittels mii-tool --advertise festlegen:
root@debian:~# mii-tool --advertise 10baseT-HD,10baseT-FD
restarting autonegotiation... |
|
root@debian:~# mii-tool
eth0: negotiated 10baseT-FD, link ok |
|
|
Die Ethernet Port Geschwindigkeit mittels mii-tool --force erzwingen:
root@debian:~# mii-tool --force 10baseT-FD
|
root@debian:~# mii-tool
eth0: 10 Mbit, full duplex, link ok |
|
root@debian:~# mii-tool --restart
restarting autonegotiation... |
|
root@debian:~# mii-tool
eth0: negotiated 100baseTx-FD, link ok |
|
|
- IP-Adresse konfigurieren:
Ausgangskonfiguration ermitteln:
root@debian:~# ifconfig eth0
eth0 | Link encap:Ethernet HWaddr 00:80:C8:F8:4A:53 |
| inet addr:192.168.98.82 Bcast:192.168.98.255 Mask:255.255.255.0 |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
| TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 |
| collisions:0 txqueuelen:100 |
| RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
| Interrupt:9 Base address:0x5000 |
|
Netzwerkinterface abschalten:
root@debian:~# ifconfig eth0 down
|
Netzwerkinterface konfigurieren und starten:
root@debian:~# ifconfig eth0
192.168.99.14 netmask 255.255.255.0 up
|
root@debian:~# ifconfig eth0
eth0 | Link encap:Ethernet HWaddr 00:80:C8:F8:4A:53 |
| inet addr:192.168.99.14 Bcast:192.168.98.255 Mask:255.255.255.0 |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
| TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 |
| collisions:0 txqueuelen:100 |
| RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
| Interrupt:9 Base address:0x5000 |
|
MTU ändern:
root@debian:~# ifconfig eth0
mtu 1492
|
root@debian:~# ifconfig eth0
eth0 | Link encap:Ethernet HWaddr 00:80:C8:F8:4A:53 |
| inet addr:192.168.99.14 Bcast:192.168.98.255 Mask:255.255.255.0 |
| UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1 |
| RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
| TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 |
| collisions:0 txqueuelen:100 |
| RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
| Interrupt:9 Base address:0x5000 |
|
|
- Routen konfigurieren:
Ausgangskonfiguration ermitteln:
root@debian:~# route -n
Kernel IP routing table
Destination | Gateway | Genmask | Flags | Metric | Ref | Use | Iface |
192.168.99.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth0 |
127.0.0.0 | 0.0.0.0 | 255.0.0.0 | U | 0 | 0 | 0 | lo |
|
neue Default-Route festlegen:
root@debian:~# route add
default gw 192.168.99.254
|
root@debian:~# route -n
Kernel IP routing table
Destination | Gateway | Genmask | Flags | Metric | Ref | Use | Iface |
192.168.99.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth0 |
127.0.0.0 | 0.0.0.0 | 255.0.0.0 | U | 0 | 0 | 0 | lo |
0.0.0.0 | 192.168.99.254 | 0.0.0.0 | UG | 0 | 0 | 0 | eth0 |
|
|
- Netzwerk testen:
grundlegende Netzwerkkonfiguration testen:
root@debian:~# ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.315 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.287 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.293 ms
--- localhost ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2014ms
rtt min/avg/max/mdev = 0.287/0.298/0.315/0.018 ms
Hinweis: Mit Ctrl+C kann dieser Test abgebrochen werden.
|
Erreichbarkeit von Rechnern mit ping testen:
root@debian:~# ping <URL>
PING <URL> (<URL>) 56(84) bytes of data.
64 bytes from <URL>: icmp_seq=1 ttl=64 time=0.714 ms
64 bytes from <URL>: icmp_seq=2 ttl=64 time=0.414 ms
64 bytes from <URL>: icmp_seq=3 ttl=64 time=0.392 ms
--- <URL> ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2008ms
rtt min/avg/max/mdev = 0.392/0.506/0.714/0.149 ms
Hinweis: Mit Ctrl+C kann dieser Test abgebrochen werden.
|
Stresstest mittels ping und großer Pakete:
root@debian:~# ping -s 512 -c 400 -f -n <URL>
PING 141.30.156.108 (141.30.156.108) 512(540) bytes of data.
--- 141.30.156.108 ping statistics ---
400 packets transmitted, 400 received, 0% packet loss, time 665ms
rtt min/avg/max/mdev = 0.592/0.657/1.012/0.060 ms, ipg/ewma 1.667/0.662 ms
Hinweis: Es werden 400 Pakete (-c) mit einer Größe von 520 Byte (= 8 Byte Header + 512 Byte) (-s) versand. Die Option -f veranlasst
"Flood pings" und -n nur numerischen Output.
|
Beispiele:
- Intel PRO/1000 MT Desktop Adapter:
root@debian:~# dmesg
[...] |
Intel(R) PRO/1000 Network Driver - version 4.4.19-k2 |
Copyright (c) 1999-2002 Intel Corporation. |
eth1: Intel(R) PRO/1000 Network Connection |
e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex |
[...] |
|
root@debian:~# lspci -v
| [...] |
02:06.0 | Ethernet controller: Intel Corp. 82540EM Gigabit Ethernet Controller (rev 02) |
| Subsystem: Intel Corp. PRO/1000 MT Desktop Adapter |
| [...] |
|
root@debian:~# lsmod
Module | Size | Used | by | Not tainted |
[...] |
e1000 | 46148 | 1 | | |
[...] |
|
root@debian:~# mii-tool [-v]
SIOCGMIIPHY on 'eth1' failed: Operation not supported
no MII interfaces found
|
|
- Zum Zweiten: Intel PRO/1000 MT Desktop Adapter:
root@debian:~# lspci -v
| [...] |
02:04.0 | Ethernet controller: Intel Corp.: Unknown device 1076 |
| Subsystem: Intel Corp.: Unknown device 1113 |
| [...] |
|
root@debian:~# update-pciids
Aktualisieren der PCI-ID's (/usr/share/pci.ids)
|
root@debian:~# lspci -v
| [...] |
02:04.0 | Ethernet controller: Intel Corp. 82541GI Gigabit Ethernet Controller |
| Subsystem: Intel Corp.: Unknown device 1113 |
| [...] |
|
root@debian:~# dmesg
[...] |
Intel(R) PRO/1000 Network Driver - version 5.2.22 |
Copyright (c) 1999-2003 Intel Corporation. |
eth1: Intel(R) PRO/1000 Network Connection |
e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex |
[...] |
|
|
- Netgear FA310TX (mit Chipsatz: DECchip Tulip (dc21x4x)):
root@debian:~# dmesg
[...] |
Linux Tulip driver version 0.9.15-pre12 (Nov 11, 2002) |
tulip0: MII transceiver #1 config 1000 status 782d advertising 01e1 |
eth0: Lite-On 82c168 PNIC rev 33 at 0xe400, 00:A0:CC:3A:FC:C8, IRQ 5. |
eth0: Setting full-duplex based on MII#1 link partner capability of 41e1 |
[...] |
|
root@debian:~# lspci -v
| [...] |
00:0d.0 | Ethernet controller: Lite-On Communications Inc LNE100TX (rev 21) |
| Subsystem: Netgear FA310TX |
| [...] |
|
root@debian:~# lsmod
Module | Size | Used | by | Not tainted |
[...] |
tulip | 40352 | 1 | | |
[...] |
|
root@debian:~# mii-tool [-v]
eth0: negotiated 100baseTx-FD, link ok |
product info: Level One LXT970/971 rev 0 |
basic mode: autonegotiation enabled |
basic status: autonegotiation complete, link ok |
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
|
|
- D-Link System Inc DFE-530TX rev A:
root@debian:~# dmesg
[...] |
via-rhine.c:v1.10-LK1.1.16 February-15-2003 Written by Donald Becker |
http://www.scyld.com/network/via-rhine.html |
eth0: VIA VT6102 Rhine-II at 0x6100, 00:05:5d:dd:fd:d9, IRQ 10. |
eth0: MII PHY found at address 8, status 0x782d advertising 01e1 Link 45e1. |
eth0: Setting full-duplex based on MII #8 link partner capability of 45e1. |
[...] |
|
root@debian:~# lspci -v
| [...] |
00:0d.0 | Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 43) |
| Subsystem: D-Link System Inc DFE-530TX rev A |
| [...] |
|
root@debian:~# lsmod
Module | Size | Used | by | Not tainted |
[...] |
via-rhine | 12176 | 1 | | |
mii | 2304 | 0 | [via-rhine] | |
[...] |
|
root@debian:~# mii-tool [-v]
eth0: negotiated 100baseTx-FD, link ok |
product info: vendor 00:05:be, model 8 rev 0 |
basic mode: autonegotiation enabled |
basic status: autonegotiation complete, link ok |
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
|
|
- Onboard 3COM-Chip auf einem ASUS-Motherboard (ASUS A7V600-EAY mit 3COM GigaBit LAN):
root@debian:~# dmesg
[...] |
sk98lin: Network Device Driver v6.18 |
(C)Copyright 1999-2003 Marvell(R). |
PCI: Enabling device 00:09.0 (0014 -> 0017) |
Found IRQ 10 for device 00:09.0 |
PCI: Sharing IRQ 10 with 00:13.0 |
eth1: 3Com Gigabit LOM (3C940) |
PrefPort:A RlmtMode:Check Link State |
eth1: network connection up using port A |
speed: 1000 |
autonegotiation: yes |
duplex mode: full |
flowctrl: symmetric |
role: slave |
irq moderation: disabledc |
scatter-gather: enabled |
|
root@debian:~# lspci -v
| [...] |
00:09.0 | Ethernet controller: 3Com Corporation 3c940 1000Base? (rev 12) |
| Subsystem: Asustek Computer, Inc.: Unknown device 80eb |
| [...] |
|
root@debian:~# lsmod
Module | Size | Used | by | Not tainted |
[...] |
via-rhine | 12176 | 1 | | |
mii | 2304 | 0 | [via-rhine] | |
[...] |
|
root@debian:~# mii-tool [-v]
SIOCGMIIPHY on 'eth1' failed: Bad address |
|
Hinweis für SuSE 9.0 Nutzer
Der installierte Kernel ist buggy und stürzt beim Laden des sk98lin-Modules ab. Erst mit
einem Kernelupdate (auch wichtig wegen Sicherheitslücken) läuft die Netzwerkkarte. |
Auszug aus der Datei /var/log/messages: |
Dec 10 19:05:17 linux kernel: sk98lin: Network Device Driver v6.17
Dec 10 19:05:17 linux kernel: (C)Copyright 1999-2003 Marvell(R).
Dec 10 19:05:17 linux kernel: HWInit (1) failed.
Dec 10 19:05:17 linux kernel: sk98lin: No adapter found.
Dec 10 19:05:17 linux kernel: Unable to handle kernel paging request at virtual address fc83c9c8
Dec 10 19:05:17 linux kernel: printing eip:
Dec 10 19:05:17 linux kernel: c45dda8e
Dec 10 19:05:17 linux kernel: *pde = 3ffdc067
Dec 10 19:05:17 linux kernel: Oops: 0000 2.4.21-99-athlon #1 Wed Sep 24 13:34:32 UTC 2003
Dec 10 19:05:17 linux kernel: CPU: 0
Dec 10 19:05:17 linux kernel: EIP: 0010:[usb-uhci:uhci_device_operations+15695318/27603627] Not tainted
Dec 10 19:05:17 linux kernel: EIP: 0010:[] Not tainted
Dec 10 19:05:17 linux kernel: EFLAGS: 00010006
Dec 10 19:05:17 linux kernel: eax: 000001cc ebx: 000001c8 ecx: 00002800 edx: 000029c8
Dec 10 19:05:17 linux kernel: esi: c4581b48 edi: fc83a000 ebp: 00000001 esp: c4581b04
Dec 10 19:05:17 linux kernel: ds: 0018 es: 0018 ss: 0018
Dec 10 19:05:17 linux kernel: Process ifconfig (pid: 1245, stackpage=c4581000)
Dec 10 19:05:17 linux kernel: Stack: 00000001 c01335f2 c4733000 ffff2000 fc83a000 00000000 c1f98000 c45d0f42
Dec 10 19:05:17 linux kernel: c1f98000 fc83a000 00000000 000001c8 c4581b48 c1f981d0 c1f981e0 c22bbb00
[...]
|
|
Online Resourcen und Quellen:
http://www.kernel.org die Linux Kernel Quellen
http://www.google.de beliebte Suchmaschine
http://pciids.sourceforge.net/ neue PCI-ID's
http://linux-ip.net/html/index.html Guide to IP Layer Network Administration with Linux
|
|
|
|