How to read iw allowed interface lists?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















I wanted to set up promiscuous Wi-Fi monitoring into Wireshark. Tried to do it like I used to with iwconfig, but this system sets me back to managed as soon as I bring the interface back up. I see online posts saying iw can add a monitor interface alongside the managed connection, so you can keep your internet alive while monitoring. Would be great, but:



[loren@Gazp9 ~]$ iw dev wlp3s0 interface add mon0 type monitor
command failed: Operation not permitted (-1)
[loren@Gazp9 ~]$ iw phy wlp3s0 interface add mon0 type monitor
command failed: No such file or directory (-2)
[loren@Gazp9 ~]$ iw phy
Wiphy phy0
[loren@Gazp9 ~]$ iw phy phy0 interface add mon0 type monitor
command failed: Operation not permitted (-1)


(That's Antergos 4.19.8-arch1-1-ARCH, if it matters.)



So I dug deeper, including
Deciphering the output of iw list valid interface combinations
here. But I'm still not sure if this means there is no hope of adding the monitor interface. Here are excerpts from my "iw phy" command response:



phy0 Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* P2P-client
* P2P-GO
* P2P-device

Supported commands:
* new_interface
(nothing about add interface)

software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* # managed <= 1, # AP, P2P-client, P2P-GO <= 1, # P2P-device <= 1,
total <= 3, #channels <= 2


Looks like I can have one monitor for sure. [And after the suggestion here to add sudo to my interface add command, I actually added the monitor interface successfully alongside my managed interface.]



But I'm still curious about:



Why isn't "add interface" listed as a supported command? I've seen it work...



What is the "software interface" monitor that can "always" be added? Isn't my "interface add" connection just software?



Maybe those two questions answer each other? If so, what is a "non-software interface"? Can I magically add actual hardware to my system by typing commands?



Why doesn't "valid interface combinations" list "monitor" at all? I have it working combined with "managed".



Maybe the response to "iw phy" is created by the people who made my Chinese hardware?



And, why in the wiki at https://wireless.wiki.kernel.org/en/users/documentation/iw
do only




sudo iw dev wlan1 station get




and




sudo iw dev wlan0 set power_save on




show the use of sudo? None of the "add" commands show it:




iw dev wlan0 interface add fish0 type monitor flags none




But this is intellectual curiosity. I'm happy to have a working monitor and get on with the real project.










share|improve this question



















  • 1





    Try to add the monitor interface as root, i.e setup sudo and use it.

    – dirkt
    Jan 15 at 7:02











  • Many thanks to dirkt! sudo iw dev wlp3s0 interface add mon0 type monitor worked immediately - mon0 existed, but Wireshark said it wasn't up. sudo ifconfig mon0 up made it connectable, and I see a torrent of WLAN packets now in Wireshark. While my usual Wi-Fi connection still works. Seems odd that I saw so many web hits showing iw set commands working without root. Even the official wiki only shows set power_save with sudo, all the other commands don't show it.

    – LorenAmelang
    Jan 17 at 2:54











  • Some iw commands actually work as non-root, but not creating a new interface (for obvious reasons). Relevant xkcd.

    – dirkt
    Jan 17 at 6:31











  • Please edit your question to reflect the current state of your inquiry, showing what you have learned (i.e., what you posted as a comment, but not including the “thanks”) and what you still want to know. Do you still have a question? Your comment makes it kind-of sort-of look like you have resolved your problem. If so, please say so explicitly.

    – G-Man
    Jan 19 at 1:29















0















I wanted to set up promiscuous Wi-Fi monitoring into Wireshark. Tried to do it like I used to with iwconfig, but this system sets me back to managed as soon as I bring the interface back up. I see online posts saying iw can add a monitor interface alongside the managed connection, so you can keep your internet alive while monitoring. Would be great, but:



[loren@Gazp9 ~]$ iw dev wlp3s0 interface add mon0 type monitor
command failed: Operation not permitted (-1)
[loren@Gazp9 ~]$ iw phy wlp3s0 interface add mon0 type monitor
command failed: No such file or directory (-2)
[loren@Gazp9 ~]$ iw phy
Wiphy phy0
[loren@Gazp9 ~]$ iw phy phy0 interface add mon0 type monitor
command failed: Operation not permitted (-1)


(That's Antergos 4.19.8-arch1-1-ARCH, if it matters.)



So I dug deeper, including
Deciphering the output of iw list valid interface combinations
here. But I'm still not sure if this means there is no hope of adding the monitor interface. Here are excerpts from my "iw phy" command response:



phy0 Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* P2P-client
* P2P-GO
* P2P-device

Supported commands:
* new_interface
(nothing about add interface)

software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* # managed <= 1, # AP, P2P-client, P2P-GO <= 1, # P2P-device <= 1,
total <= 3, #channels <= 2


Looks like I can have one monitor for sure. [And after the suggestion here to add sudo to my interface add command, I actually added the monitor interface successfully alongside my managed interface.]



But I'm still curious about:



Why isn't "add interface" listed as a supported command? I've seen it work...



What is the "software interface" monitor that can "always" be added? Isn't my "interface add" connection just software?



Maybe those two questions answer each other? If so, what is a "non-software interface"? Can I magically add actual hardware to my system by typing commands?



Why doesn't "valid interface combinations" list "monitor" at all? I have it working combined with "managed".



Maybe the response to "iw phy" is created by the people who made my Chinese hardware?



And, why in the wiki at https://wireless.wiki.kernel.org/en/users/documentation/iw
do only




sudo iw dev wlan1 station get




and




sudo iw dev wlan0 set power_save on




show the use of sudo? None of the "add" commands show it:




iw dev wlan0 interface add fish0 type monitor flags none




But this is intellectual curiosity. I'm happy to have a working monitor and get on with the real project.










share|improve this question



















  • 1





    Try to add the monitor interface as root, i.e setup sudo and use it.

    – dirkt
    Jan 15 at 7:02











  • Many thanks to dirkt! sudo iw dev wlp3s0 interface add mon0 type monitor worked immediately - mon0 existed, but Wireshark said it wasn't up. sudo ifconfig mon0 up made it connectable, and I see a torrent of WLAN packets now in Wireshark. While my usual Wi-Fi connection still works. Seems odd that I saw so many web hits showing iw set commands working without root. Even the official wiki only shows set power_save with sudo, all the other commands don't show it.

    – LorenAmelang
    Jan 17 at 2:54











  • Some iw commands actually work as non-root, but not creating a new interface (for obvious reasons). Relevant xkcd.

    – dirkt
    Jan 17 at 6:31











  • Please edit your question to reflect the current state of your inquiry, showing what you have learned (i.e., what you posted as a comment, but not including the “thanks”) and what you still want to know. Do you still have a question? Your comment makes it kind-of sort-of look like you have resolved your problem. If so, please say so explicitly.

    – G-Man
    Jan 19 at 1:29













0












0








0








I wanted to set up promiscuous Wi-Fi monitoring into Wireshark. Tried to do it like I used to with iwconfig, but this system sets me back to managed as soon as I bring the interface back up. I see online posts saying iw can add a monitor interface alongside the managed connection, so you can keep your internet alive while monitoring. Would be great, but:



[loren@Gazp9 ~]$ iw dev wlp3s0 interface add mon0 type monitor
command failed: Operation not permitted (-1)
[loren@Gazp9 ~]$ iw phy wlp3s0 interface add mon0 type monitor
command failed: No such file or directory (-2)
[loren@Gazp9 ~]$ iw phy
Wiphy phy0
[loren@Gazp9 ~]$ iw phy phy0 interface add mon0 type monitor
command failed: Operation not permitted (-1)


(That's Antergos 4.19.8-arch1-1-ARCH, if it matters.)



So I dug deeper, including
Deciphering the output of iw list valid interface combinations
here. But I'm still not sure if this means there is no hope of adding the monitor interface. Here are excerpts from my "iw phy" command response:



phy0 Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* P2P-client
* P2P-GO
* P2P-device

Supported commands:
* new_interface
(nothing about add interface)

software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* # managed <= 1, # AP, P2P-client, P2P-GO <= 1, # P2P-device <= 1,
total <= 3, #channels <= 2


Looks like I can have one monitor for sure. [And after the suggestion here to add sudo to my interface add command, I actually added the monitor interface successfully alongside my managed interface.]



But I'm still curious about:



Why isn't "add interface" listed as a supported command? I've seen it work...



What is the "software interface" monitor that can "always" be added? Isn't my "interface add" connection just software?



Maybe those two questions answer each other? If so, what is a "non-software interface"? Can I magically add actual hardware to my system by typing commands?



Why doesn't "valid interface combinations" list "monitor" at all? I have it working combined with "managed".



Maybe the response to "iw phy" is created by the people who made my Chinese hardware?



And, why in the wiki at https://wireless.wiki.kernel.org/en/users/documentation/iw
do only




sudo iw dev wlan1 station get




and




sudo iw dev wlan0 set power_save on




show the use of sudo? None of the "add" commands show it:




iw dev wlan0 interface add fish0 type monitor flags none




But this is intellectual curiosity. I'm happy to have a working monitor and get on with the real project.










share|improve this question
















I wanted to set up promiscuous Wi-Fi monitoring into Wireshark. Tried to do it like I used to with iwconfig, but this system sets me back to managed as soon as I bring the interface back up. I see online posts saying iw can add a monitor interface alongside the managed connection, so you can keep your internet alive while monitoring. Would be great, but:



[loren@Gazp9 ~]$ iw dev wlp3s0 interface add mon0 type monitor
command failed: Operation not permitted (-1)
[loren@Gazp9 ~]$ iw phy wlp3s0 interface add mon0 type monitor
command failed: No such file or directory (-2)
[loren@Gazp9 ~]$ iw phy
Wiphy phy0
[loren@Gazp9 ~]$ iw phy phy0 interface add mon0 type monitor
command failed: Operation not permitted (-1)


(That's Antergos 4.19.8-arch1-1-ARCH, if it matters.)



So I dug deeper, including
Deciphering the output of iw list valid interface combinations
here. But I'm still not sure if this means there is no hope of adding the monitor interface. Here are excerpts from my "iw phy" command response:



phy0 Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* P2P-client
* P2P-GO
* P2P-device

Supported commands:
* new_interface
(nothing about add interface)

software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* # managed <= 1, # AP, P2P-client, P2P-GO <= 1, # P2P-device <= 1,
total <= 3, #channels <= 2


Looks like I can have one monitor for sure. [And after the suggestion here to add sudo to my interface add command, I actually added the monitor interface successfully alongside my managed interface.]



But I'm still curious about:



Why isn't "add interface" listed as a supported command? I've seen it work...



What is the "software interface" monitor that can "always" be added? Isn't my "interface add" connection just software?



Maybe those two questions answer each other? If so, what is a "non-software interface"? Can I magically add actual hardware to my system by typing commands?



Why doesn't "valid interface combinations" list "monitor" at all? I have it working combined with "managed".



Maybe the response to "iw phy" is created by the people who made my Chinese hardware?



And, why in the wiki at https://wireless.wiki.kernel.org/en/users/documentation/iw
do only




sudo iw dev wlan1 station get




and




sudo iw dev wlan0 set power_save on




show the use of sudo? None of the "add" commands show it:




iw dev wlan0 interface add fish0 type monitor flags none




But this is intellectual curiosity. I'm happy to have a working monitor and get on with the real project.







wifi network-interface iw






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 20 at 5:49







LorenAmelang

















asked Jan 15 at 4:59









LorenAmelangLorenAmelang

11




11







  • 1





    Try to add the monitor interface as root, i.e setup sudo and use it.

    – dirkt
    Jan 15 at 7:02











  • Many thanks to dirkt! sudo iw dev wlp3s0 interface add mon0 type monitor worked immediately - mon0 existed, but Wireshark said it wasn't up. sudo ifconfig mon0 up made it connectable, and I see a torrent of WLAN packets now in Wireshark. While my usual Wi-Fi connection still works. Seems odd that I saw so many web hits showing iw set commands working without root. Even the official wiki only shows set power_save with sudo, all the other commands don't show it.

    – LorenAmelang
    Jan 17 at 2:54











  • Some iw commands actually work as non-root, but not creating a new interface (for obvious reasons). Relevant xkcd.

    – dirkt
    Jan 17 at 6:31











  • Please edit your question to reflect the current state of your inquiry, showing what you have learned (i.e., what you posted as a comment, but not including the “thanks”) and what you still want to know. Do you still have a question? Your comment makes it kind-of sort-of look like you have resolved your problem. If so, please say so explicitly.

    – G-Man
    Jan 19 at 1:29












  • 1





    Try to add the monitor interface as root, i.e setup sudo and use it.

    – dirkt
    Jan 15 at 7:02











  • Many thanks to dirkt! sudo iw dev wlp3s0 interface add mon0 type monitor worked immediately - mon0 existed, but Wireshark said it wasn't up. sudo ifconfig mon0 up made it connectable, and I see a torrent of WLAN packets now in Wireshark. While my usual Wi-Fi connection still works. Seems odd that I saw so many web hits showing iw set commands working without root. Even the official wiki only shows set power_save with sudo, all the other commands don't show it.

    – LorenAmelang
    Jan 17 at 2:54











  • Some iw commands actually work as non-root, but not creating a new interface (for obvious reasons). Relevant xkcd.

    – dirkt
    Jan 17 at 6:31











  • Please edit your question to reflect the current state of your inquiry, showing what you have learned (i.e., what you posted as a comment, but not including the “thanks”) and what you still want to know. Do you still have a question? Your comment makes it kind-of sort-of look like you have resolved your problem. If so, please say so explicitly.

    – G-Man
    Jan 19 at 1:29







1




1





Try to add the monitor interface as root, i.e setup sudo and use it.

– dirkt
Jan 15 at 7:02





Try to add the monitor interface as root, i.e setup sudo and use it.

– dirkt
Jan 15 at 7:02













Many thanks to dirkt! sudo iw dev wlp3s0 interface add mon0 type monitor worked immediately - mon0 existed, but Wireshark said it wasn't up. sudo ifconfig mon0 up made it connectable, and I see a torrent of WLAN packets now in Wireshark. While my usual Wi-Fi connection still works. Seems odd that I saw so many web hits showing iw set commands working without root. Even the official wiki only shows set power_save with sudo, all the other commands don't show it.

– LorenAmelang
Jan 17 at 2:54





Many thanks to dirkt! sudo iw dev wlp3s0 interface add mon0 type monitor worked immediately - mon0 existed, but Wireshark said it wasn't up. sudo ifconfig mon0 up made it connectable, and I see a torrent of WLAN packets now in Wireshark. While my usual Wi-Fi connection still works. Seems odd that I saw so many web hits showing iw set commands working without root. Even the official wiki only shows set power_save with sudo, all the other commands don't show it.

– LorenAmelang
Jan 17 at 2:54













Some iw commands actually work as non-root, but not creating a new interface (for obvious reasons). Relevant xkcd.

– dirkt
Jan 17 at 6:31





Some iw commands actually work as non-root, but not creating a new interface (for obvious reasons). Relevant xkcd.

– dirkt
Jan 17 at 6:31













Please edit your question to reflect the current state of your inquiry, showing what you have learned (i.e., what you posted as a comment, but not including the “thanks”) and what you still want to know. Do you still have a question? Your comment makes it kind-of sort-of look like you have resolved your problem. If so, please say so explicitly.

– G-Man
Jan 19 at 1:29





Please edit your question to reflect the current state of your inquiry, showing what you have learned (i.e., what you posted as a comment, but not including the “thanks”) and what you still want to know. Do you still have a question? Your comment makes it kind-of sort-of look like you have resolved your problem. If so, please say so explicitly.

– G-Man
Jan 19 at 1:29










1 Answer
1






active

oldest

votes


















0














(As the asker didn't write his own answer:)



Add the monitor interface as root, i.e setup sudo and use it.



Judging from the comment, this seems to have worked:




sudo iw dev wlp3s0 interface add mon0 type monitor 


worked immediately - mon0 existed, but Wireshark said it wasn't up.



sudo ifconfig mon0 up 


made it connectable, and I see a torrent of WLAN packets now in Wireshark.







share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f494533%2fhow-to-read-iw-allowed-interface-lists%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    (As the asker didn't write his own answer:)



    Add the monitor interface as root, i.e setup sudo and use it.



    Judging from the comment, this seems to have worked:




    sudo iw dev wlp3s0 interface add mon0 type monitor 


    worked immediately - mon0 existed, but Wireshark said it wasn't up.



    sudo ifconfig mon0 up 


    made it connectable, and I see a torrent of WLAN packets now in Wireshark.







    share|improve this answer



























      0














      (As the asker didn't write his own answer:)



      Add the monitor interface as root, i.e setup sudo and use it.



      Judging from the comment, this seems to have worked:




      sudo iw dev wlp3s0 interface add mon0 type monitor 


      worked immediately - mon0 existed, but Wireshark said it wasn't up.



      sudo ifconfig mon0 up 


      made it connectable, and I see a torrent of WLAN packets now in Wireshark.







      share|improve this answer

























        0












        0








        0







        (As the asker didn't write his own answer:)



        Add the monitor interface as root, i.e setup sudo and use it.



        Judging from the comment, this seems to have worked:




        sudo iw dev wlp3s0 interface add mon0 type monitor 


        worked immediately - mon0 existed, but Wireshark said it wasn't up.



        sudo ifconfig mon0 up 


        made it connectable, and I see a torrent of WLAN packets now in Wireshark.







        share|improve this answer













        (As the asker didn't write his own answer:)



        Add the monitor interface as root, i.e setup sudo and use it.



        Judging from the comment, this seems to have worked:




        sudo iw dev wlp3s0 interface add mon0 type monitor 


        worked immediately - mon0 existed, but Wireshark said it wasn't up.



        sudo ifconfig mon0 up 


        made it connectable, and I see a torrent of WLAN packets now in Wireshark.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 20 at 8:30









        dirktdirkt

        16.9k21336




        16.9k21336



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f494533%2fhow-to-read-iw-allowed-interface-lists%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)