Debian 9 - 附加 IP

Chr*_*phe 2 debian failover ip

我有一台装有 Debian 9.2 的服务器。(Soyoustart)

我想添加 2 个额外的 IP 地址。

以这种方式添加它们是否正确?

在文件“/etc/systemd/network/50-default.network”中,这些行:

[Address]
Address=22.33.44.55/32 #for the IP1
Label=failover1 # optional
Address=66.77.88.99/32 #for the IP2
Label=failover2 # optional
Run Code Online (Sandbox Code Playgroud)

然后重新启动系统。

谢谢你。

Kei*_*utt 5

总体而言,这是按照https://docs.ovh.com/gb/en/dedicated/network-ipaliasing/#debian-9-ubuntu-17-fedora-26-and- 中最近更新的说明进行操作的正确方法 arch-linux 因为文档说要备份,然后/etc/systemd/network/50-default.network使用以下内容进行编辑:

[Address]
Address=22.33.44.55/32
Label=failover1 # Optional
Run Code Online (Sandbox Code Playgroud)

但它指出不需要重新启动,因为您可以发出systemctl restart systemd-networkd并且您很高兴......

编辑: 添加更多故障转移需要在其自己的[Address]部分中声明每个 IP ,如下例所示: [Address] Address=22.33.44.55/32 Label=failover1 # 可选

[Address]
Address=23.34.45.56/32
Label=failover2 # Optional
.
.
.
[Address]
Address=99.98.76.54/32
Label=failover-n # Optional
Run Code Online (Sandbox Code Playgroud)

问题systemctl restart systemd-networkd和瞧。