centos8批量加IP
需求:在centos8里为eno1网卡批量加192.168.99.3到192.168.99.100的IP地址,掩码是255.255.255.0
尝试:用nmcli批量加,如 for I in $(seq 3 100); do nmcli con mod eno1 +ipv4.addresses 192.168.99.${I}/24; done
之后重载配置内容 nmcli con up eno1
需求:在centos8里为eno1网卡批量加192.168.99.3到192.168.99.100的IP地址,掩码是255.255.255.0
尝试:用nmcli批量加,如 for I in $(seq 3 100); do nmcli con mod eno1 +ipv4.addresses 192.168.99.${I}/24; done
之后重载配置内容 nmcli con up eno1