Declarative network configuration

Configure your router in YAML.

Interfaces, addresses, routes, DHCP, DNS and firewall policy in one configuration. Review a plan, apply changes and inspect the running router.

router.yamlAn interface and an address
apiVersion: routerd.net/v1alpha1
kind: Router
metadata:
  name: example
spec:
  resources:
    - apiVersion: net.routerd.net/v1alpha1
      kind: Interface
      metadata:
        name: lan
      spec:
        ifname: ens18
        managed: true
        adminUp: true
    - apiVersion: net.routerd.net/v1alpha1
      kind: IPv4StaticAddress
      metadata:
        name: lan-address
      spec:
        interface: lan
        address: 192.0.2.1/24
Adapt the interface and address to your host before applying.

From configuration to operation

Choose a starting point, understand the resources, and check the result.

Inspect before applying.

Validate the YAML, review the planned changes and apply the complete configuration. Then check status and real connectivity. Use --replace only with a complete router configuration.

routerd validate --config router.yaml
routerctl plan -f router.yaml --replace
routerctl apply -f router.yaml --replace
routerctl get status

Source and project information