Centos7 using a wireless WiFi connection

Source: Internet
Author: User
Tags dmesg

One: the command used

DMESG | grep firmware (see if there is a firmware request from the wireless card)

Iw

IW Dev (Find the wireless card port)

IW wls1 Link (view WLS1 network Port wireless network connection)

IW WLS1 Scan | grep SSID (View WLS1 network ports can be connected to WiFi)

Ip:

IP link set wls1 up (opens the wireless port WLS1)

IP link Show wls1 (shows wireless port WLS1 connection)

IP addr Show WLS1 (displays the assigned IP address, which is especially useful for viewing whether the IP address was successfully obtained automatically via DHCP)

Wpa_supplican:

Wpa_supplicant-b-I wlp3s0-c < (wpa_passphrase "SSID" "PSK") (Connection wireless network SSID, password PSK)

Dhclient

Dhclient wls1 (assigning IP addresses to WLS1)

To use the above command, simply replace the WLS1 directly with your own network port.


Second: The specific process:

    1. See if you need to install firmware

      Most wireless cards also require firmware. The kernel typically automatically detects and loads both, and if you get output like siocsifflags:no such file or directory, it means you have to manually load the firmware. If unsure, query the kernel log with DMESG to see if there is a firmware request from the wireless card. For example, if you have an Intel chipset, the output might be:
      # DMESG | grep firmware
      Firmware:requesting Iwlwifi-5000-1.ucode
      If there is no output, the system's wireless chip does not require firmware.

    2. To view a wireless network port:

      #iw Dev (The wireless network number is behind interface)

    3. To activate a wireless network interface:
      # IP Link Set wls1 up
      To verify that the interface is activated successfully, you can view the output of the following command:
      # IP Link Show wls1
      3:WLS1: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc MQ State down mode dormant group default Qlen + Link/et Her 00:11:22:33:44:55 BRD ff:ff:ff:ff:ff:ff
      The up in <BROADCAST,MULTICAST,UP,LOWER_UP> indicates that the interface has been successfully activated, and the subsequent state is not insignificant.

    4. To view wireless network connections:

      #iw WLS1 Link
      It should show no connection at first.

    5. Scan for Connected WiFi
      #iw WLS1 Scan | grep SSID

      Scan for available networks

    6. Connect the specified SSID
      # wpa_supplicant-b-I wlp3s0-c < (wpa_passphrase "SSID" "PSK")
      Replace the SSID with the actual network name, and the PSK with the wireless password, keep the quotation marks.

    7. To obtain IP allocations with DHCP:
      # dhclient Wlp3s0

    8. Test whether the IP was successfully acquired from the router (important)

      #ip Addr Show Wls1

      If you have IP assigned, you can surf the Internet or have a ping direct test

Centos7 using a wireless WiFi connection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.