Techerest

Cisco High Availability: Dual Router, HSRP, STP, EtherChannel และ OSPF

Cisco High Availability Design คือการออกแบบ Network ให้ไม่มีอุปกรณ์หรือเส้นทางเพียงจุดเดียว ที่สามารถทำให้ระบบทั้งหมดหยุดทำงาน โดยนำเทคโนโลยีหลายส่วน เช่น Dual Router, Dual Switch, HSRP, STP/RSTP, EtherChannel, OSPF และ IP SLA/Object Tracking มาทำงานร่วมกัน

หัวใจสำคัญของ High Availability ไม่ใช่เพียงการซื้ออุปกรณ์เพิ่มเป็นสองตัว แต่ต้องออกแบบ Redundancy ทุก Layer ที่สำคัญ และทดสอบว่าเมื่ออุปกรณ์ Link หรือเส้นทางใดล้มเหลว Traffic สามารถเปลี่ยนไปใช้ เส้นทางสำรองได้จริง

ภาค 1: พื้นฐาน High Availability

High Availability คืออะไร?

High Availability หรือ HA คือแนวคิดการออกแบบระบบ ให้สามารถให้บริการต่อไปได้ เมื่อ Component บางส่วน เกิดความเสียหาย

ตัวอย่าง Network ธรรมดา:

Internet
   |
   |
 Router
   |
   |
 Switch
   |
   |
 Users

ระบบนี้มีหลายจุด ที่หากเสียแล้ว ผู้ใช้งานทั้งหมดอาจได้รับผลกระทบ

เช่น:

Router Failure
     |
     v
Internet unavailable


Switch Failure
     |
     v
LAN unavailable


Single Uplink Failure
     |
     v
Connectivity unavailable

Single Point of Failure คืออะไร?

Single Point of Failure หรือ SPOF คือ Component เพียงจุดเดียว ที่เมื่อเสียแล้ว สามารถทำให้ Service ที่พึ่งพาจุดนั้นหยุดทำงาน

ตัวอย่าง:

PC
 |
SW1
 |
R1
 |
ISP

ใน Architecture นี้:

SW1 = SPOF

R1 = SPOF

SW1-R1 Link = SPOF

R1-ISP Link = SPOF

การออกแบบ High Availability จึงเริ่มจากคำถาม:

Where are the
Single Points of Failure?

ภาค 2: Dual Router + Dual Switch Architecture

ตัวอย่าง Enterprise High Availability

                         INTERNET
                         /      \
                        /        \
                      ISP1      ISP2
                       |          |
                       |          |
                      R1          R2
                       \          /
                        \        /
                    +----+------+----+
                    |                |
                   DS1==============DS2
                    ||                ||
                    ||                ||
                 +--++----------------++--+
                 |                        |
                AS1                      AS2
              /  |  \                  /  |  \
            PC  AP  IP Phone         PC  AP  Server

Architecture นี้มี Redundancy หลายระดับ:

  • Dual ISP / Upstream
  • Dual Router
  • Dual Distribution Switch
  • Redundant Uplink
  • Gateway Redundancy
  • Routing Redundancy
  • Layer 2 Redundancy

Redundancy แต่ละ Layer ใช้อะไร?

Layer / Function ปัญหา Technology
Physical Link สายหรือ Port เสีย Dual Link / EtherChannel
Layer 2 Switching Loop / Path Failure STP, RSTP, MST
Default Gateway Gateway Failure HSRP, VRRP, GLBP
Layer 3 Routing Route / Router Failure OSPF, EIGRP, BGP ตาม Design
Remote Path Interface Up แต่ปลายทางเสีย IP SLA + Object Tracking
WAN ISP Failure Dual ISP / Dynamic Routing / Tracking
Power Power Supply Failure Dual PSU / UPS / Power Feed

ภาค 3: Dual Switch Design

ทำไมต้องมี Dual Switch?

ถ้ามี Switch ตัวเดียว:

Users
  |
  |
 SW1
  |
  |
Gateway

SW1 เป็น Single Point of Failure

เมื่อเพิ่ม Switch สำรอง:

              DS1
             /   \
            /     \
          AS1     AS2
            \     /
             \   /
              DS2

