LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 690|回复: 1

请教一个网络配置问题

[复制链接]
发表于 2006-7-15 21:02:03 | 显示全部楼层 |阅读模式
我需要更改网卡物理地址才能上网(IP绑定)
所以我在/etc/init.d/rcS最后面加了设置mac地址的语句
如下
ifconfig eth0 down
ifconfig eth0 hw ether 00:A1:B0:03:1A:57
ifconfig eth0 up

这样mac地址一开机就更改了,但随之来了别一个问题
刚开机网络还是不能用,需要用network-admin重新设置一下默认网卡设备,每次都是
我机器上有无线网卡eth1,普通网卡eth0,modem ppp0

请教
怎么设置默认网卡设备?
我的方法是不是有问题?
有没有更好的办法?
发表于 2006-7-15 23:27:49 | 显示全部楼层
不用改 /etc/init.d/rcS 吧!

每次开机网络不能用,是不是你没写 /etc/network/interfaces
你要设置网卡硬件地址,也直接写道 interfaces 里好了。

$ man interfaces
注意 hwaddress 参数。
回复 支持 反对

使用道具 举报

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

本版积分规则

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