给网卡配置10个临时ip地址,但是不配置192.168.17.15这个ip

给网卡配置10个临时ip地址,但是不配置192.168.17.15这个ip

#!/bin/bash
for i in `seq 10 20`;do
        if [ $i -eq 15 ];then
                continue
        fi
        ifconfig eth0:$i 192.168.18.$i netmask 255.255.255.0 up   ##up可以换成$1,然后传入参数 up|down
done

 

posted @ 2016-04-29 14:39  唐胜伟  阅读(590)  评论(0编辑  收藏  举报