我正在尝试将 IP 范围添加到eth0
Ubuntu 16.04 服务器上的接口。按照此解决方案我已将配置更改为:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 118.69.119.107
netmask 255.255.255.0
network 118.69.119.0
broadcast 118.69.119.255
gateway 118.69.119.254
up /sbin/ip address add 65.70.173.128/25 dev eth0
down /sbin/ip address delete 65.70.173.128 dev eth0
而我只有65.70.173.128
可用的 IP。这个问题是否与有关netmask
?
答案1
每个 IP 都需要一行up
(& )。对应于; 它不指定 IP 地址范围。down
/25
netmask 255.255.255.128