除了centos还有啥系统可以添加整个IP段的,不用一个个添加ip的那种,我现在装的cnetos7添加网卡里添加“NM_CONTROLLED=no”就重启不了 |
interfaces 文件 ,示例
复制代码 |
多个IP段怎么添加? |
用脚本加 |
有脚本吗? |
未测试,供参考 ================================================================ /etc/network/if-up.d/eth0
复制代码 /etc/network/if-down.d/eth0
复制代码 chmod +x /etc/network/if-up.d/eth0 ================================================================ IFACE is an internal variable for ifupdown (ifup and ifdown), could be used in the relevant configuration file /etc/network/interfaces (and on files from relevant directories). The variable IFACE expands to the name of the interface being processed currently by ifup or ifdown. IFACE 是 ifupdown(ifup 和 ifdown)的内部变量,可用于相关配置文件 /etc/network/interfaces(以及相关目录中的文件)。 变量 IFACE 扩展为 ifup 或 ifdown 当前正在处理的接口的名称。 |