# Cisco hibakeresés – show/debug cheat sheet

## Első parancs mindig

```bash
show ip interface brief
```

Jelentések:

| Status | Protocol | Jelentés |
|---|---|---|
| up | up | működik |
| administratively down | down | nincs `no shutdown` |
| up | down | Layer2/protokoll/kábel/encapsulation hiba |
| down | down | kábel/port/eszköz hiba |

## Interfész részletesen

```bash
show interfaces
show interfaces fa0/1
show interfaces serial0/0/0
```

## Hibaszámlálók

```bash
show interfaces fa0/1 counters errors
show interfaces fa0/1 status
clear counters
```

## Serial hibakeresés

```bash
show controllers serial0/0/0
show interfaces serial0/0/0
```

DCE oldalon clock rate kell:

```bash
interface serial0/0/0
clock rate 64000
```

PPP/HDLC mismatch:

```bash
interface serial0/0/0
encapsulation ppp
```

vagy

```bash
encapsulation hdlc
```

## Routing hibakeresés

```bash
show ip route
show ip protocols
ping <next-hop>
traceroute <cél>
```

## OSPF

```bash
show ip ospf neighbor
show ip ospf interface
show ip protocols
debug ip ospf events
undebug all
```

Ha nincs szomszéd:
- area egyezik?
- subnet mask egyezik?
- hello/dead timer egyezik?
- authentication egyezik?
- passive-interface nincs véletlenül rajta?
- interface up/up?

## DHCP

```bash
show ip dhcp binding
show ip dhcp pool
show ip dhcp conflict
```

Ha nem kap IP-t:
- DHCP pool network jó?
- excluded-address nem fogja-e meg az egész tartományt?
- default-router jó?
- másik VLAN esetén van-e ip helper-address?
- szerver elérhető-e?

## NAT

```bash
show ip nat translations
show ip nat statistics
show access-lists
```

Ha nem NAT-ol:
- inside/outside jó interfészen van?
- ACL permiteli a belső hálózatot?
- van default route kifelé?
- overload be van írva?
- forgalom tényleg generálódott?

## ACL

```bash
show access-lists
show running-config interface <interface>
```

Ha valami nem megy:
- implicit deny?
- rossz irány: in/out?
- rossz interfész?
- standard/extended rosszul elhelyezve?
- hiányzik `permit ip any any`?

## STP

```bash
show spanning-tree
show spanning-tree blockedports
```

## VLAN/trunk

```bash
show vlan brief
show interfaces trunk
```

## EtherChannel

```bash
show etherchannel summary
```

Jó állapot például: `P` bundled in port-channel.

## Port Security

```bash
show port-security
show port-security interface fa0/1
show port-security address
```

## Debug kikapcsolása

Mindig tudd:

```bash
undebug all
no debug all
```

## Távoli ACL teszt veszély esetén

Ha távolról konfigolsz ACL-t, használhatsz biztonsági újraindítást:

```bash
reload in 30
```

Ha minden jó:

```bash
reload cancel
```
