#!/bin/bash

echo '---
dns-resolver:
  config:
    search:
    - example.net
    - example.org
    server:
    - 2001:db8:1::d1
    - 2001:db8:1::d2
    - 192.0.2.1
interfaces:
  - name: dummy1
    type: dummy
    state: up
    ipv4:
      address:
      - ip: 192.0.2.251
        prefix-length: 24
      dhcp: false
      enabled: true
    ipv6:
      address:
      - ip: 2001:db8:1::1
        prefix-length: 64
      dhcp: false
      enabled: true
      autoconf: false
routes:
  config:
  - destination: 0.0.0.0/0
    next-hop-address: 192.0.2.1
    next-hop-interface: dummy1
    table-id: 200
  - destination: ::/0
    next-hop-address: 2001:db8:1::3
    next-hop-interface: dummy1
    table-id: 200
route-rules:
  config:
    - ip-from: 192.0.2.251/32
      route-table: 200
    - ip-to: 192.0.2.251/32
      route-table: 200
    - ip-from: 2001:db8:1::1/128
      route-table: 200
    - ip-to: 2001:db8:1::1/128
      route-table: 200' | nmstatectl apply -

echo 'dns-resolver:
  config:
    options:
    - rotate
    - debug' | nmstatectl apply -

nmcli c modify dummy1 ipv6.dns-options rotate,debug
nmcli d reapply dummy1
