Hardware switch or NIC brridge?



  • 0_1528404833226_noshpi network.jpg
    Hi,

    I've a small internet sharing network, please find the attached the image for connection diagram, The problem with first option was I’ve faced some latency in some Wi-Fi network, when I check speed with speed test ping time will be between 10 and 20ms. Then I came to understand more switches causes latency.

    After that I’ve installed another NIC on my pfsesne and bridged two LAN. (2nd diagram in the image). Now I’m facing a bit slow internet, ping speed is ok now, between 2 and 4 ms.

    What I’m missing now? am I right about latency and ping speed?

    Hardware switch is better than pfsense bridge?

    I was planning to install another NIC and connect the third and fourth switch in bridge.

    Let me know your thoughts

    Thanks in advance
    Thamers



  • Forgot to mention, this is the tutorial I've used to setup bridged NIC: Link

    Please let me know if any one need any more details or info.

    Thanks


  • Rebel Alliance Global Moderator

    @rayyanthameem said in Hardware switch or NIC brridge?:

    Then I came to understand more switches causes latency.

    No... Not sure where you got that tidbit of misinformation... Are you talking in the nano or microsecond range - ok maybe... Are you trying to do high frequency stock trading? If not then no you do not have to worry about any sort of latency your switch would be adding talking on your lan...

    Hardware switch is better than pfsense bridge?

    Yes, Yes and Yes - there is never going to be a time where a software bridge would be even close to what a normal hardware switch can do for speed.

    If your seeing 10-20 ms delay over a switch you have something wrong!! You mention wifi - this is where your delay is not at the switch.. To be honest if your seeing 3-4ms over your lan switching you have something wrong.. Pinging anything on your lan over normal wire should be in the 1 at most 2 ms range.. 2 is most likely just caused by whatever your pinging not answering very fast..

    0_1528453427743_pingmultipleswitchesandroute.png

    See there is less than 1ms and that is routing across pfsense with firewall rules, and going over 2 switches.. and going over the 1 switch twice.. So since the ping is RTT so time to go from device A and come back from B over 2 switches and a router/firewall is less than 1ms.. So packet was switched actually 6 times and routed twice and still like 1/2 ms..

    0_1528453938992_phypath.png

    So where did you pick up that multiple switches could cause latency like 10 or 20 ms??



  • Thanks for the replay.

    Ignore everything thing,

    when I was using the initial setup, facebook and youtube video taking longer to respond. But when i use the second setup, facebook and youtube video lods fine but when i check speed using speedtest it shows only 70-75Mbps instead of 98-102Mbps. I might used a wring terms to explain this situation sorry for that.

    I’m using this network for sharing internet in a labour camp.
    Thanks



  • Also I’ve read somewhere, if you increase the number of swithes, it will send the signal to every port and will take extra time to come back, is that right?


  • Rebel Alliance Global Moderator

    NO... Where did you read that? The only time any traffic would go out every port on a switch is if it was broadcast and those ports were in that vlan or the switch did not know where something was and was arping for it, etc.

    See my edited response - I show response time and physical path of ping with less than 1 ms, etc.



  • Ohh...
    Is there any difference in normal Switch and smb switch interms of performance? I was using the dlink 8port switch in the beginning and whole network became very slow, then I bought some smb Switch, then everything works fine. But I don’t know how the Switch performance define? The only difference i found is price, smb swithches little expensive compared to basic Switch, if you can share some thoughts on this it would be great. @johnpoz

    Thanks


  • Rebel Alliance Global Moderator

    Sure there can be difference in performance of 20$ dumb switch and and 100$+ smart switch.. But in the big picture no even the most shitty cheap dumb switch you get for $20 should not cause any delay... You should still be in the 1ms range across your lan even going over multiple dumb cheap switches.

    Is it possible you had some sort of loop or broadcast storm going on causing problem when you start connecting multiple switch and they are "dumb" sure..

    Without more info of what sort of problem you were having and how everything was connected would not be able to guess what your problem was.

    The switches in my drawing are cisco sg300's but I have some cheap soho switches on the shelf and could connect them in the same fashion and would still be in the same 1ms ballpark..



  • I’ve read all your comments, let me digest it and do some experiment and will come back to you.

    Thank you so much for the help


  • Rebel Alliance Global Moderator

    Any time - but remember there is never going to be a time where bridging a router interface is going to be faster than even the cheapest soho switch..

    I have like 3 or 4 soho switches of different brands on my shelf... Be happy to add them in the mix and get say going through 5 switches total and still in the 1ms range.

    Might do that for grins tonight.. Since I would just daisy chain then wold just be a matter of power them up and connect them to devices..



  • @rayyanthameem said in Hardware switch or NIC brridge?:

    What I’m missing now? am I right about latency and ping speed?

    One thing to bear in mind is both switches and bridges have to receive the entire frame and then retransmit it. There used to be some cut through switches, that would start switching as soon as it learned the destination MAC, but those have disappeared. With receiving and transmitting a frame, your latency is the time to receive and then transmit the entire frame, plus big of overhead. Better switches will have lower overhead, but bridging in software, as you'd be doing, has more overhead delay than a decent switch.


  • Rebel Alliance Global Moderator

    @jknott said in Hardware switch or NIC brridge?:

    There used to be some cut through switches, that would start switching as soon as it learned the destination MAC, but those have disappeared

    And there still are, the cisco nexus 5000 line did/does it... The 9000 series nexus I believe default to cut through but can be put in store and forward, etc.

    So disappeared is not true... But cut through was never in the soho or budget lines of any switch maker..