自己看吧

sudo vi /etc/udev/rules.d/70-persistent-net.rules

# This is a sample udev rules file that demonstrates how to get udev to

# set the name of IPoIB interfaces to whatever you wish.  There is a

# 16 character limit on network device names though, so don't go too nuts

#

# Important items to note: ATTR{type}=="32" is IPoIB interfaces, and the

# ATTR{address} match must start with ?* and only reference the last 8

# bytes of the address or else the address might not match on any given

# start of the IPoIB stack

#

# Note: as of rhel7, udev is case sensitive on the address field match

# and all addresses need to be in lower case.

#

# ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=="?*00:02:c9:03:00:31:78:f2", NAME="mlx4_ib3"

ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="1", ATTR{address}=="00:0c:29:07:fb:fc", KERNEL=="eth*", NAME="eth0"

ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="2", ATTR{address}=="00:0c:29:07:fb:06", KERNEL=="eth*", NAME="eth1"

-------------------------------------------------------------------------------------------------------

root@ubuntu:~$ dmesg |grep eth1

[    2.835672] e1000 0000:02:03.0 eth1: (PCI:66MHz:32-bit) 00:0c:29:07:fb:06

[    2.836585] e1000 0000:02:03.0 eth1: Intel(R) PRO/1000 Network Connection

root@ubuntu:~$ dmesg |grep eth2

root@ubuntu:~$ dmesg |grep eth0

[    2.350733] e1000 0000:02:00.0 eth0: (PCI:66MHz:32-bit) 00:0c:29:07:fb:fc

[    2.351584] e1000 0000:02:00.0 eth0: Intel(R) PRO/1000 Network Connection

[   10.551877] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

-----------------------------------------------------------------------------

sudo vi /etc/network/interfaces

sudo ifconfig eth1 up

=================================================

Ubuntu server 14.04 LTS  升级 16.04 LTS 

sudo apt-get update && apt-get upgrade

 

sudo apt-get install update-manager-core

sudo vi /etc/update-manager/release-upgrades

prompt=lts

防止远程断开,安装screen工具

sudo apt-get install screen

$screen

sudo do-release-upgrade 

###System upgrade is complete.

升级后,删除:sudo rm -rf /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist

=======================================================

manroot@ubuntu:~$ cat /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

iface lo inet loopback

# The primary network interface

auto eth0

iface eth0 inet static

address 192.168.1.120

gateway 192.168.1.1 

netmask 255.255.255.0

network 192.168.1.0

broadcast 192.168.1.255

auto eth1

iface eth1 inet dhcp

Restart required 

To finish the upgrade, a restart is required. 

If you select 'y' the system will be restarted.

###

sudo reboot

cat /etc/issue

====================================

#ip link 发现网卡名称改变:

sudo vi /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="biosdevname=0"

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

重新生成GRUB配置并更新内核参数。

运行命令:sudo grub-mkconfig -o /boot/grub/grub.cfg

sudo reboot