Ubuntu 20.04でネットプランを使用して静的ルートを追加
以下を検討
https://takumicloud.jp/blog/2015/11/30/nw/
Ubuntu 20.04でネットプランを使用して静的ルートを追加&ついでにWifiついか
大注意
The problem was that systemd-networkd was trying to set the routes before the network was up, which was failing. The fix is on-link: True
on the routes:
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: yes
routing-policy:
- from: 192.168.1.160
table: 129
routes:
- to: 204.8.230.0/24
via: 192.168.1.1
table: 129
on-link: True
- to: 192.168.1.0/24
via: 192.168.1.1
table: 129
on-link: True
- to: 0.0.0.0/0
via: 192.168.1.1
table: 129
on-link: True