当前位置:   article > 正文

Linux|centos7操作系统|VMware虚拟机安装水星免驱USB网卡8188gu记录_centos 8188gu

centos 8188gu

引言:

最近对于嵌入式系统比较感兴趣,因此,计划先使用VMware workstation虚拟机试一试Linux系统下的网卡驱动安装

这不试不知道,一试吓一跳,发现Linux下的驱动安装还是比较麻烦的,下面将就本次的Linux系统下安装水星免驱USB网卡在Linux下的安装做一个尽量详细的记录。

一,

Linux下驱动安装的必要性

首先,Linux的稳定性是毋庸置疑的,因此,在很多情况下,Linux是首选的,但,Linux的操作系统版本是非常多的,而目前服务器方面基本是centos7或者Ubuntu

其次,openwrt这样的软路由操作系统也是需要安装网卡的,虽然我们可以直接插一个网线,使用板载网卡,但,无疑使用USB类型的网卡更方便使用嘛

最后呢,就是Linux下网卡如果安装成功后,可以做WiFi网络嗅探,WiFi热点破解这些工作了,虽然Windows下有很多WiFi破解工具,但,我想Linux下的破解工作可能会更方便,也是对自己的周边的无线网络的一个安全认识吧。

二,

环境简介

本次实践使用的是VMware workstation 虚拟机,操作系统 的版本是centos7,最小化安装,网卡见下图:

插入机箱后,虚拟机选择连接该网卡:

在Linux下查看网卡,因为该网卡是USB类型的,因此,Linux下应该是可以看到一个USB类型的光驱(sr1就是这个网卡了):

  1. [root@centos10 ~]# lsblk
  2. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
  3. sda 8:0 0 100G 0 disk
  4. ├─sda1 8:1 0 1G 0 part /boot
  5. └─sda2 8:2 0 80G 0 part
  6. └─centos-root 253:0 0 80G 0 lvm /
  7. sr0 11:0 1 4.2G 0 rom /mnt
  8. sr1 11:1 1 128M 0 rom
  9. [root@centos10 ~]# blkid
  10. /dev/sr0: UUID="2017-09-06-10-51-00-00" LABEL="CentOS 7 x86_64" TYPE="iso9660" PTTYPE="dos"
  11. /dev/sda1: UUID="326cd1a2-713a-4a37-85d9-8f1606083297" TYPE="xfs"
  12. /dev/sda2: UUID="RoyB4E-tuJx-OSAn-uGvH-YOiH-rerF-51wkyI" TYPE="LVM2_member"
  13. /dev/mapper/centos-root: UUID="81ad8aed-bf72-4bd9-b9f4-8743e1dc074d" TYPE="xfs"

 挂载此光驱到media目录下,可以看到Windows的驱动安装包,很显然,前面我们说的免驱是指的Windows下的免驱而不是Linux,Linux下还是需要安装驱动的:

  1. [root@centos10 ~]# mount /dev/sr1 /media/
  2. mount: /dev/sr1 is write-protected, mounting read-only
  3. [root@centos10 ~]# cd /media/
  4. [root@centos10 media]# ls
  5. AutoRun.inf SetupInstall.exe
  6. [root@centos10 media]# ls -alh
  7. total 1.9M
  8. dr-xr-xr-x 1 root root 2.0K Nov 3 2021 .
  9. dr-xr-xr-x. 17 root root 244 Jan 15 04:41 ..
  10. -r-xr-xr-x 1 root root 33 Mar 26 2018 AutoRun.inf
  11. -r-xr-xr-x 1 root root 1.9M Jun 11 2018 SetupInstall.exe

看看Linux的版本信息:

  1. [root@centos10 media]# uname -a
  2. Linux centos10 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  3. [root@centos10 ~]# cat /etc/redhat-release
  4. CentOS Linux release 7.7.1908 (Core)

进一步看看USB的信息(lsusb命令如果没有,需要安装,安装命令为 yun install usbutils -y):

  1. [root@centos10 ~]# lsusb
  2. Bus 001 Device 002: ID 0bda:1a2b Realtek Semiconductor Corp.
  3. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  4. Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.
  5. Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
  6. Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
  7. Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  8. [root@centos10 ~]# lsusb -tv
  9. /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
  10. |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
  11. |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/7p, 12M
  12. |__ Port 1: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
  13. |__ Port 1: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
  14. /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
  15. |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M

第一个命令lsusb输出的第一个就是网卡了,第二个命令lsusb -tv可以印证,因为是usb-storage嘛,480M表示是usb3.0协议,读写速度,这些不需要过多关心

主要需要关注的是ID 0bda:1a2b, 利用此ID ,进一步识别网卡信息(注意,usb_modeswitch命令最小化安装没有,需要安装,yum install usb_modeswitch -y):

  1. [root@centos10 ~]# usb_modeswitch -KW -v 0bda -p 1a2b
  2. Take all parameters from the command line
  3. * usb_modeswitch: handle USB devices with multiple modes
  4. * Version 2.5.1 (C) Josua Dietze 2017
  5. * Based on libusb1/libusbx
  6. ! PLEASE REPORT NEW CONFIGURATIONS !
  7. DefaultVendor= 0x0bda
  8. DefaultProduct= 0x1a2b
  9. StandardEject=1
  10. Look for default devices ...
  11. found USB ID 0bda:1a2b
  12. vendor ID matched
  13. product ID matched
  14. found USB ID 1d6b:0002
  15. found USB ID 0e0f:0008
  16. found USB ID 0e0f:0002
  17. found USB ID 0e0f:0003
  18. found USB ID 1d6b:0001
  19. Found devices in default mode (1)
  20. Access device 002 on bus 001
  21. Get the current device configuration ...
  22. Current configuration number is 1
  23. Use interface number 0
  24. with class 8
  25. Use endpoints 0x0b (out) and 0x8a (in)
  26. USB description data (for identification)
  27. -------------------------
  28. Manufacturer: Realtek
  29. Product: DISK
  30. Serial No.: not provided
  31. -------------------------
  32. Sending standard EJECT sequence
  33. Looking for active drivers ...
  34. OK, driver detached
  35. Set up interface 0
  36. Use endpoint 0x0b for message sending ...
  37. Trying to send message 1 to endpoint 0x0b ...
  38. OK, message successfully sent
  39. Read the response to message 1 (CSW) ...
  40. Response successfully read (13 bytes), status 1
  41. Trying to send message 2 to endpoint 0x0b ...
  42. OK, message successfully sent
  43. Read the response to message 2 (CSW) ...
  44. Response reading failed (error -8)
  45. Device is gone, skip any further commands
  46. -> Run lsusb to note any changes. Bye!
  47. [root@centos10 ~]# lsusb
  48. Bus 001 Device 003: ID 0bda:b711 Realtek Semiconductor Corp.
  49. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  50. Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.
  51. Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
  52. Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
  53. Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

再次查看USB信息,可以看到ID改变了,变为0bda:b711 ,说明Linux正确识别到了,但是,此时还没有驱动来驱动该硬件 

在Linux下查询网卡芯片信息比较困难,其实比较简单的办法是在Windows下查看,见下图:

补充:

如何确定网卡的芯片型号是重中之重,关系到后面的网卡是否能正确识别使用,因此,我补充一下,如何查询网卡芯片型号的问题

芯片对应 列表在这个网站http://www.linux-usb.org/usb.ids,可以查询到两个b711,第二个说的是在切换后,因此确定是8188gu了

b711  EW-7722UAC 802.11a/b/g/n/ac (2x2) Wireless Adapter [MediaTek MT7612U]
b711  RTL8188GU 802.11n WLAN Adapter (After Modeswitch)

我们可以确定该网卡的芯片是8188gu的,在网上寻找此芯片的Linux版本驱动就可以了,本次实验使用的是版本是下面的链接(第一个没有dkms.conf 第二个有dkms.conf ,第二个更加好用一些,如果会dkms的话):

https://github.com/McMCCRU/rtl8188gu

我想这个应该也是可以的:

GitHub - wandercn/RTL8188GU: Realtek RTL8188GU Driver for TP-link TL-WN725N USB wifi

三,

相关资料介绍和驱动安装

驱动和操作系统的内核是密切相关的,因此, 本例中,需要升级内核,据测试,3.10版本的内核不会成功,本例中使用的内核版本是5版本

其次,是我们下载的驱动都是c语言的,因此,gcc的版本也需要比较高,默认的gcc4.8版本经测试也是失败的,本例中使用的gcc是9版本

本例涉及使用的安装包在下面的链接:

链接:https://pan.baidu.com/s/1tQseIUjo_MVCe-kaU8cROA?pwd=kkey 
提取码:kkey 

1,

升级内核

进入目录

  1. [root@centos10 kernel-lt-5.4.266]# pwd
  2. /root/11/kernel-lt-5.4.266
  3. [root@centos10 kernel-lt-5.4.266]# ll
  4. total 75756
  5. -rw-r--r-- 1 root root 52929208 Jan 15 06:21 kernel-lt-5.4.266-1.el7.elrepo.x86_64.rpm
  6. -rw-r--r-- 1 root root 13541288 Jan 15 06:21 kernel-lt-devel-5.4.266-1.el7.elrepo.x86_64.rpm
  7. -rw-r--r-- 1 root root 8626820 Jan 15 06:21 kernel-lt-doc-5.4.266-1.el7.elrepo.noarch.rpm
  8. -rw-r--r-- 1 root root 1401376 Jan 15 06:21 kernel-lt-headers-5.4.266-1.el7.elrepo.x86_64.rpm
  9. -rw-r--r-- 1 root root 233736 Jan 15 06:21 kernel-lt-tools-5.4.266-1.el7.elrepo.x86_64.rpm
  10. -rw-r--r-- 1 root root 120376 Jan 15 06:21 kernel-lt-tools-libs-5.4.266-1.el7.elrepo.x86_64.rpm
  11. -rw-r--r-- 1 root root 97832 Jan 15 06:21 kernel-lt-tools-libs-devel-5.4.266-1.el7.elrepo.x86_64.rpm
  12. -rw-r--r-- 1 root root 603824 Jan 15 06:21 python-perf-5.4.266-1.el7.elrepo.x86_64.rpm

可以强制安装,这个没有什么影响:

  1. [root@centos10 kernel-lt-5.4.266]# rpm -ivh ./* --force --nodeps
  2. warning: ./kernel-lt-5.4.266-1.el7.elrepo.x86_64.rpm: Header V4 DSA/SHA256 Signature, key ID baadae52: NOKEY
  3. Preparing... ################################# [100%]
  4. Updating / installing...
  5. 1:kernel-lt-tools-libs-5.4.266-1.el################################# [ 13%]
  6. 2:kernel-lt-tools-5.4.266-1.el7.elr################################# [ 25%]
  7. 3:kernel-lt-tools-libs-devel-5.4.26################################# [ 38%]
  8. 4:python-perf-5.4.266-1.el7.elrepo ################################# [ 50%]
  9. 5:kernel-lt-headers-5.4.266-1.el7.e################################# [ 63%]
  10. 6:kernel-lt-doc-5.4.266-1.el7.elrep################################# [ 75%]
  11. 7:kernel-lt-devel-5.4.266-1.el7.elr################################# [ 88%]
  12. 8:kernel-lt-5.4.266-1.el7.elrepo ################################# [100%]

 安装完毕后,重启虚拟机,选择新内核,进入系统,再次激活USB:

  1. [root@centos10 ~]# usb_modeswitch -KW -v 0bda -p 1a2b
  2. Take all parameters from the command line
  3. * usb_modeswitch: handle USB devices with multiple modes
  4. * Version 2.5.1 (C) Josua Dietze 2017
  5. * Based on libusb1/libusbx
  6. ! PLEASE REPORT NEW CONFIGURATIONS !
  7. DefaultVendor= 0x0bda
  8. DefaultProduct= 0x1a2b
  9. StandardEject=1
  10. Look for default devices ...
  11. found USB ID 0bda:1a2b
  12. vendor ID matched
  13. product ID matched
  14. found USB ID 1d6b:0002
  15. found USB ID 0e0f:0008
  16. found USB ID 0e0f:0002
  17. found USB ID 0e0f:0003
  18. found USB ID 1d6b:0001
  19. Found devices in default mode (1)
  20. Access device 002 on bus 001
  21. Get the current device configuration ...
  22. Current configuration number is 1
  23. Use interface number 0
  24. with class 8
  25. Use endpoints 0x0b (out) and 0x8a (in)
  26. USB description data (for identification)
  27. -------------------------
  28. Manufacturer: Realtek
  29. Product: DISK
  30. Serial No.: not provided
  31. -------------------------
  32. Sending standard EJECT sequence
  33. Looking for active drivers ...
  34. OK, driver detached
  35. Set up interface 0
  36. Use endpoint 0x0b for message sending ...
  37. Trying to send message 1 to endpoint 0x0b ...
  38. OK, message successfully sent
  39. Read the response to message 1 (CSW) ...
  40. Response successfully read (13 bytes), status 1
  41. Trying to send message 2 to endpoint 0x0b ...
  42. OK, message successfully sent
  43. Read the response to message 2 (CSW) ...
  44. Response reading failed (error -8)
  45. Device is gone, skip any further commands
  46. -> Run lsusb to note any changes. Bye!

2,

安装gcc9:

[root@centos10 11]# tar xvf gcc-9.tar
  1. [root@centos10 11]# mkdir /opt/rh
  2. [root@centos10 11]# mv devtoolset-9/ /opt/rh/
  3. [root@centos10 11]# source /opt/rh/devtoolset-9/enable
  4. [root@centos10 11]# echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
  5. [root@centos10 11]# source /etc/profile

验证gcc是否安装成功:

  1. [root@centos10 11]# gcc -v
  2. Using built-in specs.
  3. COLLECT_GCC=gcc
  4. COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
  5. Target: x86_64-redhat-linux
  6. Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-9/root/usr --mandir=/opt/rh/devtoolset-9/root/usr/share/man --infodir=/opt/rh/devtoolset-9/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-9.3.1-20200408/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
  7. Thread model: posix
  8. gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)

3,

编译的环境依赖安装:

