Skip to content

Commit c2047d7

Browse files
authored
Merge pull request #2632 from nirs/route-metric
Prefer additional network over user network
2 parents 69bd4e7 + 8cfe857 commit c2047d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/cidata/cidata.TEMPLATE.d/network-config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ ethernets:
66
macaddress: '{{$nw.MACAddress}}'
77
dhcp4: true
88
set-name: {{$nw.Interface}}
9+
dhcp4-overrides:
10+
{{- if (eq $nw.Interface $.SlirpNICName) }}
11+
route-metric: 200
12+
{{- else }}
13+
route-metric: 100
14+
{{- end }}
915
{{- if and (eq $nw.Interface $.SlirpNICName) (gt (len $.DNSAddresses) 0) }}
1016
nameservers:
1117
addresses:

0 commit comments

Comments
 (0)