จะมี Alternate Path เมื่อ Switch หรือ Link บางส่วนเสีย

การต่อ Link ซ้ำโดยไม่มี Loop Prevention อาจสร้าง Layer 2 Loop ดังนั้น Redundant Layer 2 ต้องออกแบบร่วมกับ STP/RSTP/MST หรือ Architecture ที่เหมาะสม

STP/RSTP กับ High Availability

STP ไม่ได้มีหน้าที่ สร้าง Bandwidth เพิ่มโดยตรง แต่ช่วยป้องกัน Layer 2 Loop ใน Topology ที่มี Redundant Paths

ตัวอย่าง:

       DS1
      /   \
     /     \
   AS1-----DS2

หากทุก Link Forward โดยไม่มี Loop Prevention:

Broadcast
   |
   v
Loop
   |
   v
Duplicate Frames
   |
   v
MAC Instability
   |
   v
Broadcast Storm

STP จึงเลือก Logical Loop-Free Topology

Primary Path
    |
Forwarding

Redundant Path
    |
Alternate / Blocking
    |
Ready for failure

RSTP ช่วยเรื่อง Convergence

RSTP ถูกออกแบบให้ Converge เร็วกว่า Traditional STP ในหลายสถานการณ์

Primary Link Failure
       |
       v
Topology Change
       |
       v
Alternate Path
       |
       v
Forwarding

แต่เวลา Convergence จริง ขึ้นอยู่กับ Topology, Port Role, Link Type, Configuration และ Platform

ภาค 4: EtherChannel กับ Link Redundancy

EtherChannel ช่วยอะไร?

แทนที่จะใช้ Physical Link เพียงเส้นเดียว:

SW1 -------- SW2
     1 Link

สามารถรวมหลาย Link:

SW1 ======== SW2
     Po1

Gi1/0/1 ----\
Gi1/0/2 -----+-- Port-Channel 1
Gi1/0/3 ----/

EtherChannel ช่วย:

  • เพิ่ม Aggregate Capacity
  • เพิ่ม Link Redundancy
  • ทำให้ STP มอง Bundle เป็น Logical Link

หาก Member Link หนึ่งเสีย:

Po1

Link 1 = UP
Link 2 = DOWN
Link 3 = UP

Port-Channel
still operational
if minimum requirements remain satisfied
Traffic Distribution ของ EtherChannel ขึ้นอยู่กับ Hash Algorithm ดังนั้น Flow เดียวไม่ได้หมายความว่า จะรวม Bandwidth ของทุก Physical Link เข้าด้วยกันโดยตรง

ตัวอย่าง LACP EtherChannel

interface range GigabitEthernet1/0/1-2
 description UPLINK-TO-DS2
 switchport mode trunk
 channel-group 1 mode active

interface Port-channel1
 description LACP-TO-DS2
 switchport mode trunk

ตรวจ:

show etherchannel summary
show interfaces port-channel 1

ภาค 5: HSRP กับ Gateway Redundancy

ทำไม Dual Layer 3 Switch ยังต้องใช้ HSRP?

สมมติ:

DS1
VLAN10 = 192.168.10.2

DS2
VLAN10 = 192.168.10.3

Client ต้องมี Default Gateway หนึ่งค่า

จึงสร้าง:

Virtual IP
192.168.10.1

Architecture:

              Virtual Gateway
              192.168.10.1
                    |
          +---------+---------+
          |                   |
         DS1                 DS2
    192.168.10.2       192.168.10.3
       ACTIVE             STANDBY
          \                   /
           \                 /
               Access SW
                   |
                  PC

ตัวอย่าง HSRP บน SVI

DS1:

interface Vlan10
 description USERS-GATEWAY
 ip address 192.168.10.2 255.255.255.0
 standby version 2
 standby 10 ip 192.168.10.1
 standby 10 priority 110
 standby 10 preempt

DS2:

interface Vlan10
 description USERS-GATEWAY
 ip address 192.168.10.3 255.255.255.0
 standby version 2
 standby 10 ip 192.168.10.1
 standby 10 priority 100
 standby 10 preempt

Client:

IP Address:
192.168.10.100

Default Gateway:
192.168.10.1

