centos和opensuse单网卡双ip配置

  1. centos单网卡双ip  
  2. cp -p /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0  
  3. 内容如下。eth0的ip是192.168.16.150网关是192.168.16.1  
  4. [root@localhost network-scripts]# cat ifcfg-eth0    
  5. DEVICE="eth0" 
  6. NM_CONTROLLED="yes" 
  7. ONBOOT="yes" 
  8. HWADDR=00:0C:29:73:7B:2A  
  9. TYPE=Ethernet 
  10. BOOTPROTO=none 
  11. IPADDR=192.168.16.150   eth0的ip
  12. PREFIX=24 
  13. GATEWAY=192.168.16.1  eth0的网关
  14. DNS1=114.114.144.144  
  15. DEFROU