我用的是usb3.0转RJ45 2.5G网卡(型号CM275),不装驱动能够使用,但是网卡的mtu值不能超过1500(我想设置到9000),于是在官网下载对应驱动并安装。
下载地址1:linux绿联usb/type-c千兆网卡驱动-Linux文档类资源-CSDN下载
下载地址2:绿联USB/Type-C千兆网卡驱动下载RTL8153芯片
安装驱动:
解压缩
ubuntu@ubuntu-IB-IQ47-XA01:~/yxk$ tar -jxvf r8152.53.56-2.15.0.tar.bz2
解压后进入目录执行 sudo make 和 sudo make install
安装过程中遇到的问题:
错误1:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
sign-file: certs/signing_key.pem: No such file or directory
解决方法:
cd /lib/modules/$(uname -r)/build/certs
sudo tee x509.genkey > /dev/null << 'EOF'
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
string_mask = utf8only
x509_extensions = myexts
[ req_distinguished_name ]
CN = Modules
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid
EOF
sudo openssl req -new -nodes -utf8 -sha512 -days 36500 -batch -x509 -config x509.genkey -outform DER -out signing_key.x509 -keyout signing_key.pem
错误2:
Warning: modules_install: missing 'System.map' file. Skipping depmod.
解决方法:
ubuntu@ubuntu-IB-IQ47-XA01:~/yxk/r8152-2.15.0$ ls -l /boot/System.map*
-rw------- 1 root root 4593002 3月 3 16:36 /boot/System.map-5.4.0-104-generic
-rw------- 1 root root 4593967 3月 8 18:53 /boot/System.map-5.4.0-105-generic
ubuntu@ubuntu-IB-IQ47-XA01:~/yxk/r8152-2.15.0$
ubuntu@ubuntu-IB-IQ47-XA01:~/yxk/r8152-2.15.0$ sudo ln -s /boot/System.map-5.4.0-104-generic /lib/modules/5.4.0-104-generic/build/System.map
ubuntu@ubuntu-IB-IQ47-XA01:~/yxk/r8152-2.15.0$ sudo ln -s /boot/System.map-5.4.0-105-generic /lib/modules/5.4.0-105-generic/build/System.map
再次执行sudo make install
最后服务器重启
配置mtu值,能够成功设置到9000