hbc02034534 发表于 2005-7-9 23:13:31

ifconfig命令的问题

我用
ifconfig Default gateway ipaddress primary nameserver DNSipaddress
不能设置网关和DNS,提示如下:
gateway: Host name lookup failure
ifconfig: `--help' gives usage information.
请问如何在终端下设置网关和DNS[

zhy2111314 发表于 2005-7-10 11:03:50

ifconfig eth0 ......

keven 发表于 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

keven 发表于 2005-7-13 13:38:49

如果想设置dns的话,你可以通过修改/etc/relosv.conf文件,把你的dns服务器的IP加入就可以了
页: [1]
查看完整版本: ifconfig命令的问题