我一直在寻找在/ etc / network / interfaces(在debian中)这样的接口,并且网关在子网之外:
iface eth0 inet static
address 10.100.10.99
netmask 255.255.255.0
gateway 10.100.0.1
但是“ ifup --verbose eth0”仅给我以下错误消息:
ifconfig eth0 10.100.10.99 netmask 255.255.255.0
route add default gw 10.100.0.1 eth0
SIOCADDRT: No such process
Failed to bring up eth0
当然,将网络掩码更改为255.255.0.0也可以。