LinuxSir.cn,穿越时空的Linuxsir!

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

网关。DNS问题!

[复制链接]
发表于 2006-3-20 08:59:07 | 显示全部楼层 |阅读模式
改网关,配置ip,和修改dns的文件在那里!怎么修改!比如说我要修改我的电脑里面的网络配置为:
ip:10.21.30.211
子网码:255.255.255.0
网关:10.20.30.254
dns:202.103.44.5
要改成上面这样该怎么 改!改那里!
发表于 2006-3-20 09:06:52 | 显示全部楼层
vi /etc/network/interfaces

  1. # This file describes the network interfaces available on your system
  2. # and how to activate them. For more information, see interfaces(5).

  3. # The loopback network interface
  4. auto lo
  5. iface lo inet loopback

  6. # This is a list of hotpluggable network interfaces.
  7. # They will be activated automatically by the hotplug subsystem.
  8. mapping hotplug
  9.         script grep
  10.         map eth0

  11. # The primary network interface
  12. iface eth0 inet static
  13.         address 192.168.1.88
  14.         netmask 255.255.255.0
  15.         gateway 192.168.1.1
  16.         network 192.168.1.0
  17.         broadcast 192.168.1.255

  18. iface eth1 inet static
  19.         address 192.168.2.90
  20.         netmask 255.255.255.0
  21.         gateway 192.168.2.1
  22.         wireless-essid tsunami
  23.         wireless-key s:imanust

  24. auto eth0
  25. auto eth1
复制代码




Post by ppajiandan
改网关,配置ip,和修改dns的文件在那里!怎么修改!比如说我要修改我的电脑里面的网络配置为:
ip:10.21.30.211
子网码:255.255.255.0
网关:10.20.30.254
dns:202.103.44.5
要改成上面这样该怎么 改!改那里!
回复 支持 反对

使用道具 举报

发表于 2006-3-20 09:08:13 | 显示全部楼层
然后 /etc/init.d/networking stop  再 start 就行了
回复 支持 反对

使用道具 举报

发表于 2006-3-20 09:09:06 | 显示全部楼层
DNS:

vi /etc/resolv.conf

nameserver 202.103.44.5
回复 支持 反对

使用道具 举报

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

本版积分规则

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