ภาค 6: STP Root และ HSRP Active Alignment

ทำไม STP และ HSRP ควรออกแบบร่วมกัน?

สมมติ VLAN 10:

STP Root = DS1
HSRP Active = DS1

Traffic:

Client
  |
  v
Access Switch
  |
  v
DS1
  |
  v
Gateway / Routing

Layer 2 Forwarding Path และ Layer 3 Gateway อยู่ในทิศทางเดียวกัน

แต่ถ้า:

STP Root = DS1
HSRP Active = DS2

Traffic บาง Topology อาจต้องวิ่งข้าม Inter-Switch Link โดยไม่จำเป็น

Client
  |
  v
AS1
  |
  v
DS1
  |
  | Inter-Switch
  v
DS2
  |
  v
HSRP Active Gateway
หลักคิดคือวิเคราะห์ Forwarding Path จริง ไม่ใช่เพียงกำหนด STP Root และ HSRP Active แยกจากกันโดยไม่ดู Traffic Flow

กระจาย VLAN ระหว่าง DS1 และ DS2

ตัวอย่าง:

VLAN STP Root HSRP Active
VLAN 10 USERS DS1 DS1
VLAN 20 SALES DS2 DS2
VLAN 30 SERVER DS1 DS1
VLAN 40 VOICE DS2 DS2

แนวคิด:

DS1
Active VLAN 10
Active VLAN 30


DS2
Active VLAN 20
Active VLAN 40

ช่วยให้ทั้งสอง Distribution Switch มีบทบาทในระบบ แทนการปล่อยอุปกรณ์หนึ่งตัว เป็น Standby สำหรับทุก VLAN

ภาค 7: OSPF กับ Routing Redundancy

Gateway Redundancy ไม่เท่ากับ Routing Redundancy

HSRP ดูแล:

Client
   |
   v
Default Gateway

OSPF ดูแล:

Gateway
   |
   v
Remote Networks

ตัวอย่าง:

                    CORE
                   /    \
                  /      \
                DS1      DS2
                 \        /
                  \      /
                   Access
                     |
                   Client

DS1 และ DS2 สามารถใช้ OSPF แลกเปลี่ยน Route กับ Core

Client
   |
HSRP VIP
   |
   +---- DS1 ---- OSPF ---- Core
   |
   +---- DS2 ---- OSPF ---- Core

ใช้ Routed Uplink ลด Layer 2 Failure Domain

ในหลาย Enterprise Design Uplink ระหว่าง Distribution/Core สามารถออกแบบเป็น Layer 3 Routed Link แทนการขยาย VLAN ขึ้นไปทุกจุด

Access Layer
     |
     | Layer 2
     v
Distribution
     |
     | Layer 3
     v
Core

ข้อดีเชิง Architecture:

  • ลด Layer 2 Failure Domain
  • ใช้ Dynamic Routing Convergence
  • ลดการพึ่ง STP ในส่วน Routed Core
  • ทำ Routing Path ได้ชัดเจนขึ้น

ตัวอย่าง OSPF Uplink

DS1:

ip routing

interface GigabitEthernet1/0/24
 no switchport
 ip address 10.0.1.2 255.255.255.252
 no shutdown

router ospf 1
 router-id 1.1.1.1
 network 10.0.1.0 0.0.0.3 area 0
 network 192.168.10.0 0.0.0.255 area 0

Configuration จริงควรพิจารณา Passive Interface, Route Summarization, Authentication, Area Design และ Routing Policy ตามระบบ

ภาค 8: IP SLA และ Object Tracking

ทำไม HSRP ต้องรู้สถานะ Upstream?

สมมติ:

Client
  |
  v
DS1
HSRP ACTIVE
  |
  v
R1
  |
  X
Internet Failure

หาก DS1 ยัง Up และ HSRP ยังทำงาน Client อาจยังส่ง Traffic ไป DS1 ทั้งที่ Upstream Path ใช้งานไม่ได้

จึงสามารถใช้:

IP SLA
   |
   v
Object Tracking
   |
   v
HSRP Priority

ตัวอย่าง IP SLA

ip sla 10
 icmp-echo 203.0.113.1 source-interface GigabitEthernet1/0/24
 frequency 5

