免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2768 | 回复: 3
打印 上一主题 下一主题

[求助]关于网卡的mac地址设置,出现问题,请教! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-11 10:36 |只看该作者 |倒序浏览
最近装好了ubuntu,感觉非常好,但是网络设置出了问题,无法安装更多软件,请大家帮忙看下,谢谢!
我是在学校里面的,在win下设置好ip以及网卡mac之后就可以上内网,上外网需要通过亿邮客户端用账号来登录
现在ubuntu下面ip,dns,网关,子网掩码都设置的和win完全一样了,就差mac的设置

在论坛以及google中搜索,发现mac和以下两个文件有关:
/etc/iftab
/sys/class/net/eth0/address               
首先,我改了iftab,关闭网络链接,重启后文件确定修改,但是在-首选项-硬件信息-中看到网卡的mac依然没有变化
而后开始更改address文件,更改权限后用gedit打开是空的,加入mac地址后保存不成功

接着用vi,打开后提示:
E325: ATTENTION
Found a swap file by the name "/var/tmp/address.swp"
          owned by: magicgogo   dated: Wed Jul 11 00:04:54 2007
         file name: /sys/class/net/eth1/address
          modified: YES
         user name: magicgogo   host name: ubuntu
        process ID: 5866
While opening file "/sys/class/net/eth1/address"
             dated: Wed Jul 11 18:07:52 2007
      NEWER than swap file!

(1) Another program may be editing the same file.
    If this is the case, be careful not to end up with two
    different instances of the same file when making changes.
    Quit, or continue with caution.

(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /sys/class/net/eth1/address"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/var/tmp/address.swp"
    to avoid this message.
"/sys/class/net/eth1/address" 1 line, 18 characters
Press ENTER or type command to continue

回车后继续,更改后提示:
"/sys/class/net/eth1/address"
"/sys/class/net/eth1/address" E667: Fsync failed
WARNING: Original file may be lost or damaged
don't quit the editor until the file is successfully written!
Press ENTER or type command to continue



请朋友们解答下,感激!

论坛徽章:
0
2 [报告]
发表于 2007-07-11 11:45 |只看该作者
可以用ifconfig临时配置一下看看的,具体参数man一下

论坛徽章:
0
3 [报告]
发表于 2007-07-11 22:37 |只看该作者
谢谢楼上了设置好啦~

论坛徽章:
0
4 [报告]
发表于 2007-07-16 16:47 |只看该作者
试试这个 ifconfig eth1 hw ether "xx:xx:xx:xx:xx:xx"
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP