1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Router or firmware limited latency?

Discussion in 'Networking Issues' started by element72, May 15, 2017.

  1. element72

    element72 Network Newbie Member

    Hi guys!

    I have been running Tomato firmware for awhile on my old Asus RT-N10P. I didn't have problems while
    gaming before, but I noticed my new roommate it causing spikes in the IP traffic graph, and it is actually affecting game latency a little bit. I noticed microstutters in game that are correlated with the spikes. I don't think I had this problem before in the past. If the spikes were just a flat constant on the graph, I would have no latency issues; I hope that better describes what is going on.

    I am also using bandwidth limiter and not QoS, because I find it troublesome to google the ports for the games I play. I am the only one connected via ethernet and everyone else is on wireless.

    I am willing to try anything, such as purchasing a better router, or flashing a new firmware.
     
  2. Sean B.

    Sean B. LI Guru Member

    I'd recommend segregating your gaming system from the other clients ( such as your roomate ) with VLANS to start. I was getting the same symptoms as yourself with my Xbox One, but not from direct bandwidth hogging., rather from all the broadcast/multicast packets and link-local traffic spewing from the computers/phones/tablets/DVR etc. Putting my Xbone and Laptop into a separate VLAN isolated them from all that chatter, haven't seen any repeated or excessive stuttering sense.

    If however, bandwidth/throughput is the culprit and the limiter for some reason isn't effective enough, an easy thing to do ( but not an automated one ) sense you're the only one connected via a wired connection would be to lower the wireless connection speeds via the routers GUI whenever you hop on to game.
     
    Last edited: May 15, 2017
  3. mstombs

    mstombs Network Guru Member

    Do you have a cable modem powered by the dreadful buggy Intel Puma 6 chipset like me? If so nothing to do with the router!

    [​IMG]
     
  4. element72

    element72 Network Newbie Member

    I put everyone on the new vlan, but can I restrict those people bandwidth? I try putting an ip range in BW limiter and it says ip is out of range.

    I'm using 10.0.0.2-25 for my own. And 172.16.0.2-25 for everyone else.
     
  5. element72

    element72 Network Newbie Member

    I don't see comcast as a selection for creating new connection
     
  6. Sean B.

    Sean B. LI Guru Member

    Did you configure a separate bridge for each VLAN? As the bridge interface is what's considered the "LAN" interface for each side. Bandwidth limiter should have a section for each LAN such as br0 and br1. If you attempt to use an IP from one in the section for another it will give that error.
     
  7. element72

    element72 Network Newbie Member

    Seems like I can only restrict the whole vlan. I am the only one on ethernet and everyone else is on wireless. I directed all WAN to go to br1. Is this what you are referring to? I wanted to give one person higher priority, but I guess I wont be able to do that. I would have to create a virtual lan interface for that person right?


    Edit: Btw will I get higher priority over those on the other vlan that was set to normal priority, despite us being on different vlans?
    [​IMG]
    [​IMG] [​IMG]


    P.S. The priority difference between 2 vlans doesn't seem to work in effect. As I was watching an HD stream on my desktop (ethernet host), there was no inbound drop on my laptop as I tested the speed.
     
    Last edited: May 20, 2017
  8. Sean B.

    Sean B. LI Guru Member

    I may be misunderstanding you, but from what you said it doesn't sound like you have the VLANS and bridges configured correctly. Could you post screenshots from the router's GUI of Basic->Network and Advanced->VLAN? The part about directing the WAN to goto br1 is especially concerning, as I take that to mean you changed the WAN port in the VLAN page to be part of the br1 bridge. If that's what you did, that is *not* correct and you need to change it back to VLAN2. VLAN2 exists with only the WAN to provide a security layer being your LAN and the internet. I try an line out the configuration in steps:

    For simplicity I'm going to use the 192.168.1.x subnet and br0 bridge as the one with only you on it, and ill use 192.168.2.x subnet and br1 bridge for everyone else.

    Basic->Network:
    br0 - IP address 192.168.1.1 - Subnet mask 255.255.255.0 - IP Range 192.168.1.100 thru 192.168.1.110

    br1 - IP address 192.168.2.1 - Subnet mask 255.255.255.0 - IP Range 192.168.2.100 through 192.168.2.150

    Advanced->VLAN
    VLAN1 - leave vid alone - Port Select ports 1 2 3 4 sense no one else uses wired, this way if you add in another connection it's already in your LAN - No tagging - No other ports selected - Default has the * meaning yes - bridge br0

    VLAN2 - leave vid alone - Only WAN port is selected - No tagging - bridge WAN

    VLAN3 - leave vid alone - No ports selected - No tagging - bridge br1

    Wireless - Bridge all wireless interfaces to br1
     
    Last edited: May 20, 2017
  9. element72

    element72 Network Newbie Member

    I believe it is configured correctly. I was trying to give someone on the new vlan higher priority, and I don't think I can do that unless I put them on another new vlan, because I want to be the only one on the original vlan.

    Edit: I did change br0 from VLAN 0 to VLAN 1, and WAN from VLAN 1 to VLAN 2. Just to keep it consistent with the guide I was following. And some of the stuff below (the notes) was a little concerning, because it says setting things to 0 uses regular or disables features.

    [​IMG]






    [​IMG]
     
    Last edited: May 20, 2017
  10. element72

    element72 Network Newbie Member

    "Bridge eth1 to LAN1 (br1)" puts all the wireless on the new vlan (see 2nd pic). That's what I meant.
     
  11. Sean B.

    Sean B. LI Guru Member

    Ok cool, yeah you got it. I wasn't quite picking up what you were explaining.
     
  12. Sean B.

    Sean B. LI Guru Member

    You should then be able to limit bandwidth however you like. For all other people you would use the br1 section of the limiter page. You can limit the entire subnet.. or just one IP.. or a range of IPs. IE 172.16.0.2 for a single IP.. or 172.16.0.2-25 for the entire configured range.. or anything in between. And you should notice now that if you try to ping a client that is on the other VLAN it does not work.. same goes visa-versa. This also goes for all the broadcast and other chatter traffic coming from anyone on that other VLAN.. it won't hit your network cards at all. Can't guarentee it will gain you a noticeable improvement, but for gaming any useless traffic you can get rid of is a good thing and it made a fair difference for me.
     
  13. element72

    element72 Network Newbie Member

    Look at the pic though. I can't do that in the section for br1. I can only configure individual hosts inside br0.
     
  14. Sean B.

    Sean B. LI Guru Member

    My bad, I dont use the limiter, I thought once enabled was checked it gave you another ip range box. That's odd that it won't take the IP's from br1. But an easy fix would be to simply switch the sections around. Make your LAN be BR1 and default, and their LAN be br0. As I assume you're only wanting to limit IP's on their side anyway.
     
    M_ars likes this.
  15. Sean B.

    Sean B. LI Guru Member

    Looking at the coding for the bandwidth limiter, I don't see any reason the GUI doesn't offer the IP specific section for each active LAN.. or at least allow valid IPs/ranges for any of the active LAN interfaces to be used. It's all just basic iptables and table lookup rules. @AndreDVJ , @kille72 , @M_ars .. anyone know why this is by chance? Am I missing something?
     
  16. AndreDVJ

    AndreDVJ Addicted to LI Member

    ~/router/rc/new_qoslimit.c generates shell script /etc/qoslimit, which does the actual job applying traffic control rules.

    Both GUI and that C code need to be modified to accomodate multiple VLAN's.

    I took the following steps:

    1) Create a new VLAN (192.168.2.0) as br1 and assign to LAN port 4.
    2) Created a new DHCP reservation for my R8000 as 192.168.2.100
    3) Connected R8000's WAN port to my main router R7000 LAN port 4.
    4) Placed R8000's IP address on the Bandwidth Limiter, despite being only for br0 and ignored the warnings.

    The shell script generated at /etc/qoslimit was modified to accomodate the new VLAN, and correct traffic control commands.

    Code:
    tc qdisc add dev br1 root handle 3: htb
    tc class add dev br1 parent 3: classid 3:1 htb rate 30000kbit
    Traffic Control rule for R8000 - Hardcoded command, and changed other bits to match br1.
    Code:
    tc class add dev br1 parent 3:1 classid 3:17 htb rate 20000kbit ceil 21000kbit prio 2
    tc qdisc add dev br1 parent 3:17 handle 17: $SFQ
    tc filter add dev br1 parent 3:0 prio 2 protocol all handle 17 fw flowid 3:17
    
    $TCAU parent 2:1 classid 2:17 htb rate 2500kbit ceil 2600kbit prio 2
    $TQAU parent 2:17 handle 17: $SFQ
    $TFAU parent 2:0 prio 2 protocol all handle 17 fw flowid 2:17
    It did what I expected, doing a Speedtest having my PC connected at my R8000:

    upload_2017-5-20_16-43-11.png

    That was a quick test. I still need to place more devices on br1 and check how they will behave.

    IP Tables and Traffic Control isn't my best understanding, but I believe all code from br0 should be expanded/retrofitted in order to gain full control for the remaining VLAN's. I have some ideas, but haven't gotten around the logic and all requirements yet.
     
    M_ars, kille72 and Sean B. like this.
  17. element72

    element72 Network Newbie Member

    Yea, I just wanted to set one person's ip with high priority. Will the priority setting work across br0 and br1? It has to right? Why else would they allow you to edit the priority in br1?
     
  18. Sean B.

    Sean B. LI Guru Member

    Depends exactly what you're referring to by priority. Both br0 and br1 can be configured individually with a blanket default priority, so those settings don't cross over.. they apply to the interfaces separately. However setting a priority by individual IP appears will only work on br0 as the way the GUI currently functions it's not allowing you to add an IP address that is outside of br0's scope.. IE an IP from br1. So there's no opportunity for priority to work across both in that sense. It may be worth trying to set priorty by MAC address however. You'd have to verify it works though because you'd be setting it under the br0 LAN section of the GUI. As long as the GUI applies the rule lines without specifying the br0 interface and only filtering by MAC then it will work. Or as I suggested before, just reconfigure the VLAN setup so you and the lan ports are in br1 and the wireless is in br0.. then your roomates will be on br0 and you can use their IPs in the GUI.

    Keep in mind, online gaming doesn't take a lot of bandwidth.. so unless you have a rather slow connection or your roomates are consistently doing large downloads/porn streaming I doubt bandwidth is causing your issue. Almost all online gaming is done using UDP, which is a "best effort" protocol unlike TCP. Therefor a bunch of small size packet chatter that doesn't take up much bandwidth can cause a drop in gaming quality because it's much easier for some of those UDP packets to get caught up in the mix and arrive out-of-order.. and when UDP packets come in out of order they are automatically dropped by the receiving end. Blocking out all the broadcast/multicast traffic from all the other clients thanks to VLANning yourself off is most likely to help.
     
    Last edited: May 21, 2017
  19. element72

    element72 Network Newbie Member

    I'm confused. Sorry, lets simplify this first. Why is there a priority setting for br1? Is it possible to set my private vlan (br0) to have higher priority over the wireless vlan (br1)? I'm not sure if I would need to do this, because I have not see any stutters so far since I configured the new vlan for wireless users. And thanks for the suggestion in the beginning about making separate vlans. It seems to have helped a lot :)
     
  20. Sean B.

    Sean B. LI Guru Member

    br0 and br1 both have a default class priority setting a long with bandwidth limits, except br0's is noted as "unlisted ip/mac default" because br0 has the option of setting per IP/mac address where br1 does not. So everyone on br1 would be subject to br1's default settings, but only IPs/MACS which you have not made a specific rule for would be subject to br0's default settings. Default class is just the priority/bandwidth limit given to any traffic on the interface that does not have a specific setting already configured for said traffic. For example, lets say you specified a high priority and no limit for each IP that is currently on br0 and a priority of low with a 5MBps download cap as default.. then a friend comes over with his Xbox and plugs into the router on br0.. your friends Xbox traffic would be subject to a low priority and max 5MBps down because the IP his Xbox would be issued is not specified for other settings. Now when talking about interface vs interface, as in br0 vs br1.. you'd simply set the default priority for br1 lower than the default priority for br0. For bandwidth you'd determine how much of your max download speed you'd want br1 to be allowed to use.. so lets say you have a 20MBps down connection.. and you want to be guaranteed 10MBps down for your personal use. You'd set the default down limit for br1 to 10MBps. That means no matter if one person is downloading on br1 or 10.. the br1 LAN can only pull 10MBps total at any given time. Hope that was a more clear explanation, and your welcome.. glad it's helping :) . I agree that you likely won't need to mess with priorities or bandwidth limits, the VLAN separation should be enough unless your roomates start going crazy with downloads.
     
    Last edited: May 21, 2017

Share This Page