ip sla schedule 10 life forever start-time now

สร้าง Track:

track 10 ip sla 10 reachability

เชื่อมกับ HSRP:

interface Vlan10
 standby 10 track 10 decrement 30

Flow:

Upstream failure
      |
      v
IP SLA fails
      |
      v
Track 10 DOWN
      |
      v
HSRP Priority decreases
      |
      v
Peer becomes preferred
      |
      v
Gateway Failover

ภาค 9: วิเคราะห์ Failure Scenario

High Availability ต้องทดสอบมากกว่า Power Off

การทดสอบเพียงปิด Router หนึ่งตัวไม่เพียงพอ

ควรจำลอง Failure หลายระดับ

Scenario 1 — Access Uplink เสียหนึ่งเส้น

AS1
 |\
 | \
 X  \
 |   \
DS1  DS2

ระบบควร:

Detect link failure
      |
      v
Use alternate path
      |
      v
Restore connectivity

Scenario 2 — EtherChannel Member เสีย

Po1

Gi1/0/1 = UP
Gi1/0/2 = DOWN
Gi1/0/3 = UP

Port-Channel อาจยังทำงานต่อได้ หากเงื่อนไขของ Bundle ยังครบตาม Configuration

Scenario 3 — Distribution Switch DS1 เสีย

DS1
 X

 |
 +---- HSRP failover
 |
 +---- STP reconvergence
 |
 +---- Routing convergence
 |
 v
DS2 handles traffic

นี่เป็น Failure ที่เกี่ยวข้องหลาย Protocol พร้อมกัน

Scenario 4 — DS1 Up แต่ Upstream Path เสีย

Client
  |
DS1 ACTIVE
  |
  X
Upstream

ต้องพิจารณา:

IP SLA
+
Object Tracking
+
HSRP Priority

Scenario 5 — OSPF Neighbor Down

DS1 ---- X ---- CORE1
 |
 +------------ CORE2

OSPF ควรคำนวณ เส้นทางที่ยังใช้งานได้ ตาม Topology และ Metric

Scenario 6 — Inter-Switch Link เสีย

DS1 ===== X ===== DS2

ต้องวิเคราะห์ว่า:

  • VLAN Connectivity ยังครบหรือไม่?
  • HSRP Peers ยังเห็นกันหรือไม่?
  • STP Topology เปลี่ยนอย่างไร?
  • มี Split-Brain หรือ Active/Active ที่ไม่ตั้งใจหรือไม่?
  • Traffic ยังมี Return Path หรือไม่?

ภาค 10: Cisco High Availability Lab

Topology สำหรับ Lab

                       CORE1
                       /   \
                      /     \
                    DS1=====DS2
                    / \     / \
                   /   \   /   \
                 AS1    \ /    AS2
                  |      X      |
                  |     / \     |
                 PC1   /   \   PC2


VLAN 10 USERS
192.168.10.0/24

VLAN 20 SALES
192.168.20.0/24


VLAN 10 VIP
192.168.10.1

VLAN 20 VIP
192.168.20.1

Step 1 — สร้าง VLAN

DS1 / DS2:

vlan 10
 name USERS

vlan 20
 name SALES

Step 2 — Configure Trunk

interface GigabitEthernet1/0/10
 description ACCESS-UPLINK
 switchport mode trunk
 switchport trunk allowed vlan 10,20

Step 3 — Inter-Switch EtherChannel

DS1:

interface range GigabitEthernet1/0/1-2
 description LACP-TO-DS2
 switchport mode trunk
 switchport trunk allowed vlan 10,20
 channel-group 1 mode active

interface Port-channel1
 description DS1-DS2
 switchport mode trunk
 switchport trunk allowed vlan 10,20

DS2 ต้อง Configure ให้ Parameter ของ EtherChannel สอดคล้องกัน

Step 4 — กำหนด STP Root

DS1:

spanning-tree vlan 10 root primary
spanning-tree vlan 20 root secondary

DS2:

spanning-tree vlan 20 root primary
spanning-tree vlan 10 root secondary

ผลที่ต้องการ:

VLAN 10
STP Root = DS1


