ajout Etherchannel

This commit is contained in:
shango-wk
2026-06-02 09:35:28 +02:00
parent fd0887a683
commit 4d24fca821
3 changed files with 315 additions and 0 deletions

View File

@@ -34,3 +34,5 @@ tags:
[[PortFast (STP Toolkit)]] [[PortFast (STP Toolkit)]]
[[BPDU Guard & BPDU Filter (STP Toolkit)]] [[BPDU Guard & BPDU Filter (STP Toolkit)]]
[[Root Guard (STP Toolkit)]] [[Root Guard (STP Toolkit)]]
[[Rapid Spanning Tree Protocol]]
[[EtherChannel]]

View File

@@ -0,0 +1,185 @@
---
id: 22 Rapid Spanning Tree Protocol
aliases: []
tags:
- CCNA
---
# Rapid Spanning Tree Protocol
## Spanning Tree Version
### Industry standards (IEEE)
Spanning Tree Protocol (802.1D)
- The original STP
- ALl VLANs share one STP instance.
- Therefore, cannot load balance.
Rapid spanning Tree Protocol (802.1w)
- Much faster at converging/adaptating to network changes than 802.1D
- All VLANs share one STP instance.
- Therefore, cannot load balance
Multiple Spanning Tree Protocol (802.1s)
- Uses modified RSTP mechanics.
- Can group multiple VLANs into different instacnces (ie. VLANs 1-5 instance 1, VLANs 6-10 in instance
2 ) to perform load balancing
### CISCO Versions
Per-VLAN Spanning Tree Plus (PVST+)
- Cisco's upgrade to 802.1D
- Each VLAN has its own STP instance.
- Can load balance by blocking different ports in each VLAN.
Rapid Per-VLAN Spanning Tree Plus (Rapid PVST+)
- Cisco's upgrade to 802.1w
- Each VLAN has its own STP instance
- Can load balance by blocking different ports in each VLAN
## Rapid spanning Tree Protocol
Cisco's summary:
"RSTP is not a timer-based spanning tree algorithm like 802.1D. therefore, RSTP offers an improvement
over the 30 seconds or more that 902.1d takes to move a link to forwarding. the heart of
the protocol is new bridge-bridge handshake mechanism, which allows ports to move directly to forwarding."
### Similarities between STP and RSTP:
RSTP serves the same purpoe as STP, blocking specific ports to prevent Layer2 loops.
- RSTP elect a root bridge with same rules as STP
- RSTP elects root ports with the same rules as STP.
- RSTP elects designated ports with the same rules as STP
### Differences
#### COST
| speed | STP COST | STP COST |
| -------------- | --------------- | --------------- |
| 10 Mbps | 100 | 2,000,000 |
| 100 Mbps | 19 | 200,000 |
| 1 Gbps | 4 | 20,000 |
| 10 Gbps | 2 | 2,000 |
| 100 Gbps | x | 200 |
| 1 Tbps | x | 20 |
#### Port State
| STP Port State | Send/Receive BPDUs | Frame Forwarding | MAC Learning | Stable/Transitional |
| ------------- | -------------- | -------------- | -------------- | -------------- |
| Discarding | NO/YES | NO | NO | Stable |
| Learing | YES/YES | NO | YES | Tranisitional |
| Forwarding | YES/YES | YES | YES | Stable |
- if a port is administratively disabled (shutdown command) = discarding state
- if a port is enabled but blocking traffic to prevent Layer 2 loops = discarding state
#### Port Roles
*The root port role remains unchanged in RSTP.*
- The port wthat is closet to the root bridge becomes the root port for the switch.
- The root bridge is the only switch that doesn't have a root port.
*The designated port role remains unchanged in RSTP.*
- The port on a segment (collision domain) that sends the best BPDU is that
segment's designated port (only one per segment)
- *The non designated port role is split into two separate roles in RSTP*:
- The alternate port role
- the backup port role
##### Alternate port Role
The RSTP alternate port role is discarding port that receives a superior BPDU from another switch.
- This is the same as what you've learned about *blocking* ports in classic STP.
- Functions as a backup to the root port.
- If the root port fails, the switch can immediately move its best alternate port to forwarding
This immediate move to fowarding state functions like a classic STP optional feature called
UplinkFast. Because it is built into RSTP, you do not need to activate UplinkFast when using
RSTP/Rapid PVST+
One more STP optional feature that was built into RSTP is BackboneFast.
Backbone Fast allows SW3 to expire the made age timers on its interface and rapidly forward the superior
BPDUs to SW2.
This functionality is built into RSTP, so it does not need to be configured
##### Backup port role
The RSTP backup port role is a discarding port that receives a superior BPDU from another
interface on the same switch.
- This only happnes when two interfaces are connected to the same collision domain (via a hub)
- Hubs are not used in modern networks, so you will probably not encounter an RSTP backup port.
- Function as backup for a designated port
- The interface with the lowest port ID will be selected as the designated port and the other will be the
backup port
### BPDU
In classic [[STP]], only the root bridge originated BPDUs, and other switches just forwarded the BPDUs
they received.
In Rapid STP, all Switches originate and send their own BPDUs from their designated ports
All switches running Rapid STP send their own BPDUs every hello time (2 seconds).
- Switches 'age' the BPDU information much more quickly, in classic STP a switch waits 10 hello intervales
(20 seconds). In rapid STP, a switch considers a neighbor lost if it misses 3 BPDUs (6 seconds)
It will the 'Flush' All MAV addresses learned on that interface
## RSTP Link Types
RSTP distiguishes between three different 'link types'
- Edge: a port that is connected to an end host. Moves directly to forwarding without negotiation.
- Point-to-point: a direct connection between two switches
- Shared a connection to a [[hub]]. Must operate in half-duplex mode.
### Edge
Edge ports are connected to end hosts.
- Because ther is no risk of creating a loop, they can move stright to the forwarding state without the
negotiation process.
- They function like a classic STP port with PortFast enabled
```Cisco
SW1(config-if)# spanning-tree portfast
```
### Point-to-Point
Point-to-point ports connect directly to another switch
- They function in full-duplex
- you don't need to configure the interface as point-to-point (it should be detected)
```Cisco
SW1(config-if)# spanning-tree link-type point-to-point
```
### Shared
shared Ports connect to another switch (or switches) via a hub.
- They function in half-duplex
- You don't need to configure the interface as shared (it should be detected)
```Cisco
SW1(config-if)# spanning-tree link-type shared
```
### Configuration
```Cisco
SW3(config)# spanning-tree mode rapid-pvst
SW3(config)# do show spanning-tree
```
## Review
Comparison of [[STP]] versions (standard vs [[Cisco]])
Rapid PVST+

