Reliable Way Of Having Both LAN And WIFI On Headless Box

Home » CentOS » Reliable Way Of Having Both LAN And WIFI On Headless Box
CentOS 13 Comments

Once again I am building a headless CentOS 7 box that needs to reliably be on both the LAN and WIFI network at all times. Amongst other things it’s going to be an AirPrint bridge enabling IPads to print to printers on a different VLAN.

I have asked about this before and got a solution working using nmtui to set up both the LAN and WIFI interface, and activate them. However, the WIFI
link is unreliable. Sometimes it doesn’t activate, or after a while de-activates. Sometimes it doesn’t even appear in nmtui to enable me to activate it.

Can anyone help me with how I can set up a more reliable server.



13 thoughts on - Reliable Way Of Having Both LAN And WIFI On Headless Box

  • Or signal interference. Where is the antennae located on the server? Ran into signal issues with antennae which were tucked behind the server before.

  • indeed, the back of a desktop or server system, sitting on the floor (or in a rack) surrounded by piles of cables, is the worst possible place for a 2.4GHz or 5.7GHz antenna

  • The server is in a rack, but the dongle is plugged in the front and is 5m from the HP Procurv AP that covers the whole of the first floor.

    A key point I thought I had included in the OP is that this is mostly a problem on startup. It does sometimes drop off during use, but mainly the problem is not being able to activate it on startup.

    I am a traditionalist and long for the days before NetworkManager when networks were much simpler to admin, and much more stable.

    Is it possible to remove NetworkManager and go back to the good old days, and still have WIFI work properly?

  • NetworkManger should work pretty nice and good as required. Just run the right cronjob every minute to make sure the connection is up or down and find out if it’s possible to reconnect. NetworkManager is kind of does all you need automatically so you should not do anything unless there is a technical issue.


  • Thanks for this. I’ll give this a try next time it happens.

    I must be getting old cos I hark back to /var/log/messages too. So much simpler

  • The server I was using was an old workstation PC that I re-used for this purpose. I have now purchased brand new kit and done a clean install.

    This box has now been running fine for a few days until this morning, when the WIFI dropped off again. To investigate this I have had a look in /var/log/messages and I have found lots of entries.

    At the bottom is where I re-activated the interface. Above that there are lots of entries where it toggles between inactive and disabled. Above that at 09:33 there is an incident, and before that all looks normal.

    I have posted the log here:

    Can someone give me a clue how to fix this.

    Also, it was suggested that I use nmcli in a cronjob to re-activate it if it drops. I can check to see if it’s still active by ‘grep’ing the IP address, but I don’t know the nmcli to re-activate an existing WIFI connection.

    Can anyone help here too, just in case I can’t fix the real problem

  • I have a wireless connection named “AndroidAP-notepro”

    So I can run

    # nmcli con show –active | grep AndroidAP-notepro AndroidAP-notepro 62d0fc1f-91b8-4c07-baf0-323cf1c108d1 802-11-wireless wlp3s0

    You can check exit code and number of lines. If number of lines is 0, it means the connection is not active and you can try to activate it and get exit code of the command

    # nmcli con up AndroidAP-notepro

    Also, it could be useful to know what value you have for
    “connection.autoconnect” for this connection. If it is yes, in theory it should automatically reactivate when it returns available.

    In my case my AndroidAP-notepro connection is to be manually activated and in fact I have

    # nmcli con show AndroidAP-notepro | grep connection.autoconnect:
    connection.autoconnect: no

    In case you also have autoconnect set to no, If you don’t have a gui you should be able to set it up with

    # nmcli con mod AndroidAP-notepro connection.autoconnect yes

    HIH, Gianluca

  • Hi Gianluca

    Thanks for this. I will put this into a cron job to bring the link back up if it drops. However, as you can see it shouldn’t ne needed. One more reason I
    hate NetworkManager

    [root@lcomp2 ~]# nmcli con show RW-WIFI |grep connection.autoconnect connection.autoconnect: yes connection.autoconnect-priority: 0
    connection.autoconnect-slaves: -1 (default)
    [root@lcomp2 ~]#


  • You could say the same thing about computers in general:
    I hate them, they automated many tasks in life and took many jobs out of the market!.


  • And they suck. All systems suck. And thanks to that I got my job.


    Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247