0,环境
服务器: Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz 96核
网卡: 多网卡
1, 镜像下载
http://old-releases.ubuntu.com/releases/ubuntu-20.04.1-desktop-amd64.iso
2, 系统安装--具体步骤就不贴出来,网上很多资料
3,配置网络
sudo vim /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:version: 2renderer : networkdethernets:enp6s0f0:dhcp4 : falseaddresses : [192.168.1.45/24]gateway4 : 192.168.1.254nameservers:addresses : [114.114.114.114,8.8.8.8]optional : true
重启网络: 无效的话,重启一下服务器
sudo netplan applay
4, 问题
本机器原来安装是centos, 网卡名字叫做enp6s0f0, 但是安装了ubuntu之后网卡名字变了, 可以通过如下方式来进行处理:
ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens9f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000link/ether 58:c7:ac:c8:8b:5c brd ff:ff:ff:ff:ff:ff
3: ens9f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000link/ether 58:c7:ac:c8:8b:5d brd ff:ff:ff:ff:ff:ff
4: ens9f2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000link/ether 58:c7:ac:c8:8b:5e brd ff:ff:ff:ff:ff:ff
5: ens9f3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000link/ether 58:c7:ac:c8:8b:5f brd ff:ff:ff:ff:ff:ff
6: ens3f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000link/ether a4:fa:76:0a:91:8a brd ff:ff:ff:ff:ff:ff
7: ens3f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000link/ether a4:fa:76:0a:91:8b brd ff:ff:ff:ff:ff:ff
8: ens6f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000link/ether a4:fa:76:0a:7d:06 brd ff:ff:ff:ff:ff:ff
9: ens6f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000link/ether a4:fa:76:0a:7d:07 brd ff:ff:ff:ff:ff:ff
其中state UP,表示连接状态,如果都是stat DOWN, 可以通过如下命令查看
sudo ethtool ens9f0
Settings for ens9f0:Supported ports: [ TP ]Supported link modes: 1000baseT/Full Supported pause frame use: SymmetricSupports auto-negotiation: YesSupported FEC modes: Not reportedAdvertised link modes: 1000baseT/Full Advertised pause frame use: NoAdvertised auto-negotiation: YesAdvertised FEC modes: Not reportedSpeed: 1000Mb/sDuplex: FullPort: Twisted PairPHYAD: 0Transceiver: internalAuto-negotiation: onMDI-X: UnknownSupports Wake-on: gWake-on: gCurrent message level: 0x00000007 (7)drv probe linkLink detected: yes
其中Link detected: yes 表示连接正常,也就是当前需要配置的网卡, 在/etc/netplan/00-installer-config.yaml中ethernets: enp6s0f0改成ens9f0