1

The wifi that I use at a particular library has some weird issue. I have only faced the issue at this place. The IT helpdesk is not of much help and I am unable to understand the issue. This happened, every 2-3 weeks. I go there weekly 2-3 days for a couple of hours. This is also the only wifi where I have to put a new username and password every 2 hrs. The issue usually happens the first time I try to connect in a day.

Here is what happens, I see the wifi in full strength, but I am unable to connect to it. The IT guy tries connecting to the wifi via his android phone and it connects fine. Then I do the following:

  1. Wifi icon>Network Preference>Advanced>Wifi>Preferred Networks>remove the wifi from that list
  2. Restart the system
  3. Try connecting 3-4 times, then it connects successfully.

I don't understand why it does not connect immediately once I restart the system. What happens when you restart the system? Does it reset the dynamic IP I get in the network? All I can think of is that the wifi router here has some issue and I cannot do anything about it. But I would like to have a better way of solving the issue.

What I mainly want to know, is there a way I can achieve the benefit of restarting the system instead of actually restarting it. Like a command that restarts the whole wifi part without just restarting the whole system.

2

From the Wi-Fi icon the second option is Turn Wi-fi Off. Select this, wait a few seconds, then open the Wi-Fi icon again and Turn Wi-Fi On. This is how you would restart your Wi-Fi on macOS without restarting your whole computer.

Also to elaborate on your other question(s) - there are a multitude of networking policies and configurations that could be complicating this connection. The hardware itself could be out of date or possibly just full on users and you're connecting when someone drops off - there could be network policies in place that take extra time to validate your machine. The list is quite endless. If you are eventually able to connect it's likely that you'll need to work with your IT folks to figure out the specific issues - or just deal with this buggy connection - but you shouldn't need to reboot your entire machine to make this connection work. There's really not much difference in doing that vs. turning the Wi-Fi off and on again from the menu.

Good luck!

  • Turn wifi off & Turn wifi on is the first thing I did. That is of no help. The IT guy insists of restarting the system. The first time, I decided to not to restart and tried after half hr, still the same issue. – user7579349 Mar 27 '17 at 16:18
1

Restart Wifi Using Terminal

Open Terminal.app and get the Wi-Fi interface name unit by entering:

networksetup -listallhardwareports | grep "Wi-Fi" -A 1

To turn it off with the interface name found with the previous command (e.g. en0)

sudo ifconfig en0 down

and to turn on

sudo ifconfig en0 up

when you try to connect with WiFi network is there any other types of networks connected (for example Ethernet or Thunderbolt Ethernet). If yes, please remove that cable from your Mac machine and try reboot the machine it will connect to WiFi automatically (as per my observation).

  • There is nothing connected. Does the command flush the DNS? Like in windows with ipconfig /flushdns? – user7579349 Mar 28 '17 at 7:07
0

You can use below given command:

networksetup -setairportpower en0 off
networksetup -removeallpreferredwirelessnetworks en0
networksetup -setairportpower en0 on
networksetup -setdhcp Wi-Fi
networksetup -setairportnetwork en0 <WIFI-SSID> <PASSWORD>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .