SD-WAN Edge interface default route metric calculation
search cancel

SD-WAN Edge interface default route metric calculation

book

Article ID: 371621

calendar_today

Updated On:

Products

VMware VeloCloud SD-WAN VMware VeloCloud SD-WAN Edge Appliance VMware SD-WAN by VeloCloud

Issue/Introduction

When a gateway is configured/learned by DHCP or PPPOE, SD-WAN Edge will install a default route in Linux kernel route table with a specific metric. Customer can review the route table with command route -n. Sometimes the route table mess up if metric is calculated wrong and cause some unexpected behaviors.

Environment

All supported VMware by Broadcom SD-WAN Edge versions

Cause

N/A

Resolution

Below is the calculation of default route metric:

1. Different type of interface maps to different metric offset. Below is the mapping:

  • GE:2
  • INTERNET:2
  • SFP:30
  • CELL:50
  • USB:60
  • PPPOE interface depends on the interface name after "pppoe-". For example, pppoe-ge5 will be treated as ge5 to calculate the metric

2. Base metric is ID of the interface, for example, base metric of GE5 is 5,  base metric of GE3 is 3.

3. Default route metric is Interface Metric=base metric+metric offset

For example, GE3's interface metric is 3+2=5. SFP1's interface metric is 1+30=31. In case of virtual SD-WAN edge, it uses logical name instead of physical name. For example, physical interface eth3 is mapping to logical name GE5,   SD-WAN edge calculates the metric as GE5, so the metric of that interface is 5+2=7.

Regarding sub interface, the first sub interface metric is "sub-interface offset+(max subif)*(base metric)+1", for all subsequent sub-interfaces under same parent interface, the metric of each sub-interface increases by 1. The sub-interface ID in irrelevant in sub-interface metric calculation.

sub-interface offset is a fixed value 264.

max subif is different across releases:

  • Release 4.5/5.0/5.1=64
  • Release 5.2/5.4/6.0=132

 

For example, a SD-WAN edge running on 5.4, GE1 has 2 sub-interface, GE1:100 and GE1:105. The sub-interface metric of GE1:100 is 264+132*1+1=397, sub-interface metric of GE1:105 is 264+132*1+1+1=398.