VLAN 20
STP Root = DS2

Step 5 — Configure SVI

DS1:

ip routing

interface Vlan10
 ip address 192.168.10.2 255.255.255.0
 no shutdown

interface Vlan20
 ip address 192.168.20.2 255.255.255.0
 no shutdown

DS2:

ip routing

interface Vlan10
 ip address 192.168.10.3 255.255.255.0
 no shutdown

interface Vlan20
 ip address 192.168.20.3 255.255.255.0
 no shutdown

Step 6 — Configure HSRP VLAN 10

DS1:

interface Vlan10
 standby version 2
 standby 10 ip 192.168.10.1
 standby 10 priority 110
 standby 10 preempt

DS2:

interface Vlan10
 standby version 2
 standby 10 ip 192.168.10.1
 standby 10 priority 100
 standby 10 preempt

Step 7 — Configure HSRP VLAN 20

DS1:

interface Vlan20
 standby version 2
 standby 20 ip 192.168.20.1
 standby 20 priority 100
 standby 20 preempt

DS2:

interface Vlan20
 standby version 2
 standby 20 ip 192.168.20.1
 standby 20 priority 110
 standby 20 preempt

ผล:

VLAN 10
STP Root   = DS1
HSRP Active = DS1


VLAN 20
STP Root   = DS2
HSRP Active = DS2

Step 8 — Configure Routed Uplink

DS1:

interface GigabitEthernet1/0/24
 description ROUTED-UPLINK-CORE
 no switchport
 ip address 10.0.1.2 255.255.255.252
 no shutdown

DS2:

interface GigabitEthernet1/0/24
 description ROUTED-UPLINK-CORE
 no switchport
 ip address 10.0.2.2 255.255.255.252
 no shutdown

Step 9 — Configure OSPF

DS1:

router ospf 1
 router-id 1.1.1.1
 passive-interface default
 no passive-interface GigabitEthernet1/0/24
 network 10.0.1.0 0.0.0.3 area 0
 network 192.168.10.0 0.0.0.255 area 0
 network 192.168.20.0 0.0.0.255 area 0

DS2:

router ospf 1
 router-id 2.2.2.2
 passive-interface default
 no passive-interface GigabitEthernet1/0/24
 network 10.0.2.0 0.0.0.3 area 0
 network 192.168.10.0 0.0.0.255 area 0
 network 192.168.20.0 0.0.0.255 area 0
Topology นี้ใช้สำหรับอธิบายแนวคิด Lab จริงต้องมี Core Router/Layer 3 Device ที่กำหนด Address และ OSPF ให้ตรงกับ Routed Uplink ของ DS1/DS2

Step 10 — เพิ่ม IP SLA และ Tracking

ตัวอย่างบน DS1:

ip sla 10
 icmp-echo 10.0.1.1 source-interface GigabitEthernet1/0/24
 frequency 5

ip sla schedule 10 life forever start-time now

track 10 ip sla 10 reachability

ผูกกับ VLAN 10 HSRP:

interface Vlan10
 standby 10 track 10 decrement 30

เมื่อ Upstream Path Down:

DS1 VLAN10 Priority

110
 |
 | Track DOWN
 | -30
 v
80


DS2 VLAN10 Priority
100


DS2 becomes preferred
HSRP Active

ภาค 11: Verification Commands

ตรวจ VLAN

show vlan brief

ตรวจ Trunk

show interfaces trunk

ตรวจ EtherChannel

show etherchannel summary

ตรวจ STP

show spanning-tree
show spanning-tree vlan 10
show spanning-tree vlan 20

ตรวจ HSRP

show standby
show standby brief

ตรวจ IP SLA

show ip sla configuration
show ip sla statistics

ตรวจ Object Tracking

show track

ตรวจ OSPF Neighbor

show ip ospf neighbor

ตรวจ OSPF Interface

show ip ospf interface brief

ตรวจ Routing Table

show ip route
show ip route ospf

ตรวจ Interface

show ip interface brief
show interfaces status

ภาค 12: High Availability Troubleshooting

Troubleshooting Workflow

Physical
   |
   v
Interface
   |
   v
EtherChannel
   |
   v
VLAN
   |
   v
