/etc/network
/etc/network 是 Debian 体系里“老一代网络配置”的地盘,主要给 ifupdown 用的,
和 netplan / systemd-networkd 是不同年代、不同体系的东西。
Examples
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.123.3/28
config_netfail off
is_hotplugged off
auto eth1
iface eth1 inet static
address 49.119.135.113/24
config_netfail off
is_hotplugged off
post-up route add default gw 49.119.135.1 || true
pre-down route del default gw 49.119.135.1 || true