LinuxSir.cn,穿越时空的Linuxsir!

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

ifconfig命令的问题

[复制链接]
发表于 2005-7-9 23:40:53 | 显示全部楼层 |阅读模式
我用
ifconfig Default gateway ipaddress primary nameserver DNSipaddress
不能设置网关和DNS,提示如下:
gateway: Host name lookup failure
ifconfig: `--help' gives usage information.
请问如何在终端下设置网关和DNS[
发表于 2005-7-10 15:42:07 | 显示全部楼层
可以用ifconfig设置DNS server吗? (小声地讲,我没听说过... ...)
如果用配置文件的话,网络的设置在/etc/sysconfig/network-scripts/ifcfg-eth<n>, /etc/sysconfig/network;
DNS设置在/etc/resolv.conf.
(说的是Red Hat Linux, 其它的有些差别吧,但也可类推的)
回复 支持 反对

使用道具 举报

发表于 2005-7-11 10:50:18 | 显示全部楼层
Post by Harris025
我用
ifconfig Default gateway ipaddress primary nameserver DNSipaddress
不能设置网关和DNS,提示如下:
gateway: Host name lookup failure
ifconfig: `--help' gives usage information.
请问如何在终端下设置网关和DNS[
How about:

#route add default gw your-gateway-ipaddress
回复 支持 反对

使用道具 举报

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

本版积分规则

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