Trunk
   |
   v
STP
   |
   v
SVI
   |
   v
HSRP
   |
   v
IP SLA / Tracking
   |
   v
Routing
   |
   v
OSPF
   |
   v
Upstream
   |
   v
Return Path
   |
   v
Application

ปัญหา 1 — HSRP Active อยู่ผิด Switch

ตรวจ:

show standby brief

จากนั้นตรวจ:

Priority
Preempt
Tracking
Track State

อย่าตรวจ Priority เพียงอย่างเดียว เพราะ Tracking สามารถลด Effective Priority ได้

ปัญหา 2 — STP Root ไม่ตรงกับ Design

show spanning-tree vlan 10
show spanning-tree vlan 20

ตรวจ:

Root ID
Bridge ID
Root Port
Port Role
Port State

ปัญหา 3 — EtherChannel ไม่ Bundle

show etherchannel summary

ตรวจ Parameter เช่น:

Speed
Duplex
Trunk Mode
Allowed VLAN
Native VLAN
Channel Protocol
Channel Mode

Requirement ที่แน่นอน ขึ้นอยู่กับ Platform และ EtherChannel Configuration

ปัญหา 4 — HSRP Failover สำเร็จ แต่ Remote Network ใช้ไม่ได้

แสดงว่า First-Hop Redundancy อาจทำงานแล้ว แต่ Routing/Data Plane ของ Backup Path ยังมีปัญหา

Client
 |
HSRP VIP
 |
DS2 Active
 |
 X
No upstream route

ตรวจ:

show ip route
show ip ospf neighbor
show ip ospf interface brief

ปัญหา 5 — OSPF Neighbor ไม่ Full

ตรวจ:

IP / Subnet
Area
Hello / Dead parameters
Authentication
MTU
Network Type
ACL / Firewall
Interface State

และจำไว้ว่าบาง OSPF Network Type สถานะ 2-WAY ระหว่าง DROTHER สามารถเป็นพฤติกรรมปกติได้

ปัญหา 6 — Failover แล้ว Traffic วิ่งอ้อม

ตรวจความสัมพันธ์:

STP Root
   |
   +
HSRP Active
   |
   +
OSPF Best Path

ทั้งสามระบบสามารถทำงานถูกต้อง ตาม Protocol ของตัวเอง แต่รวมกันแล้วเกิด Suboptimal Path ได้ หาก Design ไม่ Align

ปัญหา 7 — Failover ไปมา

ตรวจ:

IP SLA Target
Probe Frequency
Packet Loss
Tracking Delay
HSRP Preempt
Preempt Delay
OSPF Stability
Physical Errors

อย่าแก้โดยลด Timer ให้เร็วขึ้นทันที เพราะอาจทำให้ระบบ ไวต่อ Transient Failure มากกว่าเดิม

ภาค 13: High Availability Test Matrix

ควรทดสอบอะไรบ้าง?

Test Expected Result
Access Uplink 1 Down Traffic ใช้ Alternate Path
EtherChannel Member Down Port-Channel ยังทำงานถ้า Bundle ยังมี Member เพียงพอ
DS1 Down DS2 รับ Gateway/Path ตาม Design
DS2 Down DS1 รองรับ VLAN ที่เกี่ยวข้องตาม Design
HSRP Active Down Standby เปลี่ยนเป็น Active
Primary Routed Uplink Down Routing Converges ไป Alternate Path
Remote Path Failure IP SLA/Tracking Detect ตาม Design
OSPF Neighbor Down Alternate Route ถูกเลือกหากมี
Inter-Switch Link Down ตรวจ VLAN, HSRP, STP และ Reachability
Primary Path Recovery Failback เกิดตาม Policy โดยไม่ Flap

วัด Convergence Time

อย่าทดสอบเพียง:

Failover works?
YES / NO

ควรวัด:

Failure occurs
      |
      v
Failure detected
      |
      v
Protocol converges
      |
      v
Traffic restored

Total outage
= ? milliseconds / seconds

Application แต่ละประเภท ทนต่อ Outage ได้ไม่เท่ากัน

เช่น:

Web Browsing
Voice
Video
Database
Trading
Real-Time Control

