debian 10 绑定 多IP ip配置
查看网卡
ip a
配置IP
vi /etc/network/interfaces
auto ${网卡名}
iface ${网卡名}
inet ${static}
address ${IP}
netmask ${netmask}
gateway ${gateway}
auto eth0
iface eth0
inet static
address 10.10.100.31
netmask 255.255.255.0
gateway 10.10.100.2
重启网卡
systemctl restart networking
绑定多iP
auto eth0:0 iface eth0:0 inet static address 192.168.1.3 netmask 255.255.255.0 auto eth0:1 iface eth0:1 inet static address 192.168.1.4 netmask 255.255.255.0