在命令行下,给网卡加第二个IP地址且重启有效
cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth0:1
vi ifcfg-eth0:1
然后改动相应的地方,一般有两个
1. device=eth0-------->device=eth0:1
2. IP地址
重启一般就可以了
cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth0:1
vi ifcfg-eth0:1
然后改动相应的地方,一般有两个
1. device=eth0-------->device=eth0:1
2. IP地址
重启一般就可以了