1.单网卡配单IP(普遍)
vi /etc/network/interface
auto eth0
iface eth0 inet static
address IP
netmask 子网掩码
gateway 网关
2.单网卡双IP (情况较少,多用于区分服务或者安全隐藏)
vi /etc/network/interface
auto eth0:0
iface eth0:0 inet static
address IP
netmask 子网掩码
gateway 网关
auto eth0:1
iface eth0:1 inet static
address IP
netmask 子网掩码
gateway 网关
3.双网卡双IP(应用情况较多,一般为一个内网一个为外网)
auto eth0
iface eth0 inet static
address IP
netmask 子网掩码
gateway 网关
auto eth1
iface eth1 inet static
address IP
netmask 子网掩码
gateway 网关