Please limit port range

xnorxnor Join Date: 2013-09-06 Member: 187916Members, Reinforced - Gold
Hey,

I am really fed up with servers that set to port to something seemingly completely random.

I've set up QoS in my network and it works extremely well, but only if the game doesn't keep changing its ports all over the place. But thats exactly the case with NS2 servers.
Standard range, afaik, is 27000 to 27015 (+1). It would be fine if NS2 extended this range to 27050, but right now I see servers with ports like 14000!

So my ping is of course crap...

Please, server admins consider this, or devs please add a warning or something to the port switch if outside of the standard range. Thank you!


Comments

  • Omega_K2Omega_K2 Join Date: 2011-12-25 Member: 139013Members, Reinforced - Shadow
    edited September 2013
    Every single decent server application has the ablity to change port for the reason that a port might already be in use. There is no standard range and neither should there be one.

    Correct solution to this problem is to allow setting of a __client__ port, so you can QoS on the origin port(s) or QoS with deep packet inspection to dynamically do QoS for ns2.
  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    edited September 2013
    You have to know that 27015 is the default hl2 port. On the one side it is good for the client to reuse it, but now should admins do if a servers running ns2 next to hl , tf2 , cs and more ... So i wouldn't set a fixed port range. Moreover 80% of the ns2 server use a port between 27000 and 27050
  • VanesyraVanesyra Join Date: 2013-09-02 Member: 187705Members
    You can look up the server port before joining by right clicking on the server on the server list. So don't join a server if you don't like it's port.

    You simply can't force a admin to use a port within a given and so small range. Especially not only because some users may have played around with their local network settings. This is more or less equal to the request "Do not allowed servers to be outside the usa, because I have high ping on europe servers.". They pay for the servers, so if you do not like what they do there, don't go there.

    What kind of network you got that you think you have to set a QoS rule to play NS2? If you are not file sharing with caped up and download at the same time, or doing anything else equal to this, you should not need that at all...
  • xnorxnor Join Date: 2013-09-06 Member: 187916Members, Reinforced - Gold
    edited September 2013
    Omega_K2 wrote: »
    Every single decent server application has the ablity to change port for the reason that a port might already be in use. There is no standard range and neither should there be one.
    Correct solution to this problem is to allow setting of a __client__ port, so you can QoS on the origin port(s) or QoS with deep packet inspection to dynamically do QoS for ns2.
    That's simply wrong. There is a standard range for various reasons and QoS is one of them.
    Yes, 27000 might already be in use, which is why there is a range of ports available. But I regularly see servers using ports far outside that range.

    Client ports are not a solution since any client can use almost any port for any application and therefore use whatever QoS class it likes - not how it's supposed to work.
    Server ports are fixed for all other games and applications I do QoS with .. and it works perfectly.

    Deep packet inspection is not an option since I don't want to stress the router further and also don't want to depend on an application layer protocol (which might change btw). There might also be a problem with connection tracking, depending on the protocol, which may make this impossible.


    You have to know that 27015 is the default hl2 port. On the one side it is good for the client to reuse it, but no would should admins do at servers running ns2 next to hl , tf2 , cs and more ...
    Even if each game server required two consecutive ports I hardly doubt that anyone is running more than 8 different server on one IP (27000 - 27015).
    With the range extended to 27050 even 25 different servers.

  • lwflwf Join Date: 2006-11-03 Member: 58311Members, Constellation
    Restricting server port is a terrible idea. Ever heard of NAT? It's not even possible to do. You would have to restrict the client from connecting to other ports than the decided upon range for it to work, but I'm not suggesting that, it's still a terrible idea.

    What you're looking for is in fact the ability to set a static source port. This worked great for Team Fortress 2. Instead of a random source port it selects port 27005 as the client source port if available (and it usually is, you seldom run more than one copy of a game on a single machine...), otherwise 27006 etc. NS2 is already all Half-Life/Source/Quakey and uses 27015 as the default server port, so it might as well go all the way and use 27005 as a client port. That one is sure to be picked up by home routers that claim to have automatic QoS on the box! Otherwise a startup argument for client port would be sweet.
  • xnorxnor Join Date: 2013-09-06 Member: 187916Members, Reinforced - Gold
    lwf wrote: »
    Restricting server port is a terrible idea. Ever heard of NAT? It's not even possible to do. You would have to restrict the client from connecting to other ports than the decided upon range for it to work, but I'm not suggesting that, it's still a terrible idea.

    Do you know what NAT is? It's usually used to hide the IP address space of the network the client is in, which doesn't have anything to do with what I'm talking about. I'm talking about server ports.

    Servers that are behind firewalls may have to use DNAT, but again I don't see a problem. Why do you think it's impossible? It's trivial to set up and has to be done regardless of the port range anyway if you're behind a firewall.

    lwf wrote: »
    What you're looking for is in fact the ability to set a static source port.
    As I wrote before, any application could use a port in that range for any protocol and therefore circumvent QoS rules ... that's why it's usually done based on server ports in the first place.

    I don't want a hard restriction on the port range, but maybe a warning if the server port is outside the range.

    Btw: Just tried to play on UWE official server ... port 28015 ... unplayable.


  • lwflwf Join Date: 2006-11-03 Member: 58311Members, Constellation
    It means servers can change the port even if you restrict it in the server software. Therefore it's impossible to restrict.

    P2P software uses "server ports" all over the place. Why do you even need QoS? If it's because you got BitTorrent running on your connection then there's nothing preventing peers from using your game ports, even over UDP.

    Either way, your need is way too special to bother players or admins with any restrictions or warnings.
  • xnorxnor Join Date: 2013-09-06 Member: 187916Members, Reinforced - Gold
    edited September 2013
    lwf wrote: »
    It means servers can change the port even if you restrict it in the server software. Therefore it's impossible to restrict.
    I don't want to take the ability from admins to change the port, just make them more aware of what they are doing. I'd guess that most admins have no idea that setting the port randomly is not a good idea, hence my suggestion of a warning when changing the port to outside a standard range.


    lwf wrote: »
    P2P software uses "server ports" all over the place. Why do you even need QoS? If it's because you got BitTorrent running on your connection then there's nothing preventing peers from using your game ports, even over UDP.
    Because I'm in a private network with multiple people who share the internet connection. Someone downloading a file over HTTP causes lag spikes without QoS. Someone sending an email with a large attachement even causes timeouts.

    With QoS I can play (other) games with <50 ms while others can up/download at almost full speed.

    lwf wrote: »
    Either way, your need is way too special to bother players or admins with any restrictions or warnings.
    There is nothing special about it. I just want admins to know what they are doing when they're changing the port.



    Anyway: for the time being, I will only be playing on servers using ports in the range 27000 - 27015 with nice ping. Unfortunately that's trial and error since the port is only shown on connect in the console...

    It works for every other game so far, ranging from guild wars to counter strike .... why shouldn't it work for ns2?
  • lwflwf Join Date: 2006-11-03 Member: 58311Members, Constellation
    The port is also visible if you right click on a server in the browser.
  • xnorxnor Join Date: 2013-09-06 Member: 187916Members, Reinforced - Gold
    Indeed, that helps a bit choosing.
  • SeeVeeSeeVee Join Date: 2012-10-31 Member: 165206Members
    sounds like you need more upstream bandwidth... what are you on DSL? If so most DSL has crap upload speeds, even as low as 256K or worse.
  • DavilDavil Florida, USA Join Date: 2012-08-14 Member: 155602Members, Constellation
    You can set a port for the server to use though... That's a GOOD things, say for example you wanted to run more than one server off the same physical machine, you'd need separate ports. I know this doesn't SEEM practical but there are servers that you can rent out and that's how they do it. The NS2 itself is setup to use 27015 and 27016 as default, and I'm not particularly sure why this has anything to do with you. It's pretty unlikely you'd run into an issue with this considering how many ports are available. Unless someone set their server to use one of the 250 well known ports like 21 or something probably not going to have an issue, hell I think you can use 666 now since I doubt anyone is really playing old school Doom anymore. If this is really causing you a lot of issues, you can set up a rules on most firewalls for not only specific ports but specific applications. So instead of setting a port as open, just set the application to allow any port.
  • cArNaGej2cArNaGej2 Join Date: 2003-03-26 Member: 14905Members, Reinforced - Shadow
    SeeVee wrote: »
    sounds like you need more upstream bandwidth... what are you on DSL? If so most DSL has crap upload speeds, even as low as 256K or worse.

    I know this is an old thread but... I'm sure is speeds could be slow by some peoples thoughts. But that is exactly why he is using QOS.

    xnor: What are you using for QOS? Does it allow for Priority based on IP address? I was using Gargoyle Router firmware for its QOS. It's quite good and lets you configure to Ip or port.
    Currently I'm running ClearOS which I don't recommend for QOS. I only started running it for its Dual Wan capability which is broken so I keep everyone on one connection, while I hog the other one. :)

  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    edited November 2013
    Davil wrote: »
    You can set a port for the server to use though... That's a GOOD things, say for example you wanted to run more than one server off the same physical machine, you'd need separate ports.

    Or separate ip addresses.

    Also why not just apply the QOS on a MAC id level. Just make it so all traffic regardless of what it is that comes from your server box gets priority over everything else.
Sign In or Register to comment.