A3. Administració bàsica
torna M7 - UF2 Administració de dispositius de xarxa
Contingut
Spanning – Tree
STP (Spanning-Tree Protocol), permet crear topologies lògiques no redundants (sense loops) en topologies físiques redundants.
Una topologia redundant, on existeix un o més cicles, generen tempestes de broadcast.
- Una xarxa sense redundància té múltiples punts de falla. Per tant és una xarxa no confiable.
- Una xarxa redundant permet recuperar-la en cas de falla utilitzant un camí alternatiu.
Per contra la gestió de la redundància també implica l’ús de certs recursos (CPU, ample de banda)
Problemes que cal solucionar:
- Tempestes de broadcast
- Múltiples còpies de trames unicast
- Taula MAC inestable. Vàries còpies mateixa trama diferents ports.
El protocol STP sobre una xarxa física redundant, desactiva certs ports per obtenir
- Una topologia lògica sense redundància.
- Una xarxa amb les rutes més curtes. Basada en els costos acumulatius dels enllaços, segons la velocitat d’aquests.
Els commutadors es comuniquen entre ells i decideixen quin serà el Root (Arrel de l'arbre de la topologia sense redundàncies). L'elecció és basa en el identificador de Pont (Bridge ID = Prioritat + adreça MAC). El que té el BID més baix serà el root, tot i que també es pot forçar a un dels commutadors.
Així cada Switch té ports actius i port bloquejats.
En cas de falla d’un dels ports, automàticament el protocol activa / descativa els ports necessaris.
Actualment s’ha desenvolupat un nou algoritme rapid spanning-tree amb un menor temps de convergència.
Spannig tree s'activa a les xarxes virtuals (VLAN's) no a les interfases físiques. Per defecte està actiu (protocol STP)
Switch#show spanning-tree Switch(config)#spanning-tree vlan 1 root primary Switch(config)#spanning-tree mode rapid-pvst Switch(config)#spanning-tree mode pvst // Per defecte Switch(config)#no spanning-tree vlan 1 // Desactivar spanning tree per una vlan
Amb l'STP actiu els commutadors estan constantment comunicant-se. Primerament escolleixen el commutador arrel i després monitoritzen possibles canvis a la topologia per prendre les mesures oportunes.
El protocol assigna a cada port dels commutadors diferents rols i un cost en funció de la velocitat d'aquests (major velocitat menor cost).
- Designat: ports normals
- Arrel: màxim un per commutador, és el port cap al commutador arrel
- Alternatiu (Estat bloquejat)
Per exemple
- Ports FastEthernet tenen cost 19
- Ports GigaEthernet tenen cost 4
Switch#sh spanning-tree VLAN0001 Spanning tree enabled protocol rstp Root ID Priority 32769 Address 0001.4220.C76D Cost 8 Port 25(GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0006.2AD7.45C3 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Gi0/1 Root FWD 4 128.25 P2p Gi0/2 Altn BLK 4 128.26 P2p Switch#
A la informació del STP del commutador arrel veurem el missatge This bridge is the root
Switch#sh spanning-tree VLAN0001 Spanning tree enabled protocol rstp Root ID Priority 32769 Address 0001.4220.C76D This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0001.4220.C76D Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Gi0/1 Desg FWD 4 128.25 P2p Gi0/2 Desg FWD 4 128.26 P2p Fa0/1 Desg FWD 19 128.1 P2p
Si seguim els ports root dels diferents dispositius veurem l'arbre de cost mínim resultant del STP.
Spanning Tree Song (Radia Perlman) https://www.youtube.com/watch?v=iE_AbM8ZykI
http://www.the-evangelist.info/2010/04/ccnp-switch-8-configuracion-de-spanning-tree/
Seguretat
L’accés físic a una xarxa pot suposar un problema de seguretat, qualsevol persona que pot connectar un ordinador a un Switch hi té accés. Per això es poden implementar alguns sistemes de seguretat per port.
- Establir les adreces estàtiques a la taula MAC (Millora rendiment).
- Especificat client MAC (segur) per un port determinat, només aquestes es podran connectar a port corresponent.
- Limitar el nombre de dispositius segurs per port
- Indicar una acció en cas que es violi el client segur: restringir (drop packets, avis administrador/syslog i incrementa comptador), protegir (drop paquets, no incrementa comtpador) o aturar la interfase (incrementa comtpador)
Switch(config)# mac-address-table static <mac-address of host> vlan <vlan name> interface FastEthernet <Ethernet number> Switch#show mac-address-table Switch#clear mac-address-table Switch(config)#interface FastEthernet 0/1 Switch(config-if)#switchport mode access // No troncal Switch(config-if)#switchport port-security ... Switch#show port-security Switch#show port-security interface fastEthernet 0/2 Switch#clear port-security all // Esborra adreces MAC configurades port segur
Per tornar a activar una interfase desactivada per seguretat (shutdown + no shutdown)
Les configuracions mac estàtica i seguretat de port són mútuament exclusives
Nivells de privilegis
Per defecte
EXEC (mode usuari) nivell 1 EXEC privilegiat i configuracions específiques nivell 15
No és habitual però es podrien canviar els nivells de seguretat de les configuracions específiques (Per defecte 15)
Switch> show privilege Current privilege level is 1
Switch# show privilege Current privilege level is 15
Bonding - Link Aggregation - 802.3ad.
http://en.wikipedia.org/wiki/Channel_bonding
http://en.wikipedia.org/wiki/Link_aggregation
Protocols d'agregació
- Port Aggregation Protocol (PAgP) --> Propietari CISCO
- Link Aggregation Control Protocol (LACP) --> Estàndard IEEE 802.1ax / 802.3ad
Etherchannel
Els enllaços agregats s'anomenen Fast EtherChannel (FEC) or Gigabit EtherChannel (GEC)
Modes Etherchannel:
- LACP :Active / Passive en funció si inicia negociació o no (IEEE 802.1ax)
- PAgP
- Auto / Desirable en funció si inicia negociació o no (Propietary de CISCO)
- on : Els dos canals han d'estar en aquest mode
Switch# configure terminal
Switch(config)# interface range gigabitethernet 1/1-2
Switch(config-if-range)# channel-group 5 mode {active | passive | auto | desirable }
Switch(config-if-range)# channel-protocol { lacp | pagp }
Switch(config-if-range)# end
Switch# show interface etherchannel
Switch# show etherchannel
Switch#show etherchannel summary
Load Balance:
- Per MAC origen (default): Diferents origens van per diferents ports. Mateix origen pel mateix port
- Per MAC destí: Diferents destins van per diferents ports. Mateix destí pel mateix port
Switch(config)# port-channel load-balance src-mac
Switch#show etherchannel load-balance
Switch# show etherchannel
Mirrored / Spanned Ports
http://en.wikipedia.org/wiki/Port_mirroring