Chuyển đến nội dung chính

Lesson 14: WAN Load Balancing, QoS and Monitoring

Guide to configuring WAN load balancing, QoS, and traffic monitoring on VyOS, with a dual-WAN lab and NetFlow, SNMP, syslog, and Prometheus integration.

WAN Load Balancing, QoS and Monitoring

WAN Load Balancing, QoS and Monitoring on VyOS

Stable Internet connectivity, bandwidth optimization, and traffic visibility are essential operational requirements. VyOS provides strong capabilities for WAN load balancing, QoS, and monitoring.

WAN load balancing

set load-balancing wan rule 10 inbound-interface eth0
set load-balancing wan rule 10 interface eth1 weight 100
set load-balancing wan rule 10 interface eth2 weight 50
set load-balancing wan rule 10 failover
set load-balancing wan rule 10 exclude traffic source address 192.168.1.0/24
set load-balancing wan interface-health eth1 test 10 type ping target 8.8.8.8
set load-balancing wan interface-health eth2 test 10 type ping target 1.1.1.1

QoS: traffic shaping and prioritization

set qos policy shaper SHAPER bandwidth 100mbit
set qos policy shaper SHAPER default bandwidth 80mbit
set qos policy shaper SHAPER class 10 match ip destination address 192.168.2.0/24
set qos policy shaper SHAPER class 10 bandwidth 20mbit
set interfaces ethernet eth0 qos policy shaper SHAPER

Prioritize VoIP and gaming traffic using CAKE or HTB.

NetFlow/sFlow, SNMP, Syslog

set system flow-accounting interface eth0
set system flow-accounting netflow server 192.168.10.10 port 2055
set service snmp community public authorization ro
set service snmp listen-address 0.0.0.0
set system syslog host 192.168.10.20 facility all level info
set system syslog host 192.168.10.20 transport tls

Prometheus monitoring integration

VyOS can export metrics through SNMP or a containerized exporter.

Hands-on lab: dual-WAN load balancing + QoS

  1. Configure two WAN interfaces (eth1, eth2) with load-balancing rules.
  2. Set up interface-health ping checks.
  3. Configure QoS shaper on eth0 and prioritize required traffic.
  4. Test failover by disconnecting one WAN link.
  5. Verify NetFlow, SNMP, and syslog delivery to monitoring servers.
# Kiểm tra trạng thái load balancing
show load-balancing wan
# Kiểm tra QoS
show qos
# Kiểm tra flow-accounting
show system flow-accounting

Summary

This lesson helps you deploy WAN load balancing, QoS, and monitoring on VyOS, with practical dual-WAN operations and integration with NetFlow, SNMP, syslog, and Prometheus for professional network operations.