Chinaunix首页 | 论坛 | 博客
  • 博客访问: 663171
  • 博文数量: 111
  • 博客积分: 5010
  • 博客等级: 大校
  • 技术积分: 1461
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-08 14:40
文章分类

全部博文(111)

文章存档

2010年(10)

2009年(70)

2008年(31)

我的朋友

分类: LINUX

2009-10-14 20:25:00

debian中设置IP

Debian 503版本。

vhost:/# cd /etc/network
vhost:/etc/network# vi interface

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

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
       address 203.171.237.26
        netmask 255.255.255.224
        network 203.171.237.0
        broadcast 203.171.237.31
        gateway 203.171.237.1
auto eth0:0
iface eth0:0 inet static
        address 192.168.0.101
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
# dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 202.102.224.68
        dns-search vpsbbs.com


假如你要再加一个IP可以如下配置文件

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

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
       address 203.171.237.26
        netmask 255.255.255.224
        network 203.171.237.0
        broadcast 203.171.237.31
        gateway 203.171.237.1
auto eth0:0
iface eth0:0 inet static
        address 192.168.0.101
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
# dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 202.102.224.68
        dns-search vpsbbs.com



完毕后重新启动网络
#/etc/init.d/networking restart
阅读(1679) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~