CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 2001
    Posts
    14

    Design of a hub model

    I am working on a hub model for use in a network simulator, can anyone direct me to some usefull sites on the hub behavior and how they can be implemented in c++ ?

  2. #2
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    2,236
    A hub takes input from one port and broadcasts it to all ports.

  3. #3
    Join Date
    May 2001
    Posts
    14
    it's not that simple !

    I want to know the details, like
    1- how does it know the mac address of the connected interface to one of it's ports, does it wait for an arp packet, or does it do some sort of communication with it ?
    2- does it do any buffering ? obviously it has to buffern at least the header to know where to send it , how big is that buffer ?

    3- how does it store the port and mac address combination ?

    an stuff like that , so please if anyone could direct me to where I can find that sort of information that would be great

  4. #4
    Join Date
    Feb 2002
    Posts
    4,640
    It was my impression that hubs are dumb objects, that do nothing more then "short" all the machines conencted to it, together. In other words, they have no intelligence what so ever. As mwilliamson said, they take a packet at one port, and send it out to ALL other ports. This is why your total throughput in a hub is equal to the slowest connection dividied by the number of machines connected.

    A switch, on the other hand, *does* have some intelligence, in that it directly connects only the two machines that are talking to each other.

    Is this what you want to simulate, a switch? You can prolly find some docs on the 'Net, if you search for "switch" instead of "hub".

    Viggy

  5. #5
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    2,236
    I agree, what you are describing is a switch, which only allows communication between two ports. A hub is basically as I described earlier.

  6. #6
    Join Date
    May 2001
    Posts
    14
    ok you can say that what I am looking for is a layer-2 switch , or a store and forward learning hub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured