QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1716|回复: 3

请问如何永久性修改网卡的MAC地址?

[复制链接]
发表于 2006-4-30 19:46:10 | 显示全部楼层 |阅读模式
请问如何永久性修改网卡的MAC地址?是修改哪个文件?
 楼主| 发表于 2006-4-30 20:20:26 | 显示全部楼层
原来是这样,呵呵。问题解决了。

修改 /etc/network/interfaces
加一行 hwaddress ether ##:##:##:##:##:##
例如我的:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.16.51
netmask 255.255.255.0
gateway 192.168.16.1

hwaddress ether 00:00:39:9E:58:3C #add this line

auto dsl-provider
iface dsl-provider inet ppp
provider dsl-provider
# please do not modify the following line
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf

然后
# /etc/init.d/networking restart
临时地修改也可以这样
fconfig eth0 down
ifconfig eth0 hw ether XX XX XX XX XX XX
ifconfig eth0 up

ifconfig停了网卡,改地址,启动网卡~~OK~~
回复

使用道具 举报

发表于 2006-5-1 13:00:52 | 显示全部楼层
有时候不要随便更改硬件地址。
回复

使用道具 举报

 楼主| 发表于 2006-5-1 13:11:34 | 显示全部楼层
我这里拨号是认MAC地址的,这个只是操作系统的欺骗行为不会伤害到硬件。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-5-4 16:45 , Processed in 0.079981 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表