三層交換機故障且短期無法更換(預算、採購流程、交貨期),如何以現有廢舊路由器快速恢復 VLAN 間路由?Router-on-a-Stick(單臂路由)是經典且低成本的應急方案。
條件:路由器乙太網介面支援 VLAN Trunking(ISL 或 802.1Q) 且速率匹配(快速乙太/千兆)。
encapsulation dot1Q vlan-id(或 isl)。! 假設 VLAN 10、20、30,Trunk 介面為 Fa0/0
interface fastethernet 0/0
no shutdown
interface fastethernet 0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
interface fastethernet 0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
interface fastethernet 0/0.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
interface gigabitethernet 1/0/24
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 10,20,30
| 指標 | 三層交換機(ASIC 硬體路由) | Router-on-a-Stick(軟體路由) |
|---|---|---|
| VLAN 間轉發效能 | 線速(百萬封包/秒級) | 受限於 CPU,通常 10-50 Mbps 級 |
| 延遲 | 微秒級 | 毫秒級 |
| 支援協議豐富度 | 完整動態路由、ACL、QoS | 視路由器 IOS 功能集而定 |
| 成本 | 高 | 極低(廢舊路由器即可) |
| 部署速度 | 需採購 | 分鐘級上線 |