Wiki DE Start in the browser

Wiki › Basics

Troubleshooting: method and tools

Systematic instead of guessing: bottom-up through the layers, the most important commands on PC and router, and typical symptoms with their cause.

Standard
RFC 792, RFC 4443, RFC 826 …
See an example
3 demos

Work systematically

Guessing costs time. A proven approach is to work through the OSI model and encapsulation from the bottom up: a layer can only work if the one below it works.

LayerQuestionTool
1 PhysicalIs the cable plugged in, is the port active?link LED, show ip interface brief, show interfaces status
2 Data linkRight VLAN, does the switch learn the MAC?show vlan brief, show mac address-table, arp -a
3 NetworkAre address, mask and gateway correct? Is there a route there and back?ipconfig, ping, tracert, show ip route
4 TransportIs the port open, does the firewall let it through?netstat, nmap, show firewall, show access-lists
7 ApplicationIs the service running, is the name right?nslookup, browser, packet list

Two more strategies: top-down (start from the user's symptom, e.g. “the web page does not load”) and splitting (divide and conquer: test the middle of the path with ping and so rule out half of it). The only important thing is to change one thing at a time and to test again after each change.

The tools on the PC

CommandShowsWatch out for
ipconfig (/all)address, mask, gateway, DNS169.254.x.x means: no DHCP server reached (see Special address ranges)
ping <destination>reachability with ICMP echo (RFC 792, RFC 4443)“request timed out” only means: no reply. Whether the way there or back is missing only the packet list shows
tracert <destination>every router on the pathwhere the list stops, knowledge ends: the next router does not know the way or the reply does not come back
arp -aARP cache (IP to MAC)if the gateway is missing, layer 2 is already broken
nslookup <name>name resolution via DNSif ping 192.0.2.10 works but ping www.firma.example does not, DNS is the problem
netstatopen connections and portsis the service listening at all?

The tools on router and switch

  • show ip interface brief: addresses and state of all interfaces (up/up is good, down means cable or shutdown).
  • show ip route: is there a route to the destination? Which one wins (see Route selection: prefix, distance and metric)?
  • show ip ospf neighbor, show ip protocols: are the routers talking to each other?
  • show vlan brief, show interfaces trunk: is the port in the right VLAN, does the VLAN run over the trunk?
  • show running-config: the whole configuration at a glance, good for comparing.
  • show logging: messages from the device (e.g. port security, OSPF neighbour lost).

Typical symptoms

SymptomCommon cause
Ping within the own network works, into the other network notgateway missing or wrong; router interface without address
Ping reaches the router, but not beyondroute missing, often the return route on the other router (Static routing)
Two PCs in the same network cannot reach each otherdifferent VLANs, wrong mask, duplicate IP address
Ping by address works, by name notDNS server entered wrongly or record missing
Ping works, web page does notservice not running, firewall blocks port 80/443, wrong port forwarding
Only reachable sometimesduplicate IP or MAC address, loop without spanning tree
PC has 169.254.x.x (in leyoNET: “No address received from the DHCP server yet”)DHCP server unreachable, relay missing, pool empty

Document

Write down symptom, cause and solution briefly, ideally with the output of the decisive command. That makes it faster next time and makes the troubleshooting assessable. How to record a network is described under Documenting networks.

In leyoNET

  • Every end device has a command prompt (key T or double-click in the simulation); routers and switches have a command line.
  • The packet list shows where a packet gets lost. Filters such as icmp, arp or lost help; a click shows every frame layer by layer.
  • Step back and single step slow down the simulation until you can see every frame.
  • Exercises: “Who has the address twice?”, “IPv6 BC 3” (missing return route) and, in the class network, troubleshooting per site.

How to do it in leyoNET

The same text as in the app’s help (F1 key).

Console of end devices

Every end device (PC, notebook, server, phone) has a command prompt. Open it: select the device and press T, «Open console» in the device window, or double-click the device in the simulation. The commands need the running simulation; leyoNET switches to it if needed.

  • ipconfig (also ipconfig /all, Linux: ip addr, ifconfig): address, mask, gateway, DNS
  • ipconfig /release and ipconfig /renew (Linux: dhclient -r, dhclient): give back or fetch a DHCP address
  • ifdown eth0 / ifup eth0 (also ip link set eth0 down|up, Windows: netsh interface set interface Ethernet disable|enable): switch a port off or on. This changes the configuration just like switching it off in the «Ports» window
  • ping: -t runs until Ctrl+C (you see live when a connection drops), -n 10 or -c 10 sets the count, -i 1 the TTL (then the first router reports “TTL expired”)
  • tracert, nslookup, arp -a, arp -d, netstat, nmap (see Network scanner), ssh, cls; help lists them all

Routers and switches have a Command line instead.

Command line

Routers, firewalls and switches can be configured on the command line (modelled on Cisco IOS and FRRouting). Open it: double-click the device or “Command line” in its window. Everything you set in the CLI appears in the forms and vice versa.

Usage: Tab completes, ? shows the options, ↑/↓ recalls earlier commands (kept until reload, also when switching between design and simulation). Right-click pastes; several lines (e.g. a whole show running-config) run one after another. Abbreviations like conf t, int g0/0, sh ip ro work. A command of another level (e.g. interface vlan 10 while in router ospf) jumps there.

Modes: enable (privileged), configure terminal (configuration), interface …, vlan …, router ospf 1, ip dhcp pool …, ip access-list extended …; exit one level up, end all the way out.

`do`: run a show command from configuration mode without leaving it: do show ip interface brief, do ping 192.168.1.1, do write.

Examples: - Address: interface eth0 → ip address 192.168.1.1 255.255.255.0 → no shutdown - VLAN and access port: vlan 10 → name ENTWICKLUNG → interface port1 → switchport access vlan 10 - Trunk: interface port8 → switchport mode trunk → switchport trunk allowed vlan 10,20 - Router on a stick: interface eth0.10 → encapsulation dot1q 10 → ip address 192.168.10.1/24 - Layer 3 switch: ip routing → interface vlan 10 → ip address 192.168.10.1/24 → ip helper-address 192.168.20.200 - Static route: ip route 10.0.0.0 255.0.0.0 192.168.1.254 - OSPF: router ospf 1 → network 0.0.0.0 255.255.255.255 area 0 - DHCP pool: ip dhcp excluded-address 192.168.10.1 192.168.10.9 → ip dhcp pool VLAN10 → network 192.168.10.0 255.255.255.0 → default-router 192.168.10.1 - ACL: ip access-list extended GAST → permit tcp any host 192.168.1.80 eq 80 → interface port2 → ip access-group GAST in - Port channel: interface range port7 - 8 → channel-group 1 mode active - Checks: show running-config, show ip route, show vlan brief, show interfaces trunk, show ip ospf neighbor, show access-lists, show ip dhcp binding, show etherchannel summary

All commands: documentation docs/cli.md.

Saving: show running-config shows the running configuration. As on a real device, copy running-config startup-config (short write memory) saves it as startup-config; show startup-config shows the saved one. The header of the CLI window shows whether anything changed since the last save.

Packet list

The packet list shows every frame crossing a cable: time, path, protocol, source, destination and a summary. Clicking opens the details following the OSI model model. Use the Display filter to hide what you don't need, and pcap export to take the capture into Wireshark. Each packet once hides unchanged forwards by switches; turn it off to see every segment.

Display filter

The filter works much like Wireshark's:

  • protocols: arp, dhcp, dns, http, icmp, tcp, udp, stp, ospf, rip, bgp, vrrp, rstp, ppp, wlan, broadcast, IPv6: ipv6, icmpv6, ndp, dhcpv6, dslite, VPN: esp, ike, vpn, data centre: vxlan, lacp
  • comparisons: ip.addr == 10.0.0.1, ip.src, ip.dst, ipv6.addr, ipv6.src, ipv6.dst, eth.addr, port == 80, tcp.port, udp.port, vlan == 10, tcp.stream == 0 (one TCP connection), tcp.flags.syn == 1 (also ack, fin, rst), also with !=
  • host PC1 (device name), lost (lost frames)
  • combine with and, or, not and parentheses
  • Follow TCP stream: click a packet, then “Follow TCP stream”. The list shows only that connection (like “Follow TCP Stream” in Wireshark); the bar on top shows whether setup (SYN, SYN/ACK, ACK), data and teardown (FIN) occurred.

Example: dhcp or (icmp and host PC1). The chips below the filter set common expressions.

See an example

  • Demo “Default gateway” in leyoNETDemo “Default gateway” in leyoNET
    Slow motion This is how it looks in the simulation: every dot is a frame on the cable.
    Default gateway

    Two subnets connected by a router.

    PC 1 sees that the target is in another network and sends the packet to its router. The TTL drops by one.

    Watch live Project file

  • Demo “ARP and ping in the LAN” in leyoNETDemo “ARP and ping in the LAN” in leyoNET
    Slow motion This is how it looks in the simulation: every dot is a frame on the cable.
    ARP and ping in the LAN

    Three computers on a switch, all in 192.168.1.0/24.

    PC 1 asks for PC 2's MAC with an ARP broadcast, then four ICMP echoes follow. The switch learns its MAC table.

    Watch live Project file

  • Demo “Duplicate MAC address” in leyoNETDemo “Duplicate MAC address” in leyoNET
    Duplicate MAC address

    Three computers on a switch; the notebook has the same MAC address as PC 2.

    PC 1 pings PC 2 while the notebook pings PC 1. The switch learns the MAC alternately on two ports and reports «MAC moves»; replies reach the wrong device and pings are lost.

    Watch live Project file

“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, with a step-by-step tour.

Practise

  • ★☆☆☆☆ Who has the address twice? · 3 goals · Worksheet (German)
  • ★★★★☆ Troubleshooting a federation site · 9 goals · class network · Worksheet (German)
  • ★★★☆☆ IPv6 BC 3: ICMPv6 – ping, traceroute and error messages · 6 goals · Worksheet (German)
  • ★★☆☆☆ Protocol analysis – Task 1: ICMP and TTL · 10 goals · Worksheet (German)

In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.

Standards

  • RFC 792 – Internet Control Message Protocol
  • RFC 4443 – Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification
  • RFC 826 – An Ethernet Address Resolution Protocol
  • RFC 1812 – Requirements for IP Version 4 Routers

Read on

Found a mistake or have an idea? Source of this page on GitHub.