2. CCNA3-2 Chapter 5-1
Redundant Layer 2 Topologies
• Ketersedian network infrastructure yang handal sangat
dibutuhkan, khususnya pada bisnis yang memerlukan
network yang memiliki tingkat link-down yang cukup kecil.
• Redundancy merupakan solusi untuk memastikan
ketersediaan link network selalu ada.
• Layer 2 redundancy meningkatkan ketersediaan link netwok
dengan menggunakan alternate network paths melalui
penambahan device dan kabel pada network infrastruktur.
• Memiliki beberapa jalur data network dengan hanya allows for
a single path untuk koneksi tanpa mengganggu konektivitas
antar device dalam network.
• Spanning Tree Protocol (STP); logically blocks physical loops,
dalam network dapat dengan cepat melakukan kalkulasi untuk
menentukan port mana yang akan di block dalam network
berbasis vlan.
4. CCNA3-4 Chapter 5-1
Redundancy
Redundant paths createRedundant paths create
loopsloops in the network.in the network.
Redundant paths createRedundant paths create
loopsloops in the network.in the network.
How are they controlled?How are they controlled?
Spanning Tree ProtocolSpanning Tree Protocol
How are they controlled?How are they controlled?
Spanning Tree ProtocolSpanning Tree Protocol
5. CCNA3-5 Chapter 5-1
Redundancy
• Spanning Tree Protocol (STP) secara default berada dalam kondisi
enabled pada semua switches.
• STP menempatkan salah satu ports switch dalam kondisi untuk
melakukan forwarding state dan ports switch lainnya dalam kondisi
blocking state.
ForwardForwardForwardForward
BlockedBlockedBlockedBlocked
6. CCNA3-6 Chapter 5-1
Issues with Redundancy
• Redundancy sangat penting dalam hierarchical design
network.
• Ketika multiple paths terdapat diantara 2 devices dalam
network dan STP telah di-disabled pada switches
tersebut, maka Layer 2 loop akan terjadi.
• Jika STP di-enabled kan pada switches tersebut, atau
dalam kondisi default, maka Layer 2 loop tidak akan
terjadi.
• Dalam hierarchical design network infrastruktur,
redundancy biasanya dilakukan pada distribution and
core layers switch dengan cara menambah hardware dan
alternative paths melalui hardware tambahan tersebut.
7. CCNA3-7 Chapter 5-1
Issues with Redundancy
• Ethernet frames tidak memiliki Time-To-Live (TTL) parameter seperti
pada packets IP.
• Hal ini akan mengakibatkan, pengiriman ethernet frame tidak dapat
dihentikan/not terminated dalam switched network, sehingga
ethernet frame tersebut akan selalu berputar-putar dari switch ke
switch tanpa tujuan yang jelas.
8. CCNA3-8 Chapter 5-1
Issues with Redundancy
• Kita harus ingat switches menggunakan Source MAC address untuk
belajar dan mengetahui keberadaan suatu devices kemudian menyimpan
information tersebut kedalam MAC address Tables.
• Switches akan melakukan flooding frames untuk mencari unknown
destinations sampai mereka mempelajari dan mendapatkan informasi
mengenai MAC addresses dari devices yang dimaksud.
9. CCNA3-9 Chapter 5-1
Issues with Redundancy
• Sebagai tambahan, multicasts dan broadcasts juga akan
flooded ke semua port kecuali receiving port. (Multicasts will
not be flooded if the switch has been specifically configured
to handle multicasts.)
• http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/releas
10. CCNA3-10 Chapter 5-1
Issues with Redundancy
PC1 sends aPC1 sends a
broadcast.broadcast.
PC1 sends aPC1 sends a
broadcast.broadcast.
S2 receives theS2 receives the
frame and updatesframe and updates
the MAC table.the MAC table.
S2 receives theS2 receives the
frame and updatesframe and updates
the MAC table.the MAC table.
S2 floods theS2 floods the
broadcast out allbroadcast out all
ports except theports except the
receiving port.receiving port.
S2 floods theS2 floods the
broadcast out allbroadcast out all
ports except theports except the
receiving port.receiving port.
S3 and S1 updateS3 and S1 update
their MAC tablestheir MAC tables
S3 and S1 updateS3 and S1 update
their MAC tablestheir MAC tables
S3 and S1 nowS3 and S1 now
flood the broadcast.flood the broadcast.
S3 and S1 nowS3 and S1 now
flood the broadcast.flood the broadcast.
S3 and S1 updateS3 and S1 update
their MAC tablestheir MAC tables
with the wrongwith the wrong
informationinformation
S3 and S1 updateS3 and S1 update
their MAC tablestheir MAC tables
with the wrongwith the wrong
informationinformation
S3 and S1 forwardS3 and S1 forward
the broadcast backthe broadcast back
to S2.to S2.
S3 and S1 forwardS3 and S1 forward
the broadcast backthe broadcast back
to S2.to S2.
S2 updates itsS2 updates its
MAC table with theMAC table with the
wrong informationwrong information
S2 updates itsS2 updates its
MAC table with theMAC table with the
wrong informationwrong information
S2S2 floodsfloods thethe
broadcast againbroadcast again
S2S2 floodsfloods thethe
broadcast againbroadcast again
S3 and S1 update theirS3 and S1 update their
MAC tables again withMAC tables again with
thethe wrong informationwrong information
S3 and S1 update theirS3 and S1 update their
MAC tables again withMAC tables again with
thethe wrong informationwrong information
11. CCNA3-11 Chapter 5-1
Issues with Redundancy
• Broadcast Storms:
PC1 sends aPC1 sends a
broadcastbroadcast
PC1 sends aPC1 sends a
broadcastbroadcast
No STPNo STP so aso a
loop is createdloop is created
No STPNo STP so aso a
loop is createdloop is created
PC4 sends aPC4 sends a
broadcastbroadcast
PC4 sends aPC4 sends a
broadcastbroadcastAnother loopAnother loopAnother loopAnother loop
PC3 sends a broadcast andPC3 sends a broadcast and
creates yet another loopcreates yet another loop
PC3 sends a broadcast andPC3 sends a broadcast and
creates yet another loopcreates yet another loop
PC2 sends aPC2 sends a
broadcastbroadcast
PC2 sends aPC2 sends a
broadcastbroadcast
Because of the highBecause of the high
level of traffic, itlevel of traffic, it
cannot be processed.cannot be processed.
Because of the highBecause of the high
level of traffic, itlevel of traffic, it
cannot be processed.cannot be processed.
In fact, the entire network canIn fact, the entire network can
no longer process new trafficno longer process new traffic
and comes to a screeching halt.and comes to a screeching halt.
In fact, the entire network canIn fact, the entire network can
no longer process new trafficno longer process new traffic
and comes to a screeching halt.and comes to a screeching halt.
12. CCNA3-12 Chapter 5-1
Issues with Redundancy
• Duplicate Unicast Frames:
PC1 sends aPC1 sends a
unicastunicast frameframe
to PC4to PC4
PC1 sends aPC1 sends a
unicastunicast frameframe
to PC4to PC4
S2 has no entry forS2 has no entry for
PC4 so the framePC4 so the frame
is flooded out theis flooded out the
remaining portsremaining ports
S2 has no entry forS2 has no entry for
PC4 so the framePC4 so the frame
is flooded out theis flooded out the
remaining portsremaining ports
Both S3 and S1 haveBoth S3 and S1 have
entries for PC4 so theentries for PC4 so the
frame is forwardedframe is forwarded
Both S3 and S1 haveBoth S3 and S1 have
entries for PC4 so theentries for PC4 so the
frame is forwardedframe is forwarded
S1 also forwardsS1 also forwards
the frame itthe frame it
received from S3received from S3
S1 also forwardsS1 also forwards
the frame itthe frame it
received from S3received from S3
End result….End result….
PC4 receives two copies of the samePC4 receives two copies of the same
frame. One from S1 and one from S3.frame. One from S1 and one from S3.
End result….End result….
PC4 receives two copies of the samePC4 receives two copies of the same
frame. One from S1 and one from S3.frame. One from S1 and one from S3.
13. CCNA3-13 Chapter 5-1
Real-World Redundancy Issues
• Loops in the Wiring Closet:
• Error biasanya disebabkan masalah dalam pengkabelan.
14. CCNA3-14 Chapter 5-1
Real-World Redundancy Issues
• Loops in Cubicles:
• Beberapa user memiliki personal switch atau hub.
Affects all of theAffects all of the
traffic on S1traffic on S1
Affects all of theAffects all of the
traffic on S1traffic on S1
16. CCNA3-16 Chapter 5-1
Spanning-Tree Algorithm (STA)
• STP Topology – Avoiding a loop (menghindari terjadinya looping):
STP is in use and S3STP is in use and S3
has placed port F0/2has placed port F0/2
inin blocking stateblocking state toto
avoid a loop.avoid a loop.
STP is in use and S3STP is in use and S3
has placed port F0/2has placed port F0/2
inin blocking stateblocking state toto
avoid a loop.avoid a loop.
PC1 sends aPC1 sends a
broadcast.broadcast.
PC1 sends aPC1 sends a
broadcast.broadcast.
S2 forwards theS2 forwards the
broadcast –broadcast – butbut
not to S3not to S3..
S2 forwards theS2 forwards the
broadcast –broadcast – butbut
not to S3not to S3..
S1 forwards theS1 forwards the
broadcast.broadcast.
S1 forwards theS1 forwards the
broadcast.broadcast.
Because F0/2 is inBecause F0/2 is in
blocking stateblocking state, the, the
broadcast is notbroadcast is not
forwardedforwarded back toback to
S2. – NO LOOP!S2. – NO LOOP!
Because F0/2 is inBecause F0/2 is in
blocking stateblocking state, the, the
broadcast is notbroadcast is not
forwardedforwarded back toback to
S2. – NO LOOP!S2. – NO LOOP!
17. CCNA3-17 Chapter 5-1
Spanning-Tree Algorithm (STA)
• STP Topology – Network Failure (Kegagalan Network):
Trunk 1Trunk 1
FailureFailure
Trunk 1Trunk 1
FailureFailure
S3 portS3 port
activatedactivated
S3 portS3 port
activatedactivated
PC1 Sends aPC1 Sends a
broadcast.broadcast.
PC1 Sends aPC1 Sends a
broadcast.broadcast.
S2 forwards theS2 forwards the
broadcast.broadcast.
S2 forwards theS2 forwards the
broadcast.broadcast.
S3 and S1 forwardS3 and S1 forward
the broadcast.the broadcast.
S3 and S1 forwardS3 and S1 forward
the broadcast.the broadcast.
Trunk 1 comesTrunk 1 comes
back up.back up.
Trunk 1 comesTrunk 1 comes
back up.back up.
S3 port back toS3 port back to
blocking modeblocking mode..
S3 port back toS3 port back to
blocking modeblocking mode..
18. CCNA3-18 Chapter 5-1
Spanning-Tree Algorithm (STA)
• Terminology:
• Root Bridge:
• Switch yang digunakan sebagai reference point untuk
semua calculations.
• Root Ports:
• Port Switch terdekat ke root bridge.
• Designated Port:
• Semua port yang bukan root (non-root ports) yang
diberi izin untuk mem-forward traffic didalam network.
• Non-designated Ports:
• Semua ports yang di-configured dalam kondisi mem-
blocking untuk menghindari terjadinya loops.
19. CCNA3-19 Chapter 5-1
Spanning-Tree Algorithm (STA)
• STP menggunakan Spanning Tree Algorithm (STA) untuk
menentukan port switch yang mana dalam network yang
akan di configurasi untuk melakukan blocking agar tidak
terjadi loops.
• STP memastikan hanya ada 1 logical path diantara semua
destinations yang ada dalam network dengan cara
memblocking redundant path untuk mencegah terjadinya
loops.
• Melalui proses election/pemilihan, algorithma akan memilih single
switch sebagai root bridge dan menggunakannya sebagai reference
point untuk semua calculations.
• Election process di controlled menggunakan Bridge-ID (BID).
Bridge
Priority
MACMAC
AddressAddress
22 66
20. CCNA3-20 Chapter 5-1
Root Bridge
• Election Process:
• Pada semua switches yang berpartisipasi dalam broadcast domain.
• Setelah switch selesai melakukan boots, switch akan mengirim
keluar Frame Bridge Protocol Data Units (BPDU), yang berisi Bridge
ID dan Root ID dari switch, setiap 2 seconds.
• Bagaimana cara mengidentifikasikan root ID dari root bridge (switch
referensi point/switch root bridge) di network..?
Menentukan Root Bridge.
The Root Bridge of the spanning tree is the bridge with the
smallest (lowest) Bridge ID.
Setiap Bridge memiliki unique identifier (ID) and priority
number yang bisa di konfigurasi; dengan kata lain; Bridge ID
contains both numbers.
To compare 2 Bridge IDs, the priority is compared first.
If two bridges have equal priority, then the MAC addresses
are compared.
21. CCNA3-21 Chapter 5-1
Root Bridge
Lanjutan : Select a root bridge.
For example:
Misalnya :
Switch A memiliki (MAC=0200.0000.11110200.0000.1111) dan
Switch B memiliki (MAC=0200.0000.22220200.0000.2222),
Kedua Switch tersebut memiliki nilai priority yang sama, yaitu 10
(default), maka untuk memilih switch yang akan menjadi root
bridge kita bandingkan mac-addressnya, dan yang memiliki mac-
address terkecil akan menjadi root bridge;
Maka : Switch A will be selected as the Root Bridge.
If the network administrator would like switch B to become the
root bridge, they must set its priority to be less than 10 (<10).
• Secara default, Root ID sama dengan local Bridge ID pada semua
switch di dalam network.
• Dengan kata lain, semua switch menganggap dirinya sebagai
root bridge ketika pertama kali switch selesai melakukan boots.
22. CCNA3-22 Chapter 5-1
Root Bridge
• Switches mem-forward frame BPDU-nya, switches di
dalam broadcast domain read the root ID information dari
BPDU frame.
• Jika root ID dari BPDU yang diterima lower than the root
ID switch penerima, switch penerima akan meng-updates
root ID tersebut dengan mengidentifikasi switch terdekat
tersebut sebagai root bridge.
• Selanjutnya switch akan mem-forwards new BPDU
frames with the lower root ID tadi ke switches
adjacent/tetangga lainnya.
• Akhirnya, switch yang memiliki lowest BID (Bridge ID
terkecil) paling terakhir akan dikenal sebagai Root Bridge
untuk spanning-tree instance.
23. CCNA3-23 Chapter 5-1
Best Path
• Setelah Root Bridge sudah dipilih, maka STA memulai
process pemilihan best paths ke Root Bridge dari semua
destinations yang ada didalam broadcast domain.
• Path information ditentukan melalui summing up the
individual port costs disepanjang path (egress) dari
destination ke root bridge.
• Default/Standart Port Costs yang ditetapkan oleh IEEE dan
didefenisikan berdasarkan kecepatan dari port adalah
sebagai berikut:
Link SpeedLink Speed CostCost
10Gbps 2
1Gbps 4
100Mbps 19
10Mbps 100
24. CCNA3-24 Chapter 5-1
Best Path
• You are not restricted to the defaults.
• Cost of a path can be manually configured to specific path
agar diterima oleh STA sebagai pilihan best path.
• Path Cost adalah the sum of all the egress port costs to the
root bridge.
• Path dengan lowest cost (cost terkecil) akan menjadi Perferred
Path dan yang lainnya akan di blocked
switch(config)#interface fa0/1
switch(config-if)#spanning-tree cost [value]
switch(config-if)#end
Value can be between: 1 ….. 200,000,000
• The ‘no’ form of the following command will return the cost to
its default value.
25. CCNA3-25 Chapter 5-1
Best Path
• Verifying the port and path cost (to the root bridge).
Port CostPort CostPort CostPort Cost
Path CostPath CostPath CostPath Cost
26. CCNA3-26 Chapter 5-1
BPDU Process
• Root Bridge Election Process:
S3 believes S2 is the root bridge.S3 believes S2 is the root bridge.
S1 still thinks it is the root bridge.S1 still thinks it is the root bridge.
S3 believes S2 is the root bridge.S3 believes S2 is the root bridge.
S1 still thinks it is the root bridge.S1 still thinks it is the root bridge.
27. CCNA3-27 Chapter 5-1
BPDU Process
• Root Bridge Election Process:
S2 and S1 both think that theyS2 and S1 both think that they
are the root bridge.are the root bridge.
S2 and S1 both think that theyS2 and S1 both think that they
are the root bridge.are the root bridge.
28. CCNA3-28 Chapter 5-1
BPDU Process
• Root Bridge Election Process:
S3 recognizes S1 as the root.S3 recognizes S1 as the root.
S2 recognizes S1 as the root.S2 recognizes S1 as the root.
S3 recognizes S1 as the root.S3 recognizes S1 as the root.
S2 recognizes S1 as the root.S2 recognizes S1 as the root.
29. CCNA3-29 Chapter 5-1
BPDU Process
• Root Bridge Election Process:
If the root bridge fails, the electionIf the root bridge fails, the election
process begins again.process begins again.
If the root bridge fails, the electionIf the root bridge fails, the election
process begins again.process begins again.
30. CCNA3-30 Chapter 5-1
Bridge ID
Early STP implementation – no VLANs.Early STP implementation – no VLANs.Early STP implementation – no VLANs.Early STP implementation – no VLANs.
Changed to include VLAN ID.Changed to include VLAN ID.Changed to include VLAN ID.Changed to include VLAN ID.
That means that there isThat means that there is a separatea separate
instance of STPinstance of STP for each VLAN.for each VLAN.
That means that there isThat means that there is a separatea separate
instance of STPinstance of STP for each VLAN.for each VLAN.
32. CCNA3-32 Chapter 5-1
Bridge ID
• Bridge Priority:
• Customizable value yang dapat dipergunakan untuk
mempengaruhi/merubah switch untuk menjadi root
bridge.
• Switch yang memiliki nilai lowest priority (priority terkecil),
berarti switch tersebut memiliki BID terkecil, dan akan
menjadi root bridge.
33. CCNA3-33 Chapter 5-1
Bridge ID
• Bridge Priority:
• Penambahan VLAN ID akan mengurangi bits yang
tersedia untuk bridge priority (dari 16bits menjadi 4bits).
• Oleh karena itu, nilai bridge priority ditetapkan dengan
kelipatan 4096.
• Nilai priority akan ditambahkan ke extended system value
(VLAN ID) sebagai identifikasi dari Priority dan VLAN
dalam BPDU frame.
++
34. CCNA3-34 Chapter 5-1
Bridge ID
• Bridge Priority:
• For example, pada sebuah switch:
• The default bridge priority = 32,769.
= (4096 * 8) + VLAN 1 ( native VLAN)
• If I assign bridge priority = 24,576 for VLAN 1
= (24,576) + VLAN 1 , the bridge priority becomes 24,577
• Maka switch ini akan menjadi root bridge.
++
35. CCNA3-35 Chapter 5-1
Bridge ID
• Bridge Priority:
Default Priority:Default Priority:
Election based onElection based on
MAC AddressMAC Address
Default Priority:Default Priority:
Election based onElection based on
MAC AddressMAC Address
36. CCNA3-36 Chapter 5-1
Bridge ID
• Bridge Priority:
Modified Priority:Modified Priority:
Election based onElection based on
priority.priority.
Modified Priority:Modified Priority:
Election based onElection based on
priority.priority.
37. CCNA3-37 Chapter 5-1
Configure and Verify the Bridge ID
• Two Methods to configure the Bridge ID:
• Metode 1:
Menetapkan bahwa switch memilikiMenetapkan bahwa switch memiliki
nilai prioritas terendahnilai prioritas terendah
Menetapkan bahwa switch memilikiMenetapkan bahwa switch memiliki
nilai prioritas terendahnilai prioritas terendah
Menetapkan switch akan menjadi root bridge jikaMenetapkan switch akan menjadi root bridge jika
primary switch fails.primary switch fails.
Menetapkan switch akan menjadi root bridge jikaMenetapkan switch akan menjadi root bridge jika
primary switch fails.primary switch fails.
38. CCNA3-38 Chapter 5-1
Configure and Verify the Bridge ID
• Two Methods to configure the Bridge ID:
• Metode 2:
VLAN ID NumberVLAN ID NumberVLAN ID NumberVLAN ID Number Priority valuePriority valuePriority valuePriority value
40. CCNA3-40 Chapter 5-1
Port Roles
• Root bridge akan dipilih oleh spanning-tree menjadi link utama.
• Location dari root bridge dalam network topology akan menentukan
bagaimana port roles dikalkulasikan.
• Root Port (exists on non-root bridges):
• Port switch yang best-path/terbaik untuk mem-forward traffic ke
root bridge.
• Hanya ada 1 root port per switch
• Designated Port (forward data frames):
• Port switch yang me-receives & mem-forwards frames ke arah
root bridge tujuan. Hanya ada 1 designated port per
segment/koneksi.
• Untuk switch root bridges, semua ports-nya adalah designated
ports
• Non-designated Port:
• Port switch yang diblocked oleh spanning tree, dan tidak akan
mem-forwarding data frames.
41. CCNA3-41 Chapter 5-1
Port Roles
• STA akan menentukan jenis dari port dari setiap port yang
terdapat pada switch.
• Untuk menentukan root port pada switch, yaitu:
• Switch akan membandingkan path costs pada semua
port switch yang berpartisipasi dalam spanning tree.
• Jika terdapat 2 port switch yang memiliki path cost yang
sama menuju root bridge, maka:
• Switch akan menggunakan customizable port priority
value, atau lowest port ID.
• Port ID adalah nomor dari connected port/nomor
port.
42. CCNA3-42 Chapter 5-1
Port Roles – Root Port
• For Example: Default Port Priority = 128Default Port Priority = 128Default Port Priority = 128Default Port Priority = 128
F0/1 Priority = 128,1F0/1 Priority = 128,1F0/1 Priority = 128,1F0/1 Priority = 128,1
43. CCNA3-43 Chapter 5-1
Port Roles – Root Port
• You can specify the root port:
• Configure Port Priority:
SW3(config)#interface fa0/23
SW3(config-if)#spanning-tree vlan 1 port-priority 32
• Priority values 0 - 240, in increments of 16.
• Default port priority value is 128.
• The lower the port priority value, the higher the
priority.