码迷,mamicode.com
首页 > 系统相关 > 详细

旧文-ubuntu linux 8.04下修改mac地址-2008年12月17日 19:33

时间:2017-06-29 19:21:37      阅读:332      评论:0      收藏:0      [点我收藏+]

标签:ddr   sudo   实验   ubuntu   inux   address   oca   绑定   ifconf   

  因公司内IP与MAC绑定,且不能人人上网,只能通过更改MAC来上网。经搜索,有以下方法:
1,
直接编辑/etc/network/interfaces文件,在if ace eth0 inet static后面添加一行:
pre-up ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx(要改成的MAC)
2,
打开文件:/etc/iftab
修改内容:
eth0 mac 00:e0:4d:75:8e:50(改成你要的物理地址mac)
3,
先网卡“关闭” 
# ifconfig eth0 down
更换物理地址,把粗体部分更换为你要换的MAC地址: 
# ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF
启用eth0。 
 # ifconfig eth0 up
重启网络服务
sudo /etc/init.d/networking restart
该方法只能临时修改。
4,
编辑/etc/network/interfaces,找到与eth0有关的地方,修改到形如: 
allow-hotplug eth0
iface eth0 inet dhcp
#iface eth0 inet static
#   address 1.1.1.6
#   netmask 255.255.255.0
#   gateway 1.1.1.1
     hwaddress ether 00:AA:BB:CC:DD:EE
经实验,这个方法好像不行。
5,
修改/etc/rc.local文件
sudo /sbin/ifconfig eth0 down
sudo /sbin/ifconfig eth0 hw ether 00:14:2a:34:4e:43
sudo /sbin/ifconfig eth0 up


我只实验了第4,5个方法,4不行,5可以。

旧文-ubuntu linux 8.04下修改mac地址-2008年12月17日 19:33

标签:ddr   sudo   实验   ubuntu   inux   address   oca   绑定   ifconf   

原文地址:http://www.cnblogs.com/yushiyou/p/7095719.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!