LinuxSir.cn,穿越时空的Linuxsir!

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

求助:怎么重新配置网卡?

[复制链接]
发表于 2006-1-9 15:25:50 | 显示全部楼层 |阅读模式
我第一次安装的时候,探测网卡未知,就过去了,后来我又换了一块新网卡,想问大家具体怎么再配置一下网络?新手,望详细点,谢谢!
发表于 2006-1-9 15:53:40 | 显示全部楼层
修改/etc/network/interfaces
然后 /etc/init.d/networking restart
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-1-9 19:35:45 | 显示全部楼层
具体怎么修改啊?
回复 支持 反对

使用道具 举报

发表于 2006-1-10 10:21:50 | 显示全部楼层
dmesg|grep eth
看看启动时加载认出网卡没有?
如果有,比如是eth0
则修改/etc/network/interfaces如下:
# 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 eth1
# iface eth1 inet dhcp

auto eth0
iface eth0 inet static
        address 10.1.31.6 #你的IP地址
        netmask 255.255.255.0 #你的子网掩码
        network 10.1.31.0 #你的IP地址的网络地址
        broadcast 10.1.31.255 #广播地址
        gateway 10.1.31.254 #网关

如果你用dhcp动态获取的话,则
auto eth0
iface eth0 inet dhcp
就可以了。
然后,/etc/init.d/network restart就可以了。
回复 支持 反对

使用道具 举报

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

本版积分规则

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