Home

Layer 3 Design

2 Comments

Nah, kemaren kita bahas tentang Layer 2 Design, sekarang Layer 3-nya

Design layer 3 biasanya mencakup Oversubscription, Load Balancing Strategies, Routing Protocol Strategies, and First Hop Redudancy Protocol (FHRP) Consideration

Prerequisite learning this article: Routing Knowledge with CEF

==========================================

Oversubscription

Apa itu oversubscription? 1 link dipake rame2..

Ha?!? Begini…klo kita ngikutin prinsip Hierarchical Layer (Access, Distribution, dan Core), kita akan melihat 1 Access Switch dipake oleh 20 devices lebih, sedangkan dari Access Switch ke Distribution Switch hanya 1 link

Inilah yang dinamakan oversubscription…20:1 untuk Access-to-Distribution

Proportional Recommendation…for each 20 port on access layer, there is 1 port for access-to-distribution uplink (20:1)

And for each 4 port on distribution, there is 1 port for distribution-to-core links (4:1)

The problem is…if it JUST ONE LINK…congestion may occur

The solution? Increase bandwidth proportion…

How? EtherChannel

Use LACP for maximum flexibility (HotStandby and Min-Links)

  • HotStandby: LACP Feature that make some port as backup for main ports
  • Min-Links: LACP Feature that turn off the EtherChannel function if minimum link is not met to prevent congestion on remaining links (lets say…you configure 6 port as min-link, if there are only 5 remaining link that active, the LACP will be disabled)

=========================================

Load Balancing

Balik lagi ke bahasa Indonesia

Ada 2 tipe load balancing yang kita bisa pilih

  1. EtherChannel
  2. ECMP (Equal Cost Multipath)
  3. or Unequal (with EIGRP)

Wokeh man…EtherChannel gw tau, tapi klo ECMP apaan? Ya itu tuu…load balancing “gara2” routing protocol punya 2 jalan atau lebih ke destination dengan metric yang sama

Ooooo……

Bedanya:

  • Klo pake EtherChannel
    • Lo cuma butuh 1 adjacency dari point ke point (ga makan process)
    • Lo bisa free to choose mo pake routing protocol apa
    • Lo ga bisa bener2 ngontol path selection
    • Troubleshooting aga susah gara2 informasi yang terbatas (L2/L1 soalnya)
  • Klo pake ECMP (load balancing karena routing protocol)
    • Lo bisa ngontol path selection (maenin metric dan lain2)
    • Gampang troubleshooting (rich information, L3 banyak yg bisa di debug)
    • Harus pake routing protocol yang sama antar link,biar bisa load balancing
    • 1 adjacency per 1 link (lo mau 4 link buat load balancing = 4 adjacency)

Untuk Load Balancing via EtherChannel, 50:50 proportion is nearly impossible…pasti yang sering dipake adalah port yang pertama (karena limitasi hardware, that’s why lo ga bisa bener2 ngontrol path selection)

Untuk bisa “mendekati” proporsi 50:50 dalam EtherChannel, kita bisa melakukan hal2 sebagai berikut

  • Pake load balancing berdasarkan Layer 4 (Port)

    Contoh: dist1-6500(config)#port-channel load-balancing src-dst-port


  • pake lebih dari 2 port…4 atau 8 port untuk load balancing lebih merata

Cisco Recommendation: use Layer 3 only load balance in Core, use Layer 3 & 4 in Distribution Layer

Dan ada 1 lagi yang perlu dibahas….Load Balancing in CEF

Inget klo fitur CEF itu bikin cepet routing process, karena forwarding decision-nya di taro di FIB (forward information base)

FIB itu hanya nyimpen/maintain next-hop IP, ini yang jadi masalah, karena Load Balancing itu harus ada 2 exit/next-hop…klo 1 namanya ga load balancing dongsszz

Jadi maksud hati mau load balancing, tapi pas di trace…lewatnya 1 arah aja, palingan klo link nya mati baru pindah ke link yang lain

Biasanya ini terjadi klo kita deploy multilayer switch (line card nya bisa 2 atau lebih, jadi klo line card 1 memutuskan traffic harus lewat kanan…ya kanan semua, line card yang lain ga bisa ikut proses send traffic)

Contoh line card di Cisco 6500

Untuk itu kita harus pake Distributed CEF

The command in 6500 is:

=============================================

The Design

Always build Triangle Design

Use Passive Interface

Kenapa? Karena akan limit unnecessary peering, trus menjaga memory, overhead dan CPU requirement supaya ga naek (naek juga buat apa? Ga ada gunanya)

Contoh kita punya 2 Distribution Switch yang masing2 punya 3 link ke access layer, dimana masing2 link trunking 4 vlan…

Berarti total kita punya 12 adjcency yang…not necessary at all !!

Summarize at Distribution Layer

Because summaries limit query…core ga perlu tau/pusing tentang rute ke 10.1.1.0/24 network yang mati..karena distribution switch uda summarisasi ke 10.0.0.0/8 ke core

Tapi hati2, klo lo inget  terms “discontigous network” yang sampe2 EIGRP dan RIP pake “no auto-summary”

klo lo ga proper ngerancang IP addressing scheme, summarisasi aga sulit dilakukan bahkan bisa menyebabkan network lo rusak

EIGRP Design

Limit Query to Core by making all Edge Switch to EIGRP Stub

EIGRP Design

OSPF Design

OSPF Design

=============================================

First-Hop Redudancy (Protocol)

Klo lo ga ada Catalyst 6500, lo bisa pake FHRP (HSRP, VRRP, GLBP)

Tapi klo ada…dan redundant (alias ada 2)…USE THE VSS (Virtual Switching System)

There’s no need to FHRP…VSS is the man!!

But if you have to implement (the FHRP)

Make note of this:

FHRP active devices (not standby) must same like STP root bridge

Lo ga mau kan yang HSRP device yang aktif traffic-nya di blok gara2 STP?!?

Dan HSRP Preempt juga HARUS di tuning/modified delaynya

Buat apa? To make sure that preempt delay doesn’t come any faster than these:

  • Switch Boot/Reboot
  • 50 detik dari oren ke ijo klo ga pake portfast
  • STP Convergence
  • Routing Convergence

Why?? Lets look at this illustration below wkwk

Itulah sebabnya…biarkan device yang standby menjadi active untuk “sementara” biar networknya tetep stabil

And this feature can be achieved via “standby [hsrp group] priority [number] preempt delay [time in second]” command

Jadi klo kita bilang delay 300…artinya dia akan nunggu 5 menit baru “take over” the active role

Dibawah ini adalah screenshot dari Cisco ARCH (642-874) Student Guide untuk delay FHRP

Comparing VRRP, HSRP, dan GLBP

==============================================

References:

ARCH (642-874) Designing Cisco Service Network Architecture – Student Guide

http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SX/configuration/guide/channel.html#wp1047602

http://blog.codergenie.com/blog/post/2012/08/17/CEF-Load-Balancing.aspx

http://www.cisco.com/en/US/products/hw/modules/ps2033/prod_technical_reference09186a00800afeb7.html#wp16268

http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094a91.shtml

Layer 2 Design

4 Comments

Design Layer 2 hampir selalu membahas STP, Trunk, UDLD, EtherChannel, dan VSS

Prerequisite learning this article: Switching Knowledge

==============================

STP (Spanning Tree Protocol) in Network Design Perspective

USE ONLY WHEN YOU HAVE TO…

Klo ga perlu…jgn gunakan STP, STP bikin topologi makin komplek, semakin komplek berarti troubleshooting makin susah, semakin banyak pula makan resource Switch (dan resource kepala kita hahaha)

Plus….link yang diblok bener2 under-utilized, ga kirim/nerima frame apa2, kek jalan kosong ga pernah dipake…(kecuali punya banyak VLAN, “vlan A link X diblok dan vlan B link Y diblok) bener ga??

Kapan kita ENGGA gunain STP? Look at picture below:

Ketika kita konek ke Server local, STP bisa kita eliminasi.

kapan pake STP?

Ketika kita perlu konek ke WAN…uplink ke WAN harus ada backup, dengan menambahkan link backup…berarti memunculkan kemungkinan Broadcast Storm, klo ada broadcast storm…disitulah STP muncul, klo ada STP Muncul…artinya CPU-nya Switch harus bekerja ekstra lebih keras (selain harus ngurusin STP, dia kan juga harus ngurusin VLAN, mac-address, dan segala macam L2 forwarding lainnya)

Tapi kan bisa aja Server itu penting…masa ga perlu redundancy? That’s why the planning in project meeting is important my friend

In that meeting, we design which area that get the redundancy…which area is not…jangan semua area dikasi redundancy…proper planning and designing saves Cost (unless you’re very skillful sales executive…expert at “morotin duit client”)

Ada ga yang bisa gantiin STP? Ada

  • FlexLinks: “manual” backup…konsep flexlink itu bikin primary link dan backup link, backup link akan selalu inactive sampe primary link mati (versi manual dari STP)

How about the convergence? Slow…butuh beberapa detik untuk backup link jadi active

Wah ga cocok dong dengan Delay Sensitive Application? Emang…tapi FlexLink bisa digunakan klo lo males pergi ke site network…Cuma untuk ketik “no shutdown” ke sebuah link yang jadi backup hahaha (ada loh yang bikin link backup…BENER2 BACKUP….di shutdown, hahaha)

  • L2MP: Layer 2 Multi Path, designed with the IS-IS algorithm (which is capable of L2-L3 technology)

Imagine if Switch use L3 Routing Intelligence for L2 Path Decision instead of solely depends on L2 Technology like STP…that’s what L2MP capable of, now we can get rid of STP

Wow…keren dong,..device apa yang bisa? Nexus 5000 dan 7000

Hahaha…nanti kapan2 gw bahas tentang L2MP

Now back to STP (if you have to implement STP)

STP ada fitur “add-on”, Cisco bilang ini namanya STP Toolkit, apa aja isinya:

  • PortFast: bikin port diswitch langsung “ijo” ga pake “oren” dulu…
  • Loop Guard: bikin port diswitch detect link mati
  • Root Guard: biar Root Bridge nya ga ganti
  • BPDU Guard: bikin port itu ga mau nerima BPDU
  • Bridge Assurance
  • EtherChannel Guard
  • PVST Simulation

Gunanya apa? Untuk menjaga stabilitas L2 topology (lo ga pengen kan root bridge ganti2 tiap saat dan bikin network lo jadi kacau)

Wokeh…untuk yang pernah belajar STP…pasti uda ga asing dengan yang namanya PortFast, LoopGuard, RootGuard, dan BDPU Guard

But there’s 3 more things that foreign and new in our ears (eyes) right…which is bridge assurance, EtherChannel Guard, dan PVST Simulation

  • Bridge Assurance (BA) : enabled by default on Cat6500 Switch, klo biasanya switch kirim BPDU lewat normal port, dengan BA itu BPDU dikirim lewat semuanya (termasuk alternate/blocked port)

gunanya apa? Untuk jaga Root Bridge Stability, begitu Switch yang ada Bridge Assurance kirim BPDU trus ga ada reply, dia akan kasi tau ke switch lain (inconsistent port)

Biasanya kan klo pake “guard-guard yang lain” di switch, kirimnya klo ga di designated port, pasti di root port…dengan BA, BPDU juga dikirim lewat blocked port (buat jaga2 aja)

bro…gw kirim agen rahasia ke link blocked port gw, harusnya GA ADA jawaban, tapi sekarang malah ada BPDU Replay…Celaka inih, be careful with our STP Root Bridge, watch it closely…guard it” hahaha…James Bond/PASPAMPRES-nya versi STP nih

Note for BA:

  • Only in IOS 12.2(33)SXI and later
  • Both side must perform Bridge Assurance (ya iya la, ntar bingung switch sebelah “kok ada BPDU kirim2 kesini?!?”)
  • Works only on R-PVST+ and MST
  • Only on P2P link (jadi ga bisa ke Hub)
  • EtherChannel Guard: bertugas untuk jaga konsistensi EtherChannel, biasanya kan untuk bikin EtherChannel minimal 2 link di switch A dan 2 link di switch B

Dengan EtherChannel Guard, kita bisa detect (dari switch A) “wah, link switch B 1 port-nya ada yang ga perform EtherChannel nih, sedangkan port gw 2-2nya smoothly perform EtherChannel

State port-nya jadi “root-inconsistent state”

  • PVST Simulation: MST bisa inter-operability dengan R-PVST+, tau kenapa? Because of PVST Simulation

Gw ambil dari Cisco-nya langsung deh kenapa kita harus disable/enable PVST Simulation:

You may want to control the connection between MST and Rapid PVST+ to protect against accidentally connecting an MST-enabled port to a port enabled to run Rapid PVST+. Because Rapid PVST+ is the default STP mode, you may encounter many Rapid PVST+ connections

Jadi PVST simulation bisa kita matiin…hanya port2 tertentu/switch2 tertentu aja yang pake R-PVST bole ikut2an MST

Currently, in later Cisco Later appliances…all variants of STP supported are only PVST+, R-PVST+, and MST

Eh…itu BA, EtherGuard sama PVST Simulation bisa di switch 2900 series ga? Ato di 3750 gituh? Engga…bisanya di 6500 hahaha

*Note: untuk MST, tiap device beda2 untuk nampung MST Instance, contoh Nexus 5000 sanggup sampe 65 MST Instances dalam 1 region (switch2 dengan konfigurasi MST yang sama = 1 region)

*Note: Cisco merekomendasikan untuk pake MST klo mau konek ke switch dari vendor lain untuk ensure full interoperability

Kapan dan dimana kita implement those STP toolkits?

  • Loop Guard/Bridge Assurance: between Distribution Switches Links and uplink port on Access Switch ke distribution switch
  • RootGuard: on port Distribution Switch that face Access Switch (karena biasanya root bridge-nya di setting di Distribution Switch)
  • BPDU Guard/Root Guard: on port Access Switch that face End Devices

And don’t forget to implement Switch Security Features such as Port Security in area/switch/port that needs maximum security

==========================================

VLAN and Trunk

Always disable DTP (Dynamic Trunking Protocol)

Why? To prevent VLAN Hopping

Nah, karena DTP itu fitur default dari switch Cisco, klo tiba2 ada hacker nyolok kabel ke port yang lagi nganggur dan dia punya software yang bisa bikin port NIC dia seakan2 trunk…ARTINYA DIA DAPET AKSES KESEMUA VLAN (trunk secara default allow semua vlan)

Tinggal cari Native VLAN di network yang dia tempel…bungkus frame yang VLAN-nya mau diserang pake Native VLAN-ID tag (Double VLAN Tag) trus kirim…

Apa yang terjadi dengan frame yang ditempelin native vlan?!?…VLAN Tag itu dibuang dan dikirim ke tempat (switch) yang bersangkutan, guess what…masi ada VLAN Tag lagi didalemnya kan?!? (that’s why this trick called Double Tagging)

Nah, ditempat switch yang bersangkutan akan dibaca “the real” VLAN tag nya..di forward-lah ke tujuan…dapet de si hacker resource VLAN yang bersangkutan (That’s why this method is called VLAN HOPPING…loncat2)

Trus bagusnya apa DTP? Kenapa DTP diciptain? Salah satu alasan kenapa DTP diciptain adalah untuk detect mismatch configuration…klo DTP dimatiin, lo ga akan tau itu link sebelah trunk apa bukan, access apa bukan, apa jangan2 error lagi…

Klo perlu…Manual Pruning, jadi lo set VLAN2 mana aja yang bole lewat trunk A, trunk B, dll

Trus klo VLAN-nya banyak gimana? untuk jaga konsistensi nomor dan penamaan VLAN aja uda repot?!?

That’s why VLAN Trunking Protocol alias VTP is created

But be careful, REVISION NUMBER…this little thing can make or break your network in instant

Note when implementing VTP:

  • Always use transparent mode first before plug the device into your network
  • Check the Revision Number (using transparent mode will reset revision counter number to Zero)
  • Use VTP Pruning (save your as* a big time when implementing VLAN Pruning)

==================================

UDLD (UniDirectional Link Detection)

Fitur ini dibikin karena adanya kasus pada Fiber Connection, biasanya kan dalam 1 kabel fiber ada 2 “mini kabel”, 1 buat transfer (Tx) dan 1 lagi buat receive (Rx)

Nah, kasusnya kek dibawah ini…

SwA kirim lewat Tx…diterima di SwB Rx, begitu SwB mau reply…ga bisa (mungkin kabel Tx didalemnya putus)

SwA akan mikir “ini BPDU yang gw kirim diterima kok…ga ditolak..tapi kenapa ga ada respons ya?!

Fitur STP lain yang namanya Loop Guard ga bisa detect problem dengan kasus seperti ini, dia taunya…”begitu gw kirim BPDU ga diterima…gw langsung mark jadi inconsistent

Lagian dari “kacamata” upper layer (L3 keatas)…ini link masi dinyatakan hidup, gara2 “buktinya gw bisa ngirim tuh” behavior

Dengan UDLD, SwA akan melakukan 8x percobaan untuk kirim BPDU untuk memutuskan ini link error

8x Kelamaan? Aggressive mode…begitu fail…SHUT!! Err-disable state

Recommendation: Always Enable UDLD…Globally

Note for implementing UDLD:

  • When enabling UDLD globally, Copper Ethernet is excepted (karena dianggep ini ke komputer port, ga pake fiber2an, klo mau ya setting lagi sendiri…tapi jarang sih Ethernet “kena” problem UDLD, biasanya pake LoopGuard uda cukup)
  • Both side must configure UDLD, otherwise the port goes to err-disable state

Conclusion: klo MPLS layer 2/3 (2.5), UDLD itu layer 1/2 (1.5)

=======================================

EtherChannel

Up to 8 ports per EtherChannel group

  • Use PAgP for connecting Cisco Devices
  • Use LACP for mixed vendor (Personally, I choose this because of the feature that I’ll explain below)
  • Alternatively, use manual EtherChannel: On/On
  • The Port Group cannot be used for P-VLAN
  • The Port Group cannot be used for SPAN (it can for R-SPAN)

Some vendors call EtherChannel with term of NIC Team, Bonding, MLT (Multi-Link Trunking), Link Aggregation…but essentially…it all the same

FEC = FastEtherChannel (with fastE link), GEC = Giga..with gigaEthernet, The powerful one is the MEC (MultiChassis EtherChannel)…in VSS

Biasanya klo EtherChannel itu bikin 2 link di 1 device jadi 1 port virtual, klo di MEC bikin 2 device dengan masing2 link jadi 1 device…dapet EtherChannel-nya…dapet pula “Device” Channel-nya

Eh…itu VSS bisa di 2900 ga? Ato di 3750? Jgn bilang ini juga ga bisa lagi T_T?

Cuma ada di switch Cat6500 wkwkwk

klo ga ada VSS, bisa pake yang lain ga? bisa pake Switch 3750, namanya StackWise

stackwise

StackWise meminimalisir kabel yang digunakan untuk redudancy (walaupun ga bisa MEC, ini semacam mini-VSS lah)

stackwise

VSS and StackWise

Nah, kenapa gw lebih suka LACP,…arena ada fitur namanya LACP Hot Standby

Apaan tu LACP Hot Standby?…lo bisa bikin 16 link jadi LACP, bedanya yang 8 link jadi active, 8 link satunya lagi standby…

Jadi ensure LACP bundling-nya tetep 8 port, ada satu mati, masih ada yang bisa gantiin

Plus berguna untuk routing protocol metric…

Here are the details, kita ambil contoh OSPF:

OSPF pake Cost kan?? Yup

Cost dari bandwidth kan?? Yup

Klo gw bundling 8 port 1 Gb berarti jadi 8 Gb kan?? Yup

Nah, klo itu bundling (etherChannel Group port) gw masukin OSPF berarti cost-nya kecil dong (8Gb)?? Hmm..bener juga

Klo gw punya desain seperti ini…kira2 mana yang dipilih? Jalur atas apa bawah?

Jalur atas, karena costnya lebih kecil, bandwidth-nya lebih gede gara2 EtherChannel bundling

Trus apa yang terjadi klo 1 port di etherchannel mati? Bisa lewat bawah kan? hmm…bisa, soalnya bandwidth-nya jadi kurang

Itulah gunanya LACP Hot Standby…ensure the packet still goes to EtherChannel port

==============================================

VSS…goes right here

==============================================

Common L2 Design

Tinggal pilih…mo pake STP…berarti ada yang di blok

Ato mo diakalin…link antar Distribution Switch dijadiin L3 port (using no switchport command) yang hanya bisa dilakukan di multilayer switch (3550 series keatas)

ato…pake Nexus wkwkwk

==================================

Reference:

ARCH-Designing Cisco Network Service Architecture (642-874) Student Guide

Cisco Catalyst 6500 Switch STP Configuration Guide

Cisco Nexus 5000 MST Configuration Guide

UDLD on Greg Ferro (CCIE #6920) blog

EtherChannel on Rick Mur (CCIEx4 #21946) IPExpert blog

Older Entries