Policy Routing

Access from '3.133.145.168'
You are in US.
It is 08:53 JST now.


policy routing とは

 

50-cloud-init.yaml

network:
  ethernets:
    enp1s0:
      accept-ra: no
      dhcp4: no
      dhcp6: no
      addresses:
        - 2409:cafe:dead:feed::801/64
      gateway6: 2409:cafe:dead:feed::fffe

    enp2s0:
      accept-ra: no
      addresses:
        - 192.168.1.1/24
        - fd00:cafe::1/64
      routing-policy:
        - from: 192.168.1.0/128
          table: 136
      routes:
        - to: 219.117.250.208/29
          via: 192.168.1.254
          on-link: true
        - to: 192.168.16.0/24
          via: 192.168.1.254
          on-link: true
        - to: 3.4.5.6/32
          via: 192.168.1.254
          table: 136
          on-link: true
      nameservers:
        addresses:
          - fd00:cafe::fe
          - 192.168.1.1
        search:
          - ntools.net

  tunnels:
    ip6tnl1:
      mode: ipip6
      remote: 2404:8e00::feed:100
      local: 2409:cafe:dead:feed::801
      routes:
        - to: 0.0.0.0/0
          scope: link
  version: 2

if setting dhcp range 192.168.1.129, rule is available “table: 136”.