# EtherChannel / STP / VTP

## EtherChannel lényege

Több fizikai linket egy logikai linkként kezelünk. Redundancia + nagyobb sávszélesség.

## PAgP EtherChannel – desirable

Két switch között például Fa0/1-2.

Mindkét switchen:

```bash
interface range FastEthernet0/1 - 2
switchport mode trunk
channel-group 1 mode desirable
exit

interface Port-channel1
switchport mode trunk
exit
```

## LACP EtherChannel – active

```bash
interface range FastEthernet0/1 - 2
switchport mode trunk
channel-group 1 mode active
exit

interface Port-channel1
switchport mode trunk
```

## Fontos EtherChannel szabályok

A portoknak egyezniük kell:
- sebesség
- duplex
- trunk/access mód
- allowed VLAN-ok
- native VLAN
- STP beállítások

## Ellenőrzés

```bash
show etherchannel summary
show interfaces port-channel 1
show running-config interface port-channel 1
```

## STP alapok

STP megakadályozza a Layer2 hurkokat.

## Root bridge beállítása

```bash
spanning-tree vlan 1 priority 4096
```

Vagy:

```bash
spanning-tree vlan 10 root primary
```

Másodlagos root:

```bash
spanning-tree vlan 10 root secondary
```

## STP ellenőrzés

```bash
show spanning-tree
show spanning-tree summary
show spanning-tree root
show spanning-tree blockedports
show spanning-tree interface fa0/1
```

## PortFast access portokra

Csak végpontokhoz, switchhez NE!

```bash
interface range fa0/1 - 10
spanning-tree portfast
```

## BPDU Guard

```bash
interface range fa0/1 - 10
spanning-tree bpduguard enable
```

## VTP

VTP VLAN információk terjesztésére használható switchek között.

### Server

```bash
vtp domain JEDLIK
vtp mode server
vtp password cisco
```

### Client

```bash
vtp domain JEDLIK
vtp mode client
vtp password cisco
```

### Transparent

```bash
vtp mode transparent
```

## Ellenőrzés

```bash
show vtp status
show vtp password
show vlan brief
```

## Tipikus hibák

### EtherChannel nem áll össze

Ellenőrizd:

```bash
show etherchannel summary
show run interface fa0/1
show run interface fa0/2
```

Mindkét oldalon ugyanaz legyen:
- trunk
- channel-group azonos protokollal
- sebesség/duplex

### STP blokkol egy portot

Ez nem feltétlen hiba. Ellenőrzés:

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