Ubuntu.Server_13上单网卡多个动、静态IP的配置方法

 [转]  Ubuntu Server V13.x 支持多IP,主网卡自动 DHCP,且该网卡带多个静态配置的附属IP地址 (“/etc/network/interfaces”)

# 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 eth0
iface lo inet loopback

iface eth0 inet dhcp

#iface eth0 inet static
#address 192.168.8.251
#netmask 255.255.255.0
#gateway 192.168.8.253

auto eth0:0
iface eth0:0 inet static
address 192.168.0.251
netmask 255.255.255.0

auto eth0:1
iface eth0:1 inet static
address 192.168.1.251
netmask 255.255.255.0

auto eth0:2
iface eth0:2 inet static
address 192.168.8.251
netmask 255.255.255.0

你可能感兴趣的:(实用类)