จึงต้องกำหนด Recovery Requirement ตาม Business/Application ไม่ใช่เพียง Network Protocol

ภาค 14: High Availability Best Practices

1. Redundancy ต้องไม่แชร์ Failure เดียวกัน

ตัวอย่างที่ดูเหมือน Redundant:

R1 ----\
        +---- Same Power Strip
R2 ----/

หาก Power Strip เสีย Router ทั้งสองตัวดับพร้อมกัน

ดังนั้น Physical Design ต้องพิจารณา:

Power
Rack
Cable Path
Switch
Router
ISP
Building Entry
Upstream Provider

2. Backup Path ต้องถูกทดสอบจริง

Backup ที่ไม่เคยทดสอบ อาจไม่ใช่ Backup ที่ใช้งานได้จริง

Backup Router
     |
     +-- Routing correct?
     |
     +-- NAT correct?
     |
     +-- Firewall correct?
     |
     +-- DNS reachable?
     |
     +-- Application works?

3. อย่าออกแบบ Protocol แยกจากกัน

ต้องดูร่วมกัน:

STP
 +
EtherChannel
 +
HSRP
 +
IP SLA
 +
OSPF
 +
Firewall
 +
NAT

แต่ละ Protocol อาจทำงานถูกต้อง แต่ Architecture รวม อาจยังผิดได้

4. ระวัง Asymmetric Routing

ตัวอย่าง:

Forward Path

Client -> DS1 -> R1 -> Internet


Return Path

Internet -> R2 -> DS2 -> Client

Asymmetric Routing ไม่ได้ผิดเสมอไป แต่สามารถสร้างปัญหา กับ Stateful Firewall, NAT หรือ Security Policy บางประเภท

5. ทำ Network Diagram

ควรระบุอย่างน้อย:

Device Name

Interface

IP Address

Subnet

VLAN

Trunk

EtherChannel

STP Root

HSRP Active/Standby

OSPF Neighbor

IP SLA Target

WAN / ISP

Expected Failover Path

6. เก็บ Baseline ก่อนเกิดปัญหา

เช่น:

show spanning-tree

show etherchannel summary

show standby brief

show ip ospf neighbor

show ip route

show track

show ip sla statistics

เมื่อเกิด Incident จะสามารถเปรียบเทียบ Current State กับ Normal State ได้ง่ายขึ้น

ภาค 15: คำถามที่พบบ่อย

High Availability คือการมีอุปกรณ์สองตัวใช่หรือไม่?

ไม่ใช่เพียงเท่านั้น อุปกรณ์สองตัวอาจยังใช้ Power, Uplink, ISP หรือ Physical Path เดียวกัน จนยังมี Single Point of Failure อยู่

มี Dual Switch แล้วต้องใช้ STP หรือไม่?

หาก Layer 2 Topology มี Redundant Path ที่สามารถเกิด Loop ต้องมีกลไก Loop Prevention ที่เหมาะสม เช่น STP/RSTP/MST หรือ Architecture อื่น ที่ออกแบบมารองรับ

EtherChannel แทน STP ได้หรือไม่?

ไม่ได้ทั้งหมด EtherChannel รวมหลาย Physical Link เป็น Logical Link ส่วน STP จัดการ Loop ระหว่าง Layer 2 Paths ใน Topology

HSRP แทน OSPF ได้หรือไม่?

ไม่ได้ HSRP ทำ Gateway Redundancy ส่วน OSPF ทำ Dynamic Routing ระหว่าง Layer 3 Devices

OSPF แล้วจำเป็นต้องมี HSRP หรือไม่?

สำหรับ End Host ทั่วไป OSPF ไม่ได้ทำให้ Client มี Virtual Default Gateway โดยอัตโนมัติ จึงเป็นคนละหน้าที่กับ FHRP

HSRP Active ควรอยู่ Switch เดียวกับ STP Root หรือไม่?

ใน Campus Design หลายแบบ การ Align STP Root กับ Active Gateway ช่วยลดเส้นทาง Layer 2 ที่ไม่จำเป็น แต่ต้องวิเคราะห์ Topology และ Data Path จริง ของระบบนั้น

