QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1511|回复: 3

ifconfig命令的问题

[复制链接]
发表于 2005-7-9 23:13:31 | 显示全部楼层 |阅读模式
我用
ifconfig Default gateway ipaddress primary nameserver DNSipaddress
不能设置网关和DNS,提示如下:
gateway: Host name lookup failure
ifconfig: `--help' gives usage information.
请问如何在终端下设置网关和DNS[
发表于 2005-7-10 11:03:50 | 显示全部楼层
ifconfig eth0 ......
回复

使用道具 举报

发表于 2005-7-13 13:25:07 | 显示全部楼层
ifconfig是用来设置网卡的IP和netmask的,如果你想设置网关的话,用route add default gw your gateway ip, 如果你加入更多的网关的话,例如你是a段的ip,想通过网关进入到C段PIP的网络,你就可以route add a段网络IP gw your gateway ip
回复

使用道具 举报

发表于 2005-7-13 13:38:49 | 显示全部楼层
如果想设置dns的话,你可以通过修改/etc/relosv.conf文件,把你的dns服务器的IP加入就可以了
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-9-30 12:19 , Processed in 0.045607 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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