免费注册 查看新帖 |

Chinaunix

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

在哪个文件中配置MAC地址 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-08 10:32 |只看该作者 |倒序浏览
我用的是SUSE 10
每次开机以后就发现MAC不正确,需要重新配置(校园网)。
我看书上说是配置网卡文件:/etc/sysconfig/networks/ifcfg-eth0,但是我的network目录下面的文件是这些:
if-down.d/
if-up.d/
providers/
scripts/
config
dhcp
ifcfg-eth-id-00:e0:4c:ed:46:2d
ifcfg-lo
ifcfg.template
ifroute-lo
routes
routes.YaST2save
wireless
在ifcfg-eth-id-00:e0:4c:ed:46:2d里面的确有IP相关信息,但是没有MAC。
要把MAC信息写入哪里才能保证重启后不丢失呢?

论坛徽章:
0
2 [报告]
发表于 2006-03-08 10:43 |只看该作者
ifconfig -a 看一下 eth0 的配置,注意那個 HWAddr 項目,那個 mac address 會是檔案名稱之一。比方為 00:48:54:5a:11:22:33,那檔案名稱為 ifcfg-eth-id-00:48:54:5a:11:22:33

==

论坛徽章:
0
3 [报告]
发表于 2006-03-08 10:54 |只看该作者

回复 2楼 kenduest 的帖子

localhost:~ # ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:E0:4C:ED:46:2D
          inet addr:59.64.12.128  Bcast:59.64.12.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:4cff:feed:462d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:38214 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8041 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8967289 (8.5 Mb)  TX bytes:1192542 (1.1 Mb)
          Interrupt:11

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:297 errors:0 dropped:0 overruns:0 frame:0
          TX packets:297 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:23270 (22.7 Kb)  TX bytes:23270 (22.7 Kb)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

使用ifconfig -a 后的结果列在上面
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP