7 Commits

Author SHA1 Message Date
Spencer Smith
d57c97fdb6 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>
2020-06-17 17:15:07 -04:00
Niklas Wik
0824e500b2 feat: initial work for supporting vlans
Adding VLAN as option to machine config under devices.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

feat: Add addressing support for VLAN devices.

- Refactors static addressing to not be dependent on machine.Device

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

feat: Add addressing support for VLAN devices.

- Support of VLAN being the default network to use by removing need of addressing on master device.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: Fix the fmt of go files

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: refactor based on review comment.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: remove unused function

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

feat: initial work for supporting vlans

Adding VLAN as option to machine config under devices.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

feat: Add addressing support for VLAN devices.

- Refactors static addressing to not be dependent on machine.Device

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

feat: Add addressing support for VLAN devices.

- Support of VLAN being the default network to use by removing need of addressing on master device.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: Fix the fmt of go files

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: refactor based on review comment.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: fix test case function arguments

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: Add log for debugging address configuration failures

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: fix lint issues.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: fix the lint error.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

fix: Fix when addressing set with kernel options

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>
2020-03-23 17:08:39 -07:00
Brad Beam
119bf3e7bb feat(networkd): Add support for bonding
This includes a healthy refactor of the networkd code as well.
- Move netlink functionality to nic package
- Networkd facilitates the orchestration of the underlying interface configuration
- Networkd now stores the state of each interface configuration. This
  should allow us to expose this information via api in the future.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-11-26 20:08:31 -08:00
Andrey Smirnov
d3d011c8d2 chore: replace /* */ comments with // comments in license header
This fixes issues with `// +build` directives not being recognized in
source files.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-10-25 14:15:17 -07:00
Andrew Rynhard
4ae8186107 feat: add configurator interface
This moves from translating a config into an internal config
representation, to using an interface. The idea is that an interface
gives us stronger compile time checks, and will prevent us from having to copy
from on struct to another. As long as a concrete type implements the
Configurator interface, it can be used to provide instructions to Talos.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-04 07:53:09 -07:00
Seán C McCord
f7ad24ec4f feat: allow network interface to be ignored
Added a property to userdata to allow a network interface to be ignored,
such that Talos will perform no operations on it (including DHCP).

Also added kernel commandline parameter (talos.network.interface.ignore)
to specify a network interface should be ignored.

Also allows chaining of kernel cmdline parameter Contains() where the
parameter in question does not exist.

Fixes #1124

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-09-07 16:33:52 -07:00
Brad Beam
313c118ad0 refactor(networkd): Replace networkd with a standalone app
This is a major rewrite of our network subsystem.

- This changes networkd to run as a standalone app versus internal goroutine
- This changes out the netlink package with the more idiomatic netlink/rtnetlink
  packages
- This changes the initial network bootstrap/discovery from using a single
  interface to attempting to bring up all interfaces
- This moves us back on to the upstream dhcp library

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-21 13:24:51 -05:00