Run wireshark =========================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Version Info ` * :ref:`Run wireshark ` * :ref:`STEP 1: Install wireshark ` * :ref:`STEP 2: Set wlan2 to monitor mode ` * :ref:`STEP 3: Check wireless interface status ` * :ref:`STEP 4: Check iw dev output ` * :ref:`STEP 5: Run wireshark ` * :ref:`STEP 6: Select wlan2 inteface ` .. _barelinux_x86-64_wi-fi_STA_and_AP_with_mac80211_hwsim_step2_1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * How to run wireshark .. _barelinux_x86-64_wi-fi_STA_and_AP_with_mac80211_hwsim_step2_2: .. tab-set:: .. tab-item:: Version Info =============================== ======================================= # Version =============================== ======================================= Wireshark 3.6.2 Ubuntu Ubuntu 22.04 64 bit Linux Kernel 6.5.0 =============================== ======================================= .. _barelinux_x86-64_wi-fi_STA_and_AP_with_mac80211_hwsim_step2_3: .. tab-set:: .. tab-item:: How to run wireshark .. _barelinux_x86-64_wi-fi_STA_and_AP_with_mac80211_hwsim_step2_4: .. tab-set:: .. tab-item:: STEP 1: Install wireshark * Make sure internet is available in laptop to download wireshark package .. code-block:: shell test:~$ sudo apt-get update test:~$ sudo apt-get install wireshark .. _barelinux_x86-64_wi-fi_STA_and_AP_with_mac80211_hwsim_step2_5: .. tab-set:: .. tab-item:: STEP 2: Set wlan2 to monitor mode * Set wlan2 interface to monitor mode .. code-block:: shell test:~$ sudo iw dev wlan2 set type monitor * Bring up wlan2 interface .. code-block:: shell test:~$ sudo ifconfig wlan2 up * Set the wlan2 interface to channel 6,because in hostapd configuration file the channel is set to 6. .. code-block:: shell test:~$ sudo iw dev wlan2 set channel 6 .. _barelinux_x86-64_wi-fi_STA_and_AP_with_mac80211_hwsim_step2_6: .. tab-set:: .. tab-item:: STEP 3: Check wireless interface status .. code-block:: shell test:~$ sudo iwconfig wlan2 wlan2 IEEE 802.11 Mode:Monitor Frequency:2.437 GHz Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off .. _barelinux_x86-64_wi-fi_STA_and_AP_with_mac80211_hwsim_step2_7: .. tab-set:: .. tab-item:: STEP 4: Check iw dev output .. code-block:: shell test:~$ sudo iw dev phy#2 Interface wlan2 ifindex 17 wdev 0x600000001 addr 02:00:00:00:02:00 type monitor channel 6 (2437 MHz), width: 20 MHz (no HT), center1: 2437 MHz txpower 20.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 phy#1 Interface wlan1 ifindex 16 wdev 0x500000001 addr 02:00:00:00:01:00 type managed txpower 20.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 phy#0 Interface wlan0 ifindex 15 wdev 0x400000001 addr 02:00:00:00:00:00 type managed txpower 20.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 .. _barelinux_x86-64_wi-fi_STA_and_AP_with_mac80211_hwsim_step2_8: .. tab-set:: .. tab-item:: STEP 5: Run wireshark .. code-block:: shell test:~$ sudo wireshark .. _barelinux_x86-64_wi-fi_STA_and_AP_with_mac80211_hwsim_step2_9: .. tab-set:: .. tab-item:: STEP 6: Select wlan2 interface * Double click on wlan2 inteface to capture the packets .. image:: wireshark_image.png :alt: Diagram :width: 900 :height: 400