添加网关
/sbin/route add -net 0.0.0.0/0 gw 10.168.102.1
查看信息
/etc/sysconfig/network-scripts/ifcfg-eth0
删除gateway配置
sed -i '/GATEWAY/d' /etc/sysconfig/network-scripts/ifcfg-eth0
查默认网关
for i in `cat *.ip`;do echo -n $i "--";ssh -p58422 $i "route -n|awk '{if($1=="0.0.0.0") print $2}'";done
/sbin/route add -net 0.0.0.0/0 gw 10.168.102.1
查看信息
/etc/sysconfig/network-scripts/ifcfg-eth0
删除gateway配置
sed -i '/GATEWAY/d' /etc/sysconfig/network-scripts/ifcfg-eth0
查默认网关
for i in `cat *.ip`;do echo -n $i "--";ssh -p58422 $i "route -n|awk '{if($1=="0.0.0.0") print $2}'";done