Actually, I used "alias" only to simplify things.
If you declare a network interface with an "alias", what it internally does is create a so-called access point bound to the network interface.
An access point is something like a named external connector within the data center, which is bound to a device (network interface).
The link uses the name of the access point to connect to the correct local network interface.
In fact, this is also how the GUI connects with the terminals of machines declared in the data center.
Every terminal() creates a pair of keyboard and display for the given machine, and creates an access point bound to these two devices with its name equal to the machine name.
For more info, see the Hax API docs here:
http://hax-simulator.github.io/framework/The doc for an access point is here:
http://hax-simulator.github.io/framework/hax/sk/hax/cloud/AccessPoint.htmlTo answer your question, since an access point is an external entity, it is intended to be used when connecting external components to the core data center. Thus, in dc.groovy (the core data center configuration) you can't use access point names to reference stuff. You can only use access point names in dclink.groovy (the link component configuration) and dcgui.groovy (the GUI component configuration).
I hope this is somewhat understandable, although it is quite a dive in the internals of Hax.
As for network address configuration, Hax does not have a component such as DHCP, so it would have to be created. You would have to create both the server and the client part.
The server part would maintain a table of assigned and free addresses, and assign an address upon request. The client part would ask the server for a free address, then use the setNetworkAddress kernel API call to set the network address of the machine.
In reality, DHCP is really only used within LANs. On higher levels of the network, there are registrators which assign address ranges to requesting organizations (ISP, corporations etc.). If you wanted to connect more people, you would have to do the same.
You would basically set up a high level router. For every person who would like to connect, you would have to add a network interface to the router and assign it a network address range. Then, using the link functionality, the person could connect their data center to your router. The layout of his data center can be arbitrary - just a single workstation, a switch with multiple workstations, a router with even more subnets, a network hidden behind a NAT device (
http://hax-simulator.github.io/framework/soft/network/sk/hax/software/network/NetworkAddressTranslator.html)... the possibilities are virtually endless.
An important thing is that you need to select your network address space wisely. I would recommend choosing a /16 range, so that other "ISPs" might connect easily to your network in the future.
What you want to do is something I wanted to try out for quite some time, but unfortunately I don't have a server for it.
If you need help with the configuration or would like to test it with someone, I am around.
We might even try out the new SSL link functionality, which is IMO quite essential with higher amounts of various people.
You can also contact me via hangouts so we can communicate more effectively. Email will also do of course.