feat: allow ability to create dummy nics

This PR will introduce a new field to v1alpha1 configs that allows users
to set `dummy: true` when specifying interfaces. If present, we will
create a dummy interface with the CIDR information given. This is useful
for users that don't want to use loopback for things like ECMP (or want
more than one dummy interface).

The created dummy interface looked like this with `ip a`:

```
3: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN qlen 1000
    link/ether 66:4a:e3:5f:38:10 brd ff:ff:ff:ff:ff:ff
    inet 10.254.0.5/32 brd 10.254.0.5 scope global dummy0
       valid_lft forever preferred_lft forever
```

Will close #2186.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
This commit is contained in:
Spencer Smith
2020-06-16 15:53:13 -04:00
committed by Spencer Smith
parent 718fd28264
commit d57c97fdb6
6 changed files with 29 additions and 0 deletions

View File

@@ -737,6 +737,11 @@ The following DHCP options are supported:
`ignore` is used to exclude a specific interface from configuration.
This parameter is optional.
##### machine.network.interfaces.dummy
`dummy` is used to specify that this interface should be a virtual-only, dummy interface.
This parameter is optional.
##### machine.network.interfaces.routes
`routes` is used to specify static routes that may be necessary.