因为我前面编译过,因此,清除了上次的编译,主要是安装bc 和gcc-c++

  1. [root@centos10 rtl8188gu-master]# yum install unzip gcc-c++ bc -y
  2. [root@centos10 rtl8188gu-master]# make clean
  3. #make -C /lib/modules/5.4.266-1.el7.elrepo.x86_64/build M=/root/11/rtl8188gu-master clean
  4. cd hal ; rm -fr */*/*/*.mod.c */*/*/*.mod */*/*/*.o */*/*/*.o.* */*/*/.*.cmd */*/*/*.ko
  5. cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/*.o.* */*/.*.cmd */*/*.ko
  6. cd hal ; rm -fr */*.mod.c */*.mod */*.o */*.o.* */.*.cmd */*.ko
  7. cd hal ; rm -fr *.mod.c *.mod *.o *.o.* .*.cmd *.ko
  8. cd core/efuse ; rm -fr *.mod.c *.mod *.o *.o.* .*.cmd *.ko
  9. cd core ; rm -fr *.mod.c *.mod *.o *.o.* .*.cmd *.ko
  10. cd os_dep/linux ; rm -fr *.mod.c *.mod *.o *.o.* .*.cmd *.ko
  11. cd os_dep ; rm -fr *.mod.c *.mod *.o *.o.* .*.cmd *.ko
  12. cd platform ; rm -fr *.mod.c *.mod *.o *.o.* .*.cmd *.ko
  13. rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
  14. rm -fr *.mod.c *.mod *.o *.o.* .*.cmd *.ko *~
  15. rm -fr .tmp_versions
  16. rm -fr .cache.mk

4,

开始编译:

预编译,完成后 echo $?  看看是不是正常完成:

  1. [root@centos10 rtl8188gu-master]# make
  2. make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.4.266-1.el7.elrepo.x86_64/build M=/root/11/rtl8188gu-master modules
  3. make[1]: Entering directory `/usr/src/kernels/5.4.266-1.el7.elrepo.x86_64'
  4. CC [M] /root/11/rtl8188gu-master/core/rtw_cmd.o
  5. CC [M] /root/11/rtl8188gu-master/core/rtw_security.o
  6. CC [M] /root/11/rtl8188gu-master/core/rtw_debug.o
  7. CC [M] /root/11/rtl8188gu-master/core/rtw_io.o
  8. CC [M] /root/11/rtl8188gu-master/core/rtw_ioctl_query.o
  9. CC [M] /root/11/rtl8188gu-master/core/rtw_ioctl_set.o
  10. CC [M] /root/11/rtl8188gu-master/core/rtw_ieee80211.o
  11. CC [M] /root/11/rtl8188gu-master/core/rtw_mlme.o
  12. CC [M] /root/11/rtl8188gu-master/core/rtw_mlme_ext.o
  13. CC [M] /root/11/rtl8188gu-master/core/rtw_mi.o
  14. CC [M] /root/11/rtl8188gu-master/core/rtw_wlan_util.o
  15. CC [M] /root/11/rtl8188gu-master/core/rtw_vht.o
  16. CC [M] /root/11/rtl8188gu-master/core/rtw_pwrctrl.o
  17. CC [M] /root/11/rtl8188gu-master/core/rtw_rf.o
  18. CC [M] /root/11/rtl8188gu-master/core/rtw_recv.o
  19. CC [M] /root/11/rtl8188gu-master/core/rtw_sta_mgt.o
  20. CC [M] /root/11/rtl8188gu-master/core/rtw_ap.o
  21. CC [M] /root/11/rtl8188gu-master/core/rtw_xmit.o
  22. CC [M] /root/11/rtl8188gu-master/core/rtw_p2p.o
  23. CC [M] /root/11/rtl8188gu-master/core/rtw_rson.o
  24. CC [M] /root/11/rtl8188gu-master/core/rtw_tdls.o
  25. CC [M] /root/11/rtl8188gu-master/core/rtw_br_ext.o
  26. CC [M] /root/11/rtl8188gu-master/core/rtw_iol.o
  27. CC [M] /root/11/rtl8188gu-master/core/rtw_sreset.o
  28. CC [M] /root/11/rtl8188gu-master/core/rtw_btcoex_wifionly.o
  29. CC [M] /root/11/rtl8188gu-master/core/rtw_btcoex.o
  30. CC [M] /root/11/rtl8188gu-master/core/rtw_beamforming.o
  31. CC [M] /root/11/rtl8188gu-master/core/rtw_odm.o
  32. CC [M] /root/11/rtl8188gu-master/core/efuse/rtw_efuse.o
  33. CC [M] /root/11/rtl8188gu-master/os_dep/osdep_service.o
  34. CC [M] /root/11/rtl8188gu-master/os_dep/linux/os_intfs.o
  35. CC [M] /root/11/rtl8188gu-master/os_dep/linux/usb_intf.o
  36. CC [M] /root/11/rtl8188gu-master/os_dep/linux/usb_ops_linux.o
  37. CC [M] /root/11/rtl8188gu-master/os_dep/linux/ioctl_linux.o
  38. CC [M] /root/11/rtl8188gu-master/os_dep/linux/xmit_linux.o
  39. CC [M] /root/11/rtl8188gu-master/os_dep/linux/mlme_linux.o
  40. CC [M] /root/11/rtl8188gu-master/os_dep/linux/recv_linux.o
  41. CC [M] /root/11/rtl8188gu-master/os_dep/linux/ioctl_cfg80211.o
  42. CC [M] /root/11/rtl8188gu-master/os_dep/linux/rtw_cfgvendor.o
  43. CC [M] /root/11/rtl8188gu-master/os_dep/linux/wifi_regd.o
  44. CC [M] /root/11/rtl8188gu-master/os_dep/linux/rtw_android.o
  45. CC [M] /root/11/rtl8188gu-master/os_dep/linux/rtw_proc.o
  46. CC [M] /root/11/rtl8188gu-master/hal/hal_intf.o
  47. CC [M] /root/11/rtl8188gu-master/hal/hal_com.o
  48. CC [M] /root/11/rtl8188gu-master/hal/hal_com_phycfg.o
  49. CC [M] /root/11/rtl8188gu-master/hal/hal_phy.o
  50. CC [M] /root/11/rtl8188gu-master/hal/hal_dm.o
  51. CC [M] /root/11/rtl8188gu-master/hal/hal_dm_acs.o
  52. CC [M] /root/11/rtl8188gu-master/hal/hal_btcoex_wifionly.o
  53. CC [M] /root/11/rtl8188gu-master/hal/hal_btcoex.o
  54. CC [M] /root/11/rtl8188gu-master/hal/hal_mp.o
  55. CC [M] /root/11/rtl8188gu-master/hal/hal_mcc.o
  56. CC [M] /root/11/rtl8188gu-master/hal/hal_hci/hal_usb.o
  57. CC [M] /root/11/rtl8188gu-master/hal/led/hal_usb_led.o
  58. CC [M] /root/11/rtl8188gu-master/hal/HalPwrSeqCmd.o
  59. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/Hal8710BPwrSeq.o
  60. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/rtl8710b_sreset.o
  61. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/rtl8710b_hal_init.o
  62. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/rtl8710b_phycfg.o
  63. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/rtl8710b_rf6052.o
  64. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/rtl8710b_dm.o
  65. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/rtl8710b_rxdesc.o
  66. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/rtl8710b_cmd.o
  67. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/hal8710b_fw.o
  68. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/rtl8710b_lps_poff.o
  69. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/usb/usb_halinit.o
  70. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/usb/rtl8710bu_led.o
  71. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/usb/rtl8710bu_xmit.o
  72. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/usb/rtl8710bu_recv.o
  73. CC [M] /root/11/rtl8188gu-master/hal/rtl8710b/usb/usb_ops.o
  74. CC [M] /root/11/rtl8188gu-master/hal/efuse/rtl8710b/HalEfuseMask8710B_USB.o
  75. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_debug.o
  76. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_antdiv.o
  77. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_soml.o
  78. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_smt_ant.o
  79. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_antdect.o
  80. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_interface.o
  81. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_phystatus.o
  82. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_hwconfig.o
  83. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm.o
  84. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_dig.o
  85. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_pathdiv.o
  86. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_rainfo.o
  87. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_dynamictxpower.o
  88. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_adaptivity.o
  89. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_cfotracking.o
  90. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_noisemonitor.o
  91. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_acs.o
  92. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_beamforming.o
  93. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_dfs.o
  94. CC [M] /root/11/rtl8188gu-master/hal/phydm/txbf/halcomtxbf.o
  95. CC [M] /root/11/rtl8188gu-master/hal/phydm/txbf/haltxbfinterface.o
  96. CC [M] /root/11/rtl8188gu-master/hal/phydm/txbf/phydm_hal_txbf_api.o
  97. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_adc_sampling.o
  98. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_ccx.o
  99. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_psd.o
  100. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_primary_cca.o
  101. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_cck_pd.o
  102. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_rssi_monitor.o
  103. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_auto_dbg.o
  104. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_math_lib.o
  105. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_api.o
  106. CC [M] /root/11/rtl8188gu-master/hal/phydm/phydm_pow_train.o
  107. CC [M] /root/11/rtl8188gu-master/hal/phydm/halrf/halrf.o
  108. CC [M] /root/11/rtl8188gu-master/hal/phydm/halrf/halphyrf_ce.o
  109. CC [M] /root/11/rtl8188gu-master/hal/phydm/halrf/halrf_powertracking_ce.o
  110. CC [M] /root/11/rtl8188gu-master/hal/phydm/halrf/halrf_powertracking.o
  111. CC [M] /root/11/rtl8188gu-master/hal/phydm/halrf/halrf_kfree.o
  112. CC [M] /root/11/rtl8188gu-master/hal/phydm/rtl8710b/halhwimg8710b_bb.o
  113. CC [M] /root/11/rtl8188gu-master/hal/phydm/rtl8710b/halhwimg8710b_mac.o
  114. CC [M] /root/11/rtl8188gu-master/hal/phydm/rtl8710b/halhwimg8710b_rf.o
  115. CC [M] /root/11/rtl8188gu-master/hal/phydm/rtl8710b/phydm_regconfig8710b.o
  116. CC [M] /root/11/rtl8188gu-master/hal/phydm/rtl8710b/phydm_rtl8710b.o
  117. CC [M] /root/11/rtl8188gu-master/hal/phydm/halrf/rtl8710b/halrf_8710b.o
  118. CC [M] /root/11/rtl8188gu-master/hal/btc/halbtc8723bwifionly.o
  119. CC [M] /root/11/rtl8188gu-master/hal/btc/halbtc8822bwifionly.o
  120. CC [M] /root/11/rtl8188gu-master/hal/btc/halbtc8821cwifionly.o
  121. CC [M] /root/11/rtl8188gu-master/platform/platform_ops.o
  122. LD [M] /root/11/rtl8188gu-master/8188gu.o
  123. Building modules, stage 2.
  124. MODPOST 1 modules
  125. CC [M] /root/11/rtl8188gu-master/8188gu.mod.o
  126. LD [M] /root/11/rtl8188gu-master/8188gu.ko
  127. make[1]: Leaving directory `/usr/src/kernels/5.4.266-1.el7.elrepo.x86_64'
  128. [root@centos10 rtl8188gu-master]# echo $?
  129. 0

开始驱动安装:

  1. [root@centos10 rtl8188gu-master]# make install
  2. install -p -m 644 8188gu.ko /lib/modules/5.4.266-1.el7.elrepo.x86_64/kernel/drivers/net/wireless/
  3. /sbin/depmod -a 5.4.266-1.el7.elrepo.x86_64

可以看到,驱动是安装到了/lib/modules/5.4.266-1.el7.elrepo.x86_64/kernel/drivers/net/wireless/这个目录下,并且最后depmod 了一下

三,

检查驱动安装和使用驱动

网卡驱动安装基本上算是完成了,现在需要彻底激活此网卡

查看网卡的驱动模块是否正确加载:

没有任何输出,如果正确加载会有输出的哦

[root@centos10 rtl8188gu-master]# lsmod |grep 8188

这个时候不要慌,看看该网卡驱动的详细信息:

  1. [root@centos10 rtl8188gu-master]# modinfo /lib/modules/5.4.266-1.el7.elrepo.x86_64/kernel/drivers/net/wireless/8188gu.ko
  2. filename: /lib/modules/5.4.266-1.el7.elrepo.x86_64/kernel/drivers/net/wireless/8188gu.ko
  3. version: v5.2.20.2_28373.20180619
  4. author: Realtek Semiconductor Corp.
  5. description: Realtek Wireless Lan Driver
  6. license: GPL
  7. srcversion: 50084205D88612258B5BBBB
  8. alias: usb:v0BDAp2005d*dc*dsc*dp*icFFiscFFipFFin*
  9. alias: usb:v0BDApB711d*dc*dsc*dp*icFFiscFFipFFin*
  10. depends: cfg80211
  11. retpoline: Y
  12. name: 8188gu
  13. vermagic: 5.4.266-1.el7.elrepo.x86_64 SMP mod_unload modversions
  14. parm: rtw_ips_mode:The default IPS mode (int)
  15. parm: rtw_lps_level:The default LPS level (int)
  16. parm: rtw_usb_rxagg_mode:int
  17. parm: rtw_dynamic_agg_enable:int
  18. parm: rtw_drv_log_level:set log level when insert driver module, default log level is _DRV_INFO_ = 4 (uint)
  19. parm: rtw_tx_bw_mode:The max tx bw for 2.4G and 5G. format is the same as rtw_bw_mode (uint)
  20. parm: rtw_rx_ampdu_sz_limit_1ss:RX AMPDU size limit for 1SS link of each BW, 0xFF: no limitation (array of uint)
  21. parm: rtw_rx_ampdu_sz_limit_2ss:RX AMPDU size limit for 2SS link of each BW, 0xFF: no limitation (array of uint)
  22. parm: rtw_rx_ampdu_sz_limit_3ss:RX AMPDU size limit for 3SS link of each BW, 0xFF: no limitation (array of uint)
  23. parm: rtw_rx_ampdu_sz_limit_4ss:RX AMPDU size limit for 4SS link of each BW, 0xFF: no limitation (array of uint)
  24. parm: rtw_vht_enable:int
  25. parm: rtw_vht_rx_mcs_map:VHT RX MCS map (uint)
  26. parm: rtw_rf_config:int
  27. parm: rtw_country_code:The default country code (in alpha2) (charp)
  28. parm: rtw_channel_plan:The default chplan ID when rtw_alpha2 is not specified or valid (int)
  29. parm: rtw_excl_chs:exclusive channel array (array of uint)
  30. parm: rtw_qos_opt_enable:int
  31. parm: ifname:The default name to allocate for first interface (charp)
  32. parm: if2name:The default name to allocate for second interface (charp)
  33. parm: rtw_pwrtrim_enable:int
  34. parm: rtw_initmac:charp
  35. parm: rtw_special_rf_path:int
  36. parm: rtw_chip_version:int
  37. parm: rtw_rfintfs:int
  38. parm: rtw_lbkmode:int
  39. parm: rtw_network_mode:int
  40. parm: rtw_channel:int
  41. parm: rtw_mp_mode:int
  42. parm: rtw_wmm_enable:int
  43. parm: rtw_vrtl_carrier_sense:int
  44. parm: rtw_vcs_type:int
  45. parm: rtw_busy_thresh:int
  46. parm: rtw_ht_enable:int
  47. parm: rtw_bw_mode:int
  48. parm: rtw_ampdu_enable:int
  49. parm: rtw_rx_stbc:int
  50. parm: rtw_rx_ampdu_amsdu:int
  51. parm: rtw_tx_ampdu_amsdu:int
  52. parm: rtw_beamform_cap:int
  53. parm: rtw_lowrate_two_xmit:int
  54. parm: rtw_power_mgnt:int
  55. parm: rtw_smart_ps:int
  56. parm: rtw_low_power:int
  57. parm: rtw_wifi_spec:int
  58. parm: rtw_full_ch_in_p2p_handshake:int
  59. parm: rtw_antdiv_cfg:int
  60. parm: rtw_antdiv_type:int
  61. parm: rtw_drv_ant_band_switch:int
  62. parm: rtw_single_ant_path:int
  63. parm: rtw_switch_usb_mode:int
  64. parm: rtw_enusbss:int
  65. parm: rtw_hwpdn_mode:int
  66. parm: rtw_hwpwrp_detect:int
  67. parm: rtw_hw_wps_pbc:int
  68. parm: rtw_check_hw_status:int
  69. parm: rtw_max_roaming_times:The max roaming times to try (uint)
  70. parm: rtw_mc2u_disable:int
  71. parm: rtw_80211d:Enable 802.11d mechanism (int)
  72. parm: rtw_notch_filter:0:Disable, 1:Enable, 2:Enable only for P2P (uint)
  73. parm: rtw_hiq_filter:0:allow all, 1:allow special, 2:deny all (uint)
  74. parm: rtw_adaptivity_en:0:disable, 1:enable (uint)
  75. parm: rtw_adaptivity_mode:0:normal, 1:carrier sense (uint)
  76. parm: rtw_adaptivity_dml:0:disable, 1:enable (uint)
  77. parm: rtw_adaptivity_dc_backoff:DC backoff for Adaptivity (uint)
  78. parm: rtw_adaptivity_th_l2h_ini:th_l2h_ini for Adaptivity (int)
  79. parm: rtw_adaptivity_th_edcca_hl_diff:th_edcca_hl_diff for Adaptivity (int)
  80. parm: rtw_amplifier_type_2g:BIT3:2G ext-PA, BIT4:2G ext-LNA (uint)
  81. parm: rtw_amplifier_type_5g:BIT6:5G ext-PA, BIT7:5G ext-LNA (uint)
  82. parm: rtw_RFE_type:default init value:64 (uint)
  83. parm: rtw_powertracking_type:default init value:64 (uint)
  84. parm: rtw_GLNA_type:default init value:0 (uint)
  85. parm: rtw_TxBBSwing_2G:default init value:0xFF (uint)
  86. parm: rtw_TxBBSwing_5G:default init value:0xFF (uint)
  87. parm: rtw_OffEfuseMask:default open Efuse Mask value:0 (uint)
  88. parm: rtw_FileMaskEfuse:default drv Mask Efuse value:0 (uint)
  89. parm: rtw_rxgain_offset_2g:default RF Gain 2G Offset value:0 (uint)
  90. parm: rtw_rxgain_offset_5gl:default RF Gain 5GL Offset value:0 (uint)
  91. parm: rtw_rxgain_offset_5gh:uint
  92. parm: rtw_rxgain_offset_5gm:default RF Gain 5GM Offset value:0 (uint)
  93. parm: rtw_pll_ref_clk_sel:force pll_ref_clk_sel, 0xF:use autoload value (uint)
  94. parm: rtw_tx_pwr_by_rate:0:Disable, 1:Enable, 2: Depend on efuse (int)
  95. parm: rtw_target_tx_pwr_2g_a:2.4G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int)
  96. parm: rtw_target_tx_pwr_2g_b:2.4G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int)
  97. parm: rtw_target_tx_pwr_2g_c:2.4G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int)
  98. parm: rtw_target_tx_pwr_2g_d:2.4G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int)
  99. parm: rtw_phy_file_path:The path of phy parameter (charp)
  100. parm: rtw_load_phy_file:PHY File Bit Map (int)
  101. parm: rtw_decrypt_phy_file:Enable Decrypt PHY File (int)
  102. parm: rtw_en_napi:int
  103. parm: rtw_en_gro:int
  104. parm: rtw_iqk_fw_offload:int

可以看到该网卡驱动依赖的是另一个模块cfg80211,lsmod命令没有看到cfg80211,modinfo看不到该模块的信息(备注:该模块是kernel的验证签名模块)

  1. [root@centos10 rtl8188gu-master]# find / -name cfg80211
  2. /usr/src/kernels/5.4.266-1.el7.elrepo.x86_64/include/config/cfg80211
  3. [root@centos10 rtl8188gu-master]# modinfo /usr/src/kernels/5.4.266-1.el7.elrepo.x86_64/include/config/cfg80211
  4. modinfo: ERROR: Module /usr/src/kernels/5.4.266-1.el7.elrepo.x86_64/include/config/cfg80211 not found.

查看系统日志,可以看到网卡的USB无法使用:

  1. [ 11.810876] Buffer I/O error on dev sr1, logical block 32640, async page read
  2. [ 11.981365] sr 32:0:0:0: [sr1] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
  3. [ 11.981369] sr 32:0:0:0: [sr1] tag#0 CDB: Read(10) 28 00 00 00 ff 00 00 00 3c 00
  4. [ 11.981371] blk_update_request: I/O error, dev sr1, sector 261120 op 0x0:(READ) flags 0x84700 phys_seg 30 prio class 0
  5. [ 12.083530] sr 32:0:0:0: [sr1] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
  6. [ 12.083535] sr 32:0:0:0: [sr1] tag#0 CDB: Read(10) 28 00 00 00 ff 3c 00 00 04 00
  7. [ 12.083537] blk_update_request: I/O error, dev sr1, sector 261360 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 0
  8. [ 12.116606] sr 32:0:0:0: [sr1] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
  9. [ 12.116629] sr 32:0:0:0: [sr1] tag#0 CDB: Read(10) 28 00 00 00 ff 00 00 00 02 00
  10. [ 12.116633] blk_update_request: I/O error, dev sr1, sector 261120 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
  11. [ 12.116725] Buffer I/O error on dev sr1, logical block 32640, async page read
  12. [ 35.543061] usb 1-1: USB disconnect, device number 2

使用modprobe命令重新激活这两个模块(没有输出表示正确哦),并查看模块是否正确加载:
 

  1. [root@centos10 rtl8188gu-master]# modprobe cfg80211
  2. [root@centos10 rtl8188gu-master]# modprobe 8188gu
  3. [root@centos10 rtl8188gu-master]# lsmod |grep 8188 ||grep cfg80211
  4. 8188gu 1007616 0
  5. cfg80211 704512 1 8188gu

这个时候,可以看到cfg80211的模块信息了(上面的说看不到信息的话,我收回!!!!!,这里表明此模块是无线连接的支持模块,收回此模块是签名验证的说法!!!!!):

  1. [root@centos10 rtl8188gu-master]# find / -name cfg80211.ko
  2. /usr/lib/modules/5.4.266-1.el7.elrepo.x86_64/kernel/net/wireless/cfg80211.ko
  3. [root@centos10 rtl8188gu-master]# modinfo /usr/lib/modules/5.4.266-1.el7.elrepo.x86_64/kernel/net/wireless/cfg80211.ko
  4. filename: /usr/lib/modules/5.4.266-1.el7.elrepo.x86_64/kernel/net/wireless/cfg80211.ko
  5. alias: net-pf-16-proto-16-family-nl80211
  6. description: wireless configuration support
  7. license: GPL
  8. author: Johannes Berg
  9. srcversion: 6CA837C31154DE1B46FBEC0
  10. depends: rfkill
  11. retpoline: Y
  12. intree: Y
  13. name: cfg80211
  14. vermagic: 5.4.266-1.el7.elrepo.x86_64 SMP mod_unload modversions
  15. parm: bss_entries_limit:limit to number of scan BSS entries (per wiphy, default 1000) (int)
  16. parm: ieee80211_regdom:IEEE 802.11 regulatory domain code (charp)
  17. parm: cfg80211_disable_40mhz_24ghz:Disable 40MHz support in the 2.4GHz band (bool)

此时并没有看到这个新安装的网卡:

  1. [root@centos10 rtl8188gu-master]# ifconfig -a
  2. ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  3. inet 192.168.123.20 netmask 255.255.255.0 broadcast 192.168.123.255
  4. inet6 fd15:4ba5:5a2b:1008:162e:7500:4e67:2fb1 prefixlen 64 scopeid 0x0<global>
  5. inet6 fe80::523b:7d77:34e9:fa42 prefixlen 64 scopeid 0x20<link>
  6. ether 00:0c:29:e8:89:a2 txqueuelen 1000 (Ethernet)
  7. RX packets 2903 bytes 217349 (212.2 KiB)
  8. RX errors 0 dropped 0 overruns 0 frame 0
  9. TX packets 2910 bytes 629873 (615.1 KiB)
  10. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  11. device interrupt 19 base 0x2000
  12. lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
  13. inet 127.0.0.1 netmask 255.0.0.0
  14. inet6 ::1 prefixlen 128 scopeid 0x10<host>
  15. loop txqueuelen 1000 (Local Loopback)
  16. RX packets 0 bytes 0 (0.0 B)
  17. RX errors 0 dropped 0 overruns 0 frame 0
  18. TX packets 0 bytes 0 (0.0 B)
  19. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

可以看到,ens33这个网卡有异常,好像多了ipv6的信息,应该是一个ipv6的,查看系统日志,看到如下报错:

<info> [1705156203.3089] device (ens33): ipv6: duplicate address check faile

因此,决定关闭ipv6,关闭步骤如下:

1,

删除ens33网卡内的所有关于ipv6的信息,最终该网卡的配置文件如下:

  1. [root@centos10 rtl8188gu-master]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
  2. TYPE=Ethernet
  3. PROXY_METHOD=none
  4. BROWSER_ONLY=no
  5. BOOTPROTO=static
  6. DEFROUTE=yes
  7. IPV4_FAILURE_FATAL=no
  8. NAME=ens33
  9. UUID=abed039b-c453-47ee-acd4-301974b75aab
  10. DEVICE=ens33
  11. ONBOOT=yes
  12. IPADDR=192.168.123.20
  13. GATEWAY=192.168.123.2
  14. NETMASK=255.255.225.0
  15. DNS1=223.5.5.5
  16. DNS1=223.6.6.6

2,

内核屏蔽ipv6:

  1. [root@centos10 rtl8188gu-master]# cat /etc/sysctl.conf
  2. # sysctl settings are defined through files in
  3. # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
  4. #
  5. # Vendors settings live in /usr/lib/sysctl.d/.
  6. # To override a whole file, create a new file with the same in
  7. # /etc/sysctl.d/ and put new settings there. To override
  8. # only specific settings, add a file with a lexically later
  9. # name in /etc/sysctl.d/ and put new settings there.
  10. #
  11. # For more information, see sysctl.conf(5) and sysctl.d(5).
  12. net.ipv6.conf.all.disable_ipv6 = 1
  13. net.ipv6.conf.default.disable_ipv6 = 1

最后两行屏蔽ipv6的,然后sysctl -p  激活此设置

3,

network这个文件末尾添加no

  1. [root@centos10 rtl8188gu-master]# cat /etc/sysconfig/network
  2. # Created by anaconda
  3. NETWORKING_IPV6=no

4,

重启网络

  1. [root@centos10 rtl8188gu-master]# systemctl restart NetworkManager
  2. [root@centos10 rtl8188gu-master]# systemctl restart network

5,

重新插拔网卡,再次查看网卡信息,新网卡出来了:

  1. [root@centos10 rtl8188gu-master]# ip a
  2. 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
  3. link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  4. inet 127.0.0.1/8 scope host lo
  5. valid_lft forever preferred_lft forever
  6. 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
  7. link/ether 00:0c:29:e8:89:a2 brd ff:ff:ff:ff:ff:ff
  8. inet 192.168.123.20/24 brd 192.168.123.255 scope global noprefixroute ens33
  9. valid_lft forever preferred_lft forever
  10. 3: wls35u1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
  11. link/ether 00:5c:c2:ce:dc:24 brd ff:ff:ff:ff:ff:ff

现在需要连接WiFi了,有很多方法,比如上面资料里提到的wpa_suppliant_withoutopenssl-master,或者直接在桌面图形化方式连接

本次采用桌面方式,因此,先安装一个桌面:

yum group install "GNOME Desktop"

安装完毕后,startx命令进入桌面:

此时的网卡还没有激活,因此,激活先,看到网卡里有一个up就可以啦:

  1. [root@centos10 rtl8188gu-master]# ip a
  2. 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
  3. link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  4. inet 127.0.0.1/8 scope host lo
  5. valid_lft forever preferred_lft forever
  6. 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
  7. link/ether 00:0c:29:e8:89:a2 brd ff:ff:ff:ff:ff:ff
  8. inet 192.168.123.20/24 brd 192.168.123.255 scope global noprefixroute ens33
  9. valid_lft forever preferred_lft forever
  10. 3: wls35u1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
  11. link/ether 00:5c:c2:ce:dc:24 brd ff:ff:ff:ff:ff:ff

扫描WiFi热点:

  1. [root@centos10 rtl8188gu-master]# nmcli device wifi list
  2. IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY
  3. mywifi Infra 5 270 Mbit/s 54 ▂▄__ WPA2
  4. -- Infra 5 270 Mbit/s 54 ▂▄__ WPA2
  5. mywifi-WiFi5 Infra 5 270 Mbit/s 52 ▂▄__ WPA2
  6. ChinaNet-gTUm Infra 5 130 Mbit/s 45 ▂▄__ WPA1 WPA2
  7. ChinaNet-6b4R Infra 2 130 Mbit/s 30 ▂___ WPA1
  8. YBJ Infra 1 130 Mbit/s 29 ▂___ WPA1 WPA2
  9. @PHICOMM_40 Infra 2 270 Mbit/s 29 ▂___ WPA1 WPA2
  10. MIQI Infra 11 195 Mbit/s 29 ▂___ WPA1 WPA2
  11. -- Infra 11 195 Mbit/s 27 ▂___ WPA1 WPA2
  12. ChinaNet-wfJ9 Infra 10 130 Mbit/s 25 ▂___ WPA1 WPA2
  13. ChinaNet-B9QD Infra 6 130 Mbit/s 24 ▂___ WPA1 WPA2
  14. midea_db_0821 Infra 3 65 Mbit/s 22 ▂___ WPA2
  15. qiangweiguo_Wi-Fi5 Infra 9 130 Mbit/s 22 ▂___ WPA1 WPA2
  16. -- Infra 6 540 Mbit/s 20 ▂___ WPA1 WPA2
  17. -- Infra 8 130 Mbit/s 20 ▂___ WPA2
  18. qiangweiguo Infra 9 130 Mbit/s 20 ▂___ WPA1 WPA2
  19. -- Infra 9 130 Mbit/s 19 ▂___ WPA2

或者使用iwlist命令(这个命令以后再说,现在只是演示一下):
 

  1. [root@centos10 wireless_tools]# iwlist wls35u1 scan
  2. wls35u1 Scan completed :
  3. Cell 01 - Address: 74:05:A5:DC:86:C2
  4. ESSID:"YBJ"
  5. Protocol:IEEE 802.11bgn
  6. Mode:Master
  7. Frequency:2.412 GHz (Channel 1)
  8. Encryption key:on
  9. Bit Rates:144 Mb/s
  10. Extra:wpa_ie=dd160050f20101000050f20401000050f20401000050f202
  11. IE: WPA Version 1
  12. Group Cipher : CCMP
  13. Pairwise Ciphers (1) : CCMP
  14. Authentication Suites (1) : PSK
  15. Extra:
  16. IE: IEEE 802.11i/WPA2 Version 1
  17. Group Cipher : CCMP
  18. Pairwise Ciphers (1) : CCMP
  19. Authentication Suites (1) : PSK
  20. Quality=0/100 Signal level=17/100
  21. Extra:fm=0003
  22. Cell 02 - Address: 50:33:F0:A4:02:3E
  23. ESSID:"801"
  24. Protocol:IEEE 802.11bgn
  25. Mode:Master
  26. Frequency:2.412 GHz (Channel 1)
  27. Encryption key:on
  28. Bit Rates:780 Mb/s
  29. Extra:wpa_ie=dd1a0050f20101000050f20202000050f2020050f20401000050f202
  30. IE: WPA Version 1
  31. Group Cipher : TKIP
  32. Pairwise Ciphers (2) : TKIP CCMP
  33. Authentication Suites (1) : PSK
  34. Extra:
  35. IE: IEEE 802.11i/WPA2 Version 1
  36. Group Cipher : TKIP
  37. Pairwise Ciphers (2) : TKIP CCMP
  38. Authentication Suites (1) : PSK
  39. Quality=0/100 Signal level=13/100
  40. Extra:fm=0003
  41. Cell 03 - Address: F4:32:3D:98:9A:39
  42. ESSID:"ChinaNet-6b4R"
  43. Protocol:IEEE 802.11bgn
  44. Mode:Master
  45. Frequency:2.417 GHz (Channel 2)
  46. Encryption key:on
  47. Bit Rates:144 Mb/s
  48. Extra:wpa_ie=dd1a0050f20101000050f20202000050f2040050f20201000050f202
  49. IE: WPA Version 1
  50. Group Cipher : TKIP
  51. Pairwise Ciphers (2) : CCMP TKIP
  52. Authentication Suites (1) : PSK
  53. Quality=0/100 Signal level=18/100
  54. Extra:fm=0001
  55. Cell 04 - Address: CC:81:DA:55:EF:48
  56. ESSID:"@PHICOMM_40"
  57. Protocol:IEEE 802.11bgn
  58. Mode:Master
  59. Frequency:2.417 GHz (Channel 2)
  60. Encryption key:on
  61. Bit Rates:300 Mb/s
  62. Extra:wpa_ie=dd1a0050f20101000050f20202000050f2020050f20401000050f202
  63. IE: WPA Version 1
  64. Group Cipher : TKIP
  65. Pairwise Ciphers (2) : TKIP CCMP
  66. Authentication Suites (1) : PSK
  67. Extra:
  68. IE: IEEE 802.11i/WPA2 Version 1
  69. Group Cipher : TKIP
  70. Pairwise Ciphers (2) : TKIP CCMP
  71. Authentication Suites (1) : PSK
  72. Quality=0/100 Signal level=14/100
  73. Extra:fm=0001
  74. Cell 05 - Address: F8:CD:C8:90:BC:32
  75. ESSID:"ChinaNet-gTUm"
  76. Protocol:IEEE 802.11bgn
  77. Mode:Master
  78. Frequency:2.432 GHz (Channel 5)
  79. Encryption key:on
  80. Bit Rates:144 Mb/s
  81. Extra:wpa_ie=dd1a0050f20101000050f20202000050f2040050f20201000050f202
  82. IE: WPA Version 1
  83. Group Cipher : TKIP
  84. Pairwise Ciphers (2) : CCMP TKIP
  85. Authentication Suites (1) : PSK
  86. Extra:
  87. IE: IEEE 802.11i/WPA2 Version 1
  88. Group Cipher : TKIP
  89. Pairwise Ciphers (2) : CCMP TKIP
  90. Authentication Suites (1) : PSK
  91. IE: Unknown: DD7D0050F204104A0001101044000101103B000103104700107B882E1F7DD6CD39808942E5FA1712CB1021000842726F6164636F6D1023000842726F6164636F6D1024000431323334104200033236371054000800060050F20400011011000A42726F6164636F6D4150100800022008103C0001031049000600372A000120
  92. Quality=0/100 Signal level=27/100
  93. Extra:fm=0003
  94. Cell 06 - Address: 50:33:F0:CD:21:D9
  95. ESSID:"mywifi"
  96. Protocol:IEEE 802.11bgn
  97. Mode:Master
  98. Frequency:2.432 GHz (Channel 5)
  99. Encryption key:on
  100. Bit Rates:867 Mb/s
  101. Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
  102. IE: IEEE 802.11i/WPA2 Version 1
  103. Group Cipher : CCMP
  104. Pairwise Ciphers (1) : CCMP
  105. Authentication Suites (1) : PSK
  106. IE: Unknown: DD9F0050F204104A0001101044000102103B00010310470010BC329E001DD811B286015033F0CD21D81021001852616C696E6B20546563686E6F6C6F67792C20436F72702E1023001C52616C696E6B20576972656C6573732041636365737320506F696E74102400065254323836301042000831323334353637381054000800060050F20400011011000B52616C696E6B4150535F3010080002008C103C000101
  107. Quality=0/100 Signal level=33/100
  108. Extra:fm=0003
  109. Cell 07 - Address: 52:33:F0:2D:21:D9
  110. ESSID:"mywifi-WiFi5"
  111. Protocol:IEEE 802.11bgn
  112. Mode:Master
  113. Frequency:2.432 GHz (Channel 5)
  114. Encryption key:on
  115. Bit Rates:867 Mb/s
  116. Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
  117. IE: IEEE 802.11i/WPA2 Version 1
  118. Group Cipher : CCMP
  119. Pairwise Ciphers (1) : CCMP
  120. Authentication Suites (1) : PSK
  121. IE: Unknown: DD9F0050F204104A0001101044000102103B00010310470010BC329E001DD811B286015033F0CD21D81021001852616C696E6B20546563686E6F6C6F67792C20436F72702E1023001C52616C696E6B20576972656C6573732041636365737320506F696E74102400065254323836301042000831323334353637381054000800060050F20400011011000B52616C696E6B4150535F3210080002008C103C000101
  122. Quality=0/100 Signal level=33/100
  123. Extra:fm=0003
  124. Cell 08 - Address: 52:33:F0:7D:21:D9
  125. ESSID:""
  126. Protocol:IEEE 802.11bgn
  127. Mode:Master
  128. Frequency:2.432 GHz (Channel 5)
  129. Encryption key:on
  130. Bit Rates:867 Mb/s
  131. Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
  132. IE: IEEE 802.11i/WPA2 Version 1
  133. Group Cipher : CCMP
  134. Pairwise Ciphers (1) : CCMP
  135. Authentication Suites (1) : PSK
  136. IE: Unknown: DD270050F204104A000110104400010210470010BC329E001DD811B286015033F0CD21D8103C000101
  137. Quality=0/100 Signal level=33/100
  138. Extra:fm=0001
  139. Cell 09 - Address: 08:10:7B:F0:7E:21
  140. ESSID:"zhwww"
  141. Protocol:IEEE 802.11bgn
  142. Mode:Master
  143. Frequency:2.447 GHz (Channel 8)
  144. Encryption key:on
  145. Bit Rates:780 Mb/s
  146. Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
  147. IE: IEEE 802.11i/WPA2 Version 1
  148. Group Cipher : CCMP
  149. Pairwise Ciphers (1) : CCMP
  150. Authentication Suites (1) : PSK
  151. IE: Unknown: DDA90050F204104A0001101044000102103B0001031047001063041253101920191227AABBCCDDEEFF1021001852616C696E6B20546563686E6F6C6F67792C20436F72702E1023001C52616C696E6B20576972656C6573732041636365737320506F696E74102400065254323836301042000831323334353637381054000800060050F20400011011000B52616C696E6B4150535F3010080002218C103C0001011049000600372A000120
  152. Quality=0/100 Signal level=17/100
  153. Extra:fm=0003
  154. Cell 10 - Address: 0A:10:7B:70:7E:21
  155. ESSID:""
  156. Protocol:IEEE 802.11bgn
  157. Mode:Master
  158. Frequency:2.447 GHz (Channel 8)
  159. Encryption key:on
  160. Bit Rates:780 Mb/s
  161. Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
  162. IE: IEEE 802.11i/WPA2 Version 1
  163. Group Cipher : CCMP
  164. Pairwise Ciphers (1) : CCMP
  165. Authentication Suites (1) : PSK
  166. Quality=0/100 Signal level=18/100
  167. Extra:fm=0001
  168. Cell 11 - Address: F8:2F:65:77:5A:00
  169. ESSID:"qiangweiguo"
  170. Protocol:IEEE 802.11bgn
  171. Mode:Master
  172. Frequency:2.452 GHz (Channel 9)
  173. Encryption key:on
  174. Bit Rates:144 Mb/s
  175. Extra:wpa_ie=dd1a0050f20101000050f20202000050f2040050f20201000050f202
  176. IE: WPA Version 1
  177. Group Cipher : TKIP
  178. Pairwise Ciphers (2) : CCMP TKIP
  179. Authentication Suites (1) : PSK
  180. Extra:
  181. IE: IEEE 802.11i/WPA2 Version 1
  182. Group Cipher : TKIP
  183. Pairwise Ciphers (2) : CCMP TKIP
  184. Authentication Suites (1) : PSK
  185. IE: Unknown: DD230050F204104A0001101044000102100800020780103C0001011049000600372A000120
  186. Quality=0/100 Signal level=11/100
  187. Extra:fm=0001
  188. Cell 12 - Address: 58:C6:7E:FB:4F:38
  189. ESSID:"ChinaNet-wfJ9"
  190. Protocol:IEEE 802.11bgn
  191. Mode:Master
  192. Frequency:2.457 GHz (Channel 10)
  193. Encryption key:on
  194. Bit Rates:144 Mb/s
  195. Extra:wpa_ie=dd160050f20101000050f20401000050f20401000050f202
  196. IE: WPA Version 1
  197. Group Cipher : CCMP
  198. Pairwise Ciphers (1) : CCMP
  199. Authentication Suites (1) : PSK
  200. Extra:
  201. IE: IEEE 802.11i/WPA2 Version 1
  202. Group Cipher : CCMP
  203. Pairwise Ciphers (1) : CCMP
  204. Authentication Suites (1) : PSK
  205. IE: Unknown: DD7E0050F204104A0001101044000102103B000103104700105D2DBCBB9D644948047E083B1A419A72102100094669626572686F6D65102300094669626572686F6D651024000631323334353610420004313233341054000800060050F20400011011000B4669626572686F6D6541501008000220081049000600372A000120
  206. Quality=0/100 Signal level=13/100
  207. Extra:fm=0003
  208. Cell 13 - Address: 44:F9:71:0D:A0:B6
  209. ESSID:"MIQI"
  210. Protocol:IEEE 802.11bgn
  211. Mode:Master
  212. Frequency:2.462 GHz (Channel 11)
  213. Encryption key:on
  214. Bit Rates:1.3 Gb/s
  215. Extra:wpa_ie=dd160050f20101000050f20401000050f20401000050f202
  216. IE: WPA Version 1
  217. Group Cipher : CCMP
  218. Pairwise Ciphers (1) : CCMP
  219. Authentication Suites (1) : PSK
  220. Extra:
  221. IE: IEEE 802.11i/WPA2 Version 1
  222. Group Cipher : CCMP
  223. Pairwise Ciphers (1) : CCMP
  224. Authentication Suites (1) : PSK
  225. IE: Unknown: DD760050F204104A0001101044000102103B000103104700100000000000001000000044F9710DA0B6102100074D455243555259102300085952313930304D4710240003312E30104200001054000800060050F2040001101100085952313930304D47100800022288103C0001031049000600372A000120
  226. Quality=0/100 Signal level=16/100
  227. Extra:fm=0003
  228. Cell 14 - Address: 46:F9:71:2D:A0:B6
  229. ESSID:""
  230. Protocol:IEEE 802.11bgn
  231. Mode:Master
  232. Frequency:2.462 GHz (Channel 11)
  233. Encryption key:on
  234. Bit Rates:1.3 Gb/s
  235. Extra:wpa_ie=dd160050f20101000050f20401000050f20401000050f202
  236. IE: WPA Version 1
  237. Group Cipher : CCMP
  238. Pairwise Ciphers (1) : CCMP
  239. Authentication Suites (1) : PSK
  240. Extra:
  241. IE: IEEE 802.11i/WPA2 Version 1
  242. Group Cipher : CCMP
  243. Pairwise Ciphers (1) : CCMP
  244. Authentication Suites (1) : PSK
  245. Quality=0/100 Signal level=17/100
  246. Extra:fm=0001
  247. Cell 15 - Address: F8:2F:65:77:5A:05
  248. ESSID:""
  249. Protocol:IEEE 802.11bgn
  250. Mode:Master
  251. Frequency:2.452 GHz (Channel 9)
  252. Encryption key:on
  253. Bit Rates:144 Mb/s
  254. Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
  255. IE: IEEE 802.11i/WPA2 Version 1
  256. Group Cipher : CCMP
  257. Pairwise Ciphers (1) : CCMP
  258. Authentication Suites (1) : PSK
  259. IE: Unknown: DD230050F204104A0001101044000102100800020780103C0001011049000600372A000120
  260. Quality=0/100 Signal level=12/100
  261. Extra:fm=0001
  262. Cell 16 - Address: B0:95:8E:40:4D:59
  263. ESSID:"智诚伟业建筑劳务5.8"
  264. Protocol:IEEE 802.11bgn
  265. Mode:Master
  266. Frequency:2.462 GHz (Channel 11)
  267. Encryption key:on
  268. Bit Rates:300 Mb/s
  269. Extra:wpa_ie=dd1a0050f20101000050f20202000050f2020050f20401000050f202
  270. IE: WPA Version 1
  271. Group Cipher : TKIP
  272. Pairwise Ciphers (2) : TKIP CCMP
  273. Authentication Suites (1) : PSK
  274. Extra:
  275. IE: IEEE 802.11i/WPA2 Version 1
  276. Group Cipher : TKIP
  277. Pairwise Ciphers (2) : TKIP CCMP
  278. Authentication Suites (1) : PSK
  279. Quality=0/100 Signal level=12/100

OK,扫描热点完毕后,就可以在桌面看到所有WiFi了,然后点击自己的WiFi,输入密码连接就可以了,我的WiFi名称是  mywif:

密码输入后,就可以看到网卡的ip了:

  1. [root@centos10 wireless_tools]# ip a
  2. 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
  3. link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  4. inet 127.0.0.1/8 scope host lo
  5. valid_lft forever preferred_lft forever
  6. 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
  7. link/ether 00:0c:29:e8:89:a2 brd ff:ff:ff:ff:ff:ff
  8. inet 192.168.123.20/24 brd 192.168.123.255 scope global noprefixroute ens33
  9. valid_lft forever preferred_lft forever
  10. 3: wls35u1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
  11. link/ether 00:5c:c2:ce:dc:24 brd ff:ff:ff:ff:ff:ff
  12. inet 192.168.2.7/24 brd 192.168.2.255 scope global noprefixroute dynamic wls35u1
  13. valid_lft 604784sec preferred_lft 604784sec
  14. inet6 240e:348:371:b0b0:6bbe:33f1:30d9:88df/64 scope global noprefixroute dynamic
  15. valid_lft 7186sec preferred_lft 3586sec
  16. inet6 fe80::614:9f3:e3d3:e123/64 scope link noprefixroute
  17. valid_lft forever preferred_lft forever

查看系统日志,可以看到网卡如何连接的:

  1. Jan 15 07:45:25 centos10 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wls35u1: link becomes ready
  2. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.6671] device (wls35u1): supplicant interface state: 4-way handshake -> completed
  3. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.6671] device (wls35u1): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "mywifi"
  4. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.6671] device (p2p-dev-wls35u1): supplicant management interface state: 4-way handshake -> completed
  5. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.6672] device (wls35u1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
  6. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.6677] dhcp4 (wls35u1): activation: beginning transaction (timeout in 45 seconds)
  7. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.6693] dhcp4 (wls35u1): dhclient started with pid 15641
  8. Jan 15 07:45:25 centos10 avahi-daemon[27084]: Registering new address record for fe80::614:9f3:e3d3:e123 on wls35u1.*.
  9. Jan 15 07:45:25 centos10 dhclient[15641]: DHCPDISCOVER on wls35u1 to 255.255.255.255 port 67 interval 4 (xid=0x6756f49f)
  10. Jan 15 07:45:25 centos10 dhclient[15641]: DHCPREQUEST on wls35u1 to 255.255.255.255 port 67 (xid=0x6756f49f)
  11. Jan 15 07:45:25 centos10 dhclient[15641]: DHCPOFFER from 192.168.2.1
  12. Jan 15 07:45:25 centos10 dhclient[15641]: DHCPACK from 192.168.2.1 (xid=0x6756f49f)
  13. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8488] dhcp4 (wls35u1): address 192.168.2.7
  14. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8488] dhcp4 (wls35u1): plen 24 (255.255.255.0)
  15. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8488] dhcp4 (wls35u1): gateway 192.168.2.1
  16. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8488] dhcp4 (wls35u1): lease time 604800
  17. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8488] dhcp4 (wls35u1): nameserver '192.168.2.1'
  18. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8488] dhcp4 (wls35u1): wins '192.168.2.1'
  19. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8488] dhcp4 (wls35u1): state changed unknown -> bound
  20. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8492] device (wls35u1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
  21. Jan 15 07:45:25 centos10 avahi-daemon[27084]: Joining mDNS multicast group on interface wls35u1.IPv4 with address 192.168.2.7.
  22. Jan 15 07:45:25 centos10 avahi-daemon[27084]: New relevant interface wls35u1.IPv4 for mDNS.
  23. Jan 15 07:45:25 centos10 avahi-daemon[27084]: Registering new address record for 192.168.2.7 on wls35u1.IPv4.
  24. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8493] device (wls35u1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
  25. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8494] device (wls35u1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
  26. Jan 15 07:45:25 centos10 NetworkManager[15138]: <info> [1705275925.8508] device (wls35u1): Activation: successful, device activated.
  27. Jan 15 07:45:25 centos10 dhclient[15641]: bound to 192.168.2.7 -- renewal in 243510 seconds.
  28. Jan 15 07:45:25 centos10 dbus[978]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
  29. Jan 15 07:45:25 centos10 systemd: Starting Network Manager Script Dispatcher Service...
  30. Jan 15 07:45:25 centos10 dbus[978]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
  31. Jan 15 07:45:25 centos10 nm-dispatcher: req:1 'up' [wls35u1]: new request (4 scripts)
  32. Jan 15 07:45:25 centos10 systemd: Started Network Manager Script Dispatcher Service.
  33. Jan 15 07:45:25 centos10 nm-dispatcher: req:1 'up' [wls35u1]: start running ordered scripts...
  34. Jan 15 07:45:25 centos10 systemd: Unit iscsi.service cannot be reloaded because it is inactive.
  35. Jan 15 07:45:28 centos10 NetworkManager[15138]: <info> [1705275928.3065] dhcp6 (wls35u1): activation: beginning transaction (timeout in 45 seconds)
  36. Jan 15 07:45:28 centos10 NetworkManager[15138]: <info> [1705275928.3074] dhcp6 (wls35u1): dhclient started with pid 15674
  37. Jan 15 07:45:28 centos10 avahi-daemon[27084]: Registering new address record for 240e:348:371:b0b0:6bbe:33f1:30d9:88df on wls35u1.*.
  38. Jan 15 07:45:28 centos10 NetworkManager[15138]: <info> [1705275928.3079] policy: set 'mywifi' (wls35u1) as default for IPv6 routing and DNS
  39. Jan 15 07:45:28 centos10 avahi-daemon[27084]: Withdrawing address record for fe80::614:9f3:e3d3:e123 on wls35u1.
  40. Jan 15 07:45:29 centos10 dhclient[15674]: XMT: Info-Request on wls35u1, interval 1020ms.
  41. Jan 15 07:45:29 centos10 dhclient[15674]: RCV: Reply message on wls35u1 from fe80::1.
  42. Jan 15 07:45:29 centos10 NetworkManager[15138]: <info> [1705275929.1308] dhcp6 (wls35u1): nameserver 'fe80::1'
  43. Jan 15 07:45:29 centos10 NetworkManager[15138]: <info> [1705275929.1308] dhcp6 (wls35u1): state changed unknown -> bound
  44. Jan 15 07:45:29 centos10 nm-dispatcher: req:2 'dhcp6-change' [wls35u1]: new request (4 scripts)
  45. Jan 15 07:45:29 centos10 nm-dispatcher: req:2 'dhcp6-change' [wls35u1]: start running ordered scripts...
  46. Jan 15 07:45:29 centos10 NetworkManager[15138]: <info> [1705275929.1332] dhcp6 (wls35u1): client pid 15674 exited with status 0
  47. Jan 15 07:45:29 centos10 NetworkManager[15138]: <info> [1705275929.1332] dhcp6 (wls35u1): state changed bound -> terminated

也有网卡配置文件了,这个文件自动生成的:

  1. [root@centos10 wireless_tools]# cat /etc/sysconfig/network-scripts/ifcfg-mywifi
  2. ESSID=mywifi
  3. MODE=Managed
  4. KEY_MGMT=WPA-PSK
  5. SECURITYMODE=open
  6. MAC_ADDRESS_RANDOMIZATION=default
  7. TYPE=Wireless
  8. PROXY_METHOD=none
  9. BROWSER_ONLY=no
  10. BOOTPROTO=dhcp
  11. DEFROUTE=yes
  12. IPV4_FAILURE_FATAL=no
  13. IPV6INIT=yes
  14. IPV6_AUTOCONF=yes
  15. IPV6_DEFROUTE=yes
  16. IPV6_FAILURE_FATAL=no
  17. IPV6_ADDR_GEN_MODE=stable-privacy
  18. NAME=mywifi
  19. UUID=7a115cd8-212d-4c6c-af4d-0edf72fab737
  20. ONBOOT=yes

在查看系统日志,可以发现有一个报错,但该报错不影响网卡的使用,insmod出现loading out-of-tree module taints kernel,该报错主要是安全警示

以后在讲这些报错的处理以及内核和模块的管理工作

本例以完美实现,但奇怪的是ipv6为什么影响新网卡的模块加载,这个确实是有点让人疑惑的,有高手知道的话,可以告诉下我原因,不胜感激!!!!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/酷酷是懒虫/article/detail/991647
推荐阅读
相关标签
  

闽ICP备14008679号