对Ubuntu和Debian系统,您需要根据镜像版本修改对应的配置文件。
对Ubuntu 14.04、Ubuntu 16.04及Debian,操作步骤如下:
1、打开网卡配置文件。
vi /etc/network/interfaces
2、在网卡配置文件中添加辅助弹性网卡的信息,然后保存并关闭配置文件。
添加网卡信息的示例如下:
auto eth0
iface eth0 inet dhcp
auto eth1 # 表示新配置的网卡接口。
iface eth1 inet dhcp
如果无法识别到其他网卡,可以在vim /etc/udev/rules.d/70-persistent-net.rules文件里面添加任意一张网卡信息,保存后重启机器
SUBSYSTEM=="net",ACTION=="add",DRIVERS=="?*",ATTR{address}=="00:0c:29:dc:dd:ad",ATTR{type}=="1" ,KERNEL=="eth*",NAME="eth1"
3、重启网络服务。
Ubuntu 16.04以前版本(例如Ubuntu 14.04):
service networking restart