What do you mean exactly by "network hub"? You really mean a hub in terms of a L2 multiplexer? I don't know exactly what you want to do, but I'd guess a bridge may fit your needs as it can act mostly like a switch. You don't need to attach a bridge to a real interface for example if you want to build a pure virtual network between Xen DomUs.
If you want more logic, e.g. a managed switch like real enterprise switching hardware you may take a look on
http://openvswitch.org/