สามารถให้ DS1 และ DS2 เป็น Active พร้อมกันได้หรือไม่?

สามารถกระจายบทบาท ระหว่างหลาย VLAN ได้ เช่น DS1 เป็น Active สำหรับ VLAN 10 ขณะที่ DS2 เป็น Active สำหรับ VLAN 20

IP SLA จำเป็นในทุก HA Design หรือไม่?

ไม่จำเป็นทุกระบบ ควรใช้เมื่อ Requirement ต้องตรวจสถานะที่ Local Interface หรือ Routing Protocol เพียงอย่างเดียว ไม่สามารถสะท้อน Failure ที่ต้องการตรวจได้

ทำไม Failover สำเร็จแต่ Application ยังหลุด?

Network Path Recovery ไม่ได้หมายความว่า Application Session State จะถูก Preserve เสมอ โดยเฉพาะระบบที่เกี่ยวข้องกับ:

NAT

Stateful Firewall

TCP Session

VPN

Application State

High Availability เท่ากับ Disaster Recovery หรือไม่?

ไม่ใช่แนวคิดเดียวกัน High Availability เน้นลด Service Interruption จาก Failure ภายใน Architecture ขณะที่ Disaster Recovery ครอบคลุมการกู้ระบบ จากเหตุการณ์รุนแรงกว่า และอาจเกี่ยวข้องกับ Site, Data, Application และ Business Continuity

จะรู้ได้อย่างไรว่า Network มี HA จริง?

ต้องทดสอบ Failure Scenario อย่างเป็นระบบ ไม่ใช่ดูจาก Diagram เพียงอย่างเดียว

Fail component
      |
      v
Observe detection
      |
      v
Observe convergence
      |
      v
Measure outage
      |
      v
Verify application
      |
      v
Restore component
      |
      v
Verify stable failback

บทสรุป

Cisco High Availability Design คือการนำ Redundancy หลาย Layer มาทำงานร่วมกัน เพื่อป้องกันไม่ให้ Failure เพียงจุดเดียว ทำให้ Network ทั้งระบบหยุดทำงาน

Physical Redundancy
        |
        v
EtherChannel
        |
        v
STP / RSTP
        |
        v
HSRP
        |
        v
IP SLA / Tracking
        |
        v
OSPF
        |
        v
WAN Redundancy

แต่ละ Technology แก้ปัญหาคนละส่วน:

STP
Prevents Layer 2 loops


EtherChannel
Link aggregation + redundancy


HSRP
Default gateway redundancy


IP SLA
Active path monitoring


Object Tracking
Operational state tracking


OSPF
Dynamic route convergence

Architecture ที่สมบูรณ์ จึงไม่ควรดูเพียงว่า “มีอุปกรณ์สำรองหรือไม่” แต่ต้องตรวจว่า เมื่อ Failure เกิดขึ้นจริง:

Can failure be detected?

Can traffic move?

How fast does it converge?

Does the backup path work?

Does the application survive?

Can the network recover cleanly?

เมื่อเข้าใจจุดนี้ เราจะเชื่อมความรู้ก่อนหน้าได้ครบ:

VLAN
  |
Trunk
  |
STP / RSTP
  |
EtherChannel
  |
Inter-VLAN Routing
  |
OSPF
  |
HSRP
  |
IP SLA
  |
Object Tracking
  |
High Availability Architecture

นี่เป็นพื้นฐานสำคัญ ก่อนนำทุกหัวข้อกลับมาสร้าง Cisco Enterprise Lab ในภาคปฏิบัติภายหลัง

บทความถัดไป: IPv6 Fundamentals: IPv6 Address, Prefix, Global Unicast, Link-Local, SLAAC, NDP และ ICMPv6

บทถัดไปจะเริ่ม IPv6 Series ตั้งแต่โครงสร้าง Address และ Prefix ไปจนถึง Dual Stack, IPv6 Routing, OSPFv3 และ IPv6 Security ก่อนเดินหน้าสู่ Network Management, VPN, QoS และ Network Automation ตาม Roadmap ของ Techerest

Share this
Facebook Share X
TECHEREST COMMUNITY

Share your thoughts here

Join the conversation and share your perspective on this article.

Comments will load when you reach this section.