I am trying to switch Wi-Fi network via the command line:
networksetup -setairportnetwork en0 corpnet01
networksetup -setairportnetwork en0 Home
where "Office" and "Home" are DHCP enabled networks. When I switch from corpnet01 to Home, everything works fine. But the other way it doesn't.
When I do it via the UI all works OK:
but when I do it in the terminal, DHCP does not manage to get an IP address:
and networksetup
says:
UM00160:~ taapega4$ networksetup -getinfo Wi-Fi
DHCP Configuration
IP address: 169.254.110.61
Subnet mask: 255.255.0.0
Router: (null)
Client ID:
IPv6: Automatic
IPv6 IP address: none
IPv6 Router: none
Wi-Fi ID: 8c:85:90:4f:41:77
What else is the UI doing that I am not doing by using the following command?
networksetup -setairportnetwork en0 corpnet01
I know that we require a certificate installed in the keychain to connect to corpnet01
.