How to create an infrastructure Wi-Fi network from Yosemite with no Internet connection? How to create a Wi-Fi hotspot (infrastructure network, not ad-hoc) on a Mac without any Internet connection?

In Windows, we can easily create an infrastructure wifi LAN hotspot with:

netsh wlan set hostednetwork mode=allow ssid=MyWifi key=12345678
netsh wlan start hostednetwork


It is compatible with most devices like Android/Windows/Mac/iOS, and it does not require an available Internet connection.

So, is there a similar solution on OS X 10.10 (Yosemite) that:


can create a Wi-Fi hotspot;
compatible with most devices;
does not require an Internet connection?
In System Preferences, go to networking and connect your Mac to a wired network. Firewire or thunderbolt or ethernet (with or without an adapter) is needed to have a physical connection in the green or orange state. You need a link up and not necessarily a viable connection to any network.

Then go into Sharing and enable Internet Sharing, there, share the connection of something you aren't using (say, for example, thunderbolt ethernet) then other computers can connect to it as if it was a WiFi hotspot and features that use LAN will work perfectly fine. If that LAN has a route to the internet it will work

This method allows OS X to act as a software router and avoids the wireless network being created in an ad-hoc mode with it's limitations.