Switch configuration

18 views
Skip to first unread message

Jan Novák

unread,
Apr 21, 2016, 12:08:39 AM4/21/16
to Hax Simulator

Hey, so, what are the options of configuration for the haxswitch os in Hax? And more importantly, how do I configure them in dc.groovy file? I do have basic idea from the tutorial, but it didn't say how you configure it, just that you can.

Hax Simulator

unread,
May 12, 2016, 10:20:02 AM5/12/16
to Hax Simulator
Hello,
thanks for your interest in this project.
The sample data center (https://github.com/hax-simulator/dc-sample) contains a well-commented dc.groovy file.
There is also a definition of a switch. The file can be found here: https://github.com/hax-simulator/dc-sample/blob/master/dc.groovy and the switch is called "switch1".
Basically, you just tell it the local network address range in the storage. Then, you connect the first network interface to the outside network, and all the others to the inside network.
If you have any other questions, feel free to ask.
Cheers
Mio

Jan Novák

unread,
May 13, 2016, 11:33:40 AM5/13/16
to Hax Simulator
From the tutorial, it appeared to me like there are multiple modes in which you can configure the switch.

Hax Simulator

unread,
May 16, 2016, 5:44:41 AM5/16/16
to Hax Simulator
Well, yes, a switch can also operate in a different mode than the discribed one.

Please see the API doc of the Switch kernel. The Hax API docs are located here: http://hax-simulator.github.io/framework/.
The doc for a Switch is here: http://hax-simulator.github.io/framework/soft/network/sk/hax/software/network/Switch.html

Basically, you either configure it as I wrote (this is also the preferred method).

The other method is that you don't configure it at all (so it does not even need a storage) and it "learns" the correct routing rules by itself.
This is good when you just need to test something on a local network or so, if you just need to interconnect a couple of workstations together.
It is not recommended if the switch is connected to other switches or even routers, since it stores all seen network addresses in memory.
If there is a whole subnet connected to one of the interfaces, the list of network addresses for that interface might get quite long.
Reply all
Reply to author
Forward
0 new messages