|
system |
发表于: 2001/11/15 05:14pm
|
| 是不是重新启动了? ipconfig设置的只是临时的,重起后就失效了 |
| |
|
三少爷 |
发表于: 2001/11/15 05:43pm
|
更改网络接口的IP地址: #ifconfig hme0 down #ifconfig hme0 211.101.149.233 netmask 255.255.255.0 up 首先,使用down命令参数把网络接口hme0的服务暂时停止,然后再用ifconfig命令给 接口分配新的IP地址和掩码,并启动网络接口服务 也可以通过改变文件/etc/hosts中的IP地址的值并重新启动系统来更改机器的IP地址。 /etc/hosts/: 211.101.149.11 sampdt 定义主机名在/etc/hostname.hme0及IP地址。 更改了网卡/增加了网卡,系统不能自动启动该接口服务,这时需要手动创建网口服务: #ifconfig hme0 plumb 即可以为接口le0创建网口服务 相应地,用ifconfig带unplumb参数可以停止服务并关闭网络
|
| |
|
Leon |
发表于: 2001/11/15 11:32pm
|
| 就是这样 |
| |
|
jie718 |
发表于: 2001/11/16 09:53am
|
also you can sys-unconfig to reset IP and Hostname, |
| |
|
angel |
发表于: 2001/11/16 03:23pm
|
| 实际上永远的UNIX上有详细的解释,呵呵 |
| |
|
Leon |
发表于: 2001/11/18 03:15pm
|
| 但是ip6的可不一样哦 |
| |
|
三少爷 |
发表于: 2001/11/19 06:36pm
|
| 请讲。。 |
| |
|
amiao |
发表于: 2001/11/20 10:14am
|
| 永远的UNIX是绝对好网站 |
| |
|
alanv |
发表于: 2001/11/20 10:14am
|
修改ip地址直接用vi来修改etc/hosts文件不行吗? 我是一致这么做的 |
| |
|
hoy |
发表于: 2002/01/31 04:03pm
|
对阿,我也是,直接改/etc/hosts的ip ,然后reboot ifconfig 改动的ip 重启后就没有了 |
| |
|
wuya |
发表于: 2002/01/31 04:25pm
|
[这个贴子最后由wuya在 2002/01/31 04:33pm 编辑]
hoy,我看错行了 |
| |
|
jack-124 |
发表于: 2002/01/31 04:26pm
|
| Ifconfig只是该系统正在运行的配置,而/etc/hosts是在系统启动的时候需要从其中加载配置的文件,所以用ifconfig改只是当时生效,而要重启动后还要生效就需要更改hosts文件/ |
| |
|
guofr |
发表于: 2002/01/31 05:32pm
|
| sys-unconfig,那有这个命令的详细说明,能介绍一下吗。 |
| |
|
purepig |
发表于: 2002/01/31 05:34pm
|
| 不用什么说明,自己试一下就知道了. 实在想知道,看man sys-unconfig |
| |
|
aying516 |
发表于: 2002/02/01 08:31am
|
# ifconfig hme0 inet 192.0.0.1 netmask 255.255.255.0 up # route add default gateway (如果需要的话) # vi /etc/hosts # vi /etc/netmasks # vi /etc/defaultrouter ok,不用重新启动 |
| |
|
Fusheng |
发表于: 2002/10/25 05:51am
|
| Hello there, If you want to perm change and IP, you need to change files: /etc/hosts /etc/hostname.interfacename depends on your network configuration, you might also need to change: /etc/defaultrouter /etc/netmasks Fusheng |
| |
|
|