分类: LINUX
2013-01-21 22:25:51
临时修改RHEL系统网卡MAC地址
[root@HN-CSS-PCMS network-scripts]# cat /etc/init.d/add_mac
ifconfig eth0 down
ifconfig eth0 hw ether 00:18:82:B3:76:8E
ifconfig eth0 up
永久修改RHEL系统网卡MAC地址
见论坛
#!/bin/sh
dir=`pwd`
cp $dir/add_mac /etc/init.d/
chmod 755 /etc/init.d/add_mac
mv /usr/cvfs/config/license.dat /usr/cvfs/config/license.dat.old
cp $dir/license.dat /usr/cvfs/config/ -fr
echo wq|ex -c "g/HOSTNAME/d" /etc/sysconfig/network
echo "HOSTNAME=FJ-IPTV-FZ-LBDD" >>/etc/sysconfig/network
ln -s /etc/init.d/add_mac /etc/rc3.d/S11add_mac
ln -s /etc/init.d/add_mac /etc/rc5.d/S11add_mac
#reboot