128
23. EtherChannel.md Normal file
View File

@@ -0,0 +1,128 @@
---
id: 23. EtherChannel
aliases: []
tags: []
---
# EtherChannel
multiple host -- ASW1 -- DSW1
ASW = Access layer Switch, a switch that end hosts connect to
DSW = Distribution layer switch, a switch that access layer switches connect to
When the bandwith of the interfaces connected to end hosts is greater than the bandwidth of the
connection to the distribution switch(es), this is called *oversubscription*.
Some oversubscription is acceptable, but too much will cause congestion.
- if you connect two switchs together with multiple links, all except one will be disabled by
[[spanning tree]]
- if all of ASW1's interfaces were forwarding, Layer 2 loops would form between ASW1 and DSW1,
leading to [[broadcast storms]].
- Other links will be unused unless the active link fails. in that case one of the inactive
links will start forwarding
- EtherChannel groups multiple interfaces together to act as a single interface.
- STP will treat this group as a single interface
Traffic using the EtherChannel wil be load balanced among the physical interfaces in the group.
An [[algorithm]] is used to determine which traffic will use which physical interface.
Some other names for an EtherChannel are:
- Port Channel
- LAG (Link aggregaton Group)
## Load Balancing
- EtherChannel load balances based on flows
- A flow is a communication between two nodes in the network
- Frames in the same flow will be forwarded using the same physicial interface.
- If frames in the same flow were forwarded using different physical interfaces, some frames
may arrive at the destination out of order, which can cause problems
- You can change the inputs used in the interface selection calculation.
- Inputs that can be used:
- Source [[MAC]]
- Destination MAC
- Source and Destination MAC
- Source [[IP]]
- Destination IP
- Source and Destination IP
### Commands
see current configuration
```Cisco
ASW1#show etherchannel load-balance
### default will be set to src-dst-ip
```
for configuring load balance configuration
```Cisco
ASW1(config)#port-channel load-balance src-dst-mac
## to see other method
ASW1(config)#port-channel load-balance ?
```
## EtherChannel Configuration
There are three methods of EtherChannel configuration on Cisco switches:
- PAgP (Port Aggregation Protocol)
- Cisco proprietary protocol
- Dynamically negotiates the creation/maintenance of the EtherChannel.
(like DTP does for trunks)
- LACP (Link Aggregation Control Protocol)
- Industry standard protocol (IEEE 802.3ad)
- Dynamically negotiate the creation/maintenance of the EtherChannel.
(like DTP does for trunks)
- Static EtherChannel
- A protocol isn't used to determine if an EtherChannel should be formed.
- Interfaces are statically configured to form an EtherChannel
Up to *8 interfaces* can be formed into a single EtherChannel (LACP allows up to 16, but only
8 will be active, the other 8 will be in standby mode, waiting for an active interface to fail)
```Cisco
ASW1(config)#inteface range g0/0 - 3
## to see all methods
ASW1(config-if-range)#channel-group 1 mode ?
## for PAgP
ASW1(config-if-range)#channel-group 1 mode desirable
```
note: The channel-group number has to match for member interfaces on the same switch.
However, it doesn't have to match the channel-group number on the other switch.
(channel-group 1 on ASW1 can form an EhterChannel with channel-group 2 on DSW1)
Member intefaces must have matching configurations.
- Same duplex (full/half)
- Same speed
- Same switchport mode (access/trunk)
- Same allowed VLANs/native VLAN (for trunk interfaces)
If an interface's configurations do not match the others, it will be excluded from the EtherChannel
to see running configuration of the EtherChannel
```Cisco
ASW1#show etherchannel summary
## less utilise command
ASW1#show etherchannel port-channel
```
## Layer 3 EtherChannel
```Cisco
ASW1(config)#int range g0/0 - 3
ASW1(config-if-range)#no switchport
ASW1(config-if-range)#channel-group 1 mode active
ASW1(config-if-range)#int po1
ASW1(config-if)#ip address 10.0.0.1 255.255.255.252
```
## Review
- What is EtherChannel? what problems does it solve?
- Configuring Layer 2/Layer 3 EtherChannel