Basic understand of port shaping, prioritisation

Kompete

Expert Member
Joined
Mar 29, 2005
Messages
1,880
Reaction score
3
Hi All,

Can anyone please help me understand some 'techie' thingy's (I have some understanding, but am still confused):

Q1) What are ports?

Q2) What does port shaping/prioritisation mean? Is there a difference between the two?

Q3) What is the exact (more or less) prioritisation of ports for Telkom ADSL (say DSL 192)? So far I know in order of priority it is; http, ftp, smtp and last p2p, but what is in between?

Q3-1) What are examples of each of these 'protocols' ( if this is correct word)? e.g. I know http is normal browing, but what is smtp and where will for example MSN messenger (video chat) and Skype fall under?

Q4) Is the prioritisation of ports (referred to in Q3) different for different 'broadband' products, eg. Telkom ADSL vs Sentech vs I-Burst, etc?

Q5) Does shaping/prioritisation apply on a normal 56K Dial-up, or what determines it, e.g. ISP's? I am currently playing online blitz chess using winboard (freechess.org) and get good results from a normal dail-up and dont want to compromise this when migrating to ADSL.

Thanks
 
I'll try my best :).

a)
Ports are part of the TCP/IP protocol which governs how information are sent across the internet ... just think of them as post boxes where information is sent between machines in a known internationally recognized standard.

b)
Port shaping is simply assigning importance or priority to a port so that traffic intended for them can be preempted by those with a higher priority.

c)
Dunno.

d)
Note that protocols (UDP/TCP) and ports are not the same thing.

In Windows or Linux there is a special system file called services in the system32/drivers in the case of Windows which tells you which ports and protocols are used.

Here is a sample below

nameserver 42/tcp name #Host Name Server
nameserver 42/udp name #Host Name Server
nicname 43/tcp whois
domain 53/tcp #Domain Name Server
domain 53/udp #Domain Name Server
bootps 67/udp dhcps #Bootstrap Protocol Server
bootpc 68/udp dhcpc #Bootstrap Protocol Client
tftp 69/udp #Trivial File Transfer

These are the standard ones as defined but any software can use an undefined port (it runs from 0 till 65535) for implementing it's own communications like your chess program.

e)
They would be similiar for web browsing and email for the majority of people and to penalize the rest.

f)
Don't think so ... it is too slow anyway :).
I read that your chess program uses port 5000 ... it is probably shaped but will only effect folks who play fast moving shooter games and you should be okay unless you play very fast game of SpeedChess.
 
Last edited:
Thanks tibby.dude

I had a look at my 'system file called services in the system32/drivers', in Windows 2000, but could not see a "services" file, I did see "wasscsiport" and "sbp2port" files. And BTW how do I open them?

Anyway even if I open the file I probably won't know what it means, cause your sample above is all gibberish to me.

The Blitz chess I play is very fast chess, but not at all graphics intensive. It seems just a bit silly to me that they would shape it, perhaps I should test it(during peak hrs) with someone who has ADSL, before I make the investment.

Thanks, appreciate your answers.

I also read in another thread that MSN messenger (video chat) and Skype is p2p applications, so that partly answers Q3-1

Any takers on Q3?

Thanks y'all
 
Kompete said:
Q1) What are ports?
Think of your computer as a building, with many rooms in it (65535 in fact). Each room has a door. In the room can be any service you offer, like a web server would be in room 80. Port = Room
You can close a door (closing a port, so nothing uses it) to prevent access to it, or have a door man in place to allow access only to certain people (which is what a firewall does)

Kompete said:
Q2) What does port shaping/prioritisation mean? Is there a difference between the two?
Now going back to the building example say you only wanted access to some rooms quicker than others. So getting to those rooms has priority, thats what port priortisation does. Shaping is very similar, if not the same in every case. The only difference is not only can you say this room has priority over another room, you can also say how fast people (people = data) moves to and from that room.

Kompete said:
Q3-1) What are examples of each of these 'protocols' ( if this is correct word)? e.g. I know http is normal browing, but what is smtp and where will for example MSN messenger (video chat) and Skype fall under?
HTTP = Hypertext Transfer Protocol = Websites
HTTPS = Hypertext Transfer Protocol Secure = Secure websites, like ABSA banking
SMTP = Simple Mail Transfer Protocol = Sending email
POP3 = Post Office Protocol Version 3 = Recieving email
FTP = File Transfer Protocol = Uploading and downloading files

P2P is not a protocol. P2P is Peer to Peer, and means a technology where you connect direct to the person rather than go through a server. You get protocols on top (or that use) P2P
MSN Messenger uses it's own protocol (MSN) and Skype uses it's own protocol on top of P2P

Kompete said:
Q4) Is the prioritisation of ports (referred to in Q3) different for different 'broadband' products, eg. Telkom ADSL vs Sentech vs I-Burst, etc?
Each company chooses and sets this up themselves. Most likely they will be very similar but probebly have slight differences.

Kompete said:
Q5) Does shaping/prioritisation apply on a normal 56K Dial-up, or what determines it, e.g. ISP's? I am currently playing online blitz chess using winboard (freechess.org) and get good results from a normal dail-up and dont want to compromise this when migrating to ADSL.
It can apply to 56k, but it's up to each ISP. I know Mweb at one point did some port priortization of ISDN dialups. Never personally heard of anyone doing it to 56k though.
 
Kompete said:
I had a look at my 'system file called services in the system32/drivers', in Windows 2000
Not sure windows has one... but you can see a list at
http://www.iana.org/assignments/port-numbers

Kompete said:
I also read in another thread that MSN messenger (video chat) and Skype is p2p applications, so that partly answers Q3-1
Skype is P2P. It uses a central server to setup the actual call, and show who is online. The actual call is P2P
MSN chat is not P2P, not sure about the video though.

Kompete said:
Any takers on Q3?
Not sure if anyone actually has that knowledge outside of Telkom
 
Kompete said:
I had a look at my 'system file called services in the system32/drivers', in Windows 2000, but could not see a "services" file, I did see "wasscsiport" and "sbp2port" files. And BTW how do I open them?

Sorry major brain fade today ... look in c:\windows\system32\drivers\etc
It is a plain text file so you can use notepad to open it but don't change it.

Kompete said:
Anyway even if I open the file I probably won't know what it means, cause your sample above is all gibberish to me.

http 80/tcp www www-http #World Wide Web

It is actually easy to understand :)

http is the "service" running on tcp port 80 with an alias of www or www-http and with a comment after the # sign of "World Wide Web" naturally.

The file is not really used by Windows , just there for legacy purposes as it is used by Linux/Unix.
 
tibby.dude said:
The file is not really used by Windows , just there for legacy purposes as it is used by Linux/Unix.

Actually there for POSIX complicancy, which NT has always strived to be. Not sure on if it is or isn't though
 
DFantom said:
Actually there for POSIX complicancy, which NT has always strived to be. Not sure on if it is or isn't though

Windows don't have something like "inetd" under Unix where the services file really comes into play.

When I ported some BSD socket code over to NT and Winsock I found some of the routines were nearly the same including those that dealt with the services file.

So I kept the code the same and required that the technician modify the services file to inform the program which port it could use instead of writing a GUI config program and storing the value in the registry.
 
tibby.dude said:
The file is not really used by Windows , just there for legacy purposes as it is used by Linux/Unix.

eh, tibby. it may not be used by windows natively, but there sure is a whole bunch of apps out there that wont work if you dont specify the port's name in the services file (link back to posix days on unix). example - SAP... the gui relies heavily on the services file.
 
DFantom said:
Now going back to the building example say you only wanted access to some rooms quicker than others. So getting to those rooms has priority, thats what port priortisation does. Shaping is very similar, if not the same in every case. The only difference is not only can you say this room has priority over another room, you can also say how fast people (people = data) moves to and from that room.

good explanation mate! just one tiny correction - shaping works by doing stateful packet inspection at layer 7 of the tcp/ip stack. in other words, it doesnt necessarily look what "room" the parcel is intended for, it checks to see what is actually inside the parcel, and prioritises based on that. example - say you change your mail server and client to send over port 26 instead of port 25. port prioritisation wouldnt prioritise mail because it wouldnt know that it is mail anymore. now with l7 shapers, it wouldnt matter what port is being sent to - cos it knows whats in the parcel and prioritise anyway. good thing with this is that it stops people running p2p networks over port 25 or port 80...

as a side note - encryption wreaks havoc with shaping (the device cant see whats in the parcel), so its normally used in conjunction with port prioritisation. i know of at least one service provider in south africa that doesnt allow encypted data over their mail ports...
 
ScrnScrm said:
eh, tibby. it may not be used by windows natively, but there sure is a whole bunch of apps out there that wont work if you dont specify the port's name in the services file (link back to posix days on unix). example - SAP... the gui relies heavily on the services file.

Yep .. see my post above about inetd and my own adventures in code porting.
 
ScrnScrm said:
oops, sorry mate. posted before i refreshed da page. its late :D

Totally offtopic but you seem clued up on routers and that stuff ;).

What is your opinion on Huawei and their kit ... is it crap or good as Cisco just cheaper ???.
 
ScrnScrm said:
...

as a side note - encryption wreaks havoc with shaping (the device cant see whats in the parcel), so its normally used in conjunction with port prioritisation. i know of at least one service provider in south africa that doesnt allow encypted data over their mail ports...

Hmm that is interesting,
I dont know on what ports typical VPNs run on but this gives me an idea that ISP's would rather then throttle VPN traffic cause the dont know what protocols are in the tunnel ?

You could have a VPN with your mate in CANADA/KOREA where bandwidth is dirt cheap and have blissful p2p and they would not know ? :cool:
 
to be honest, huawei are not that bad. i inherited a couple of them to look after, post a requisition the company i work for made about 2 years ago. the IOS is almost identical to cisco, so if you know the one you pretty much know the other. think of it as a couple of generations back on the new cisco kit. they are generally fine for edge routers where you wouldnt typically want ENM cards or MPLS capabilities, just plain HDLC encapsulation and they are fine. the big negative for me though is the support - when you do have hassles, support and parts are hard to come by. in fact, last week i threw one out and replaced with a 1725 because i just couldnt get parts for the damn thing quick enough (serial card blew). so at the end of the day, i would rather just spend the extra and get the better support and functionality that comes with cisco. (especially if you are running the ACS software). but then again, its not my money :D
 
qDot said:
Hmm that is interesting,
I dont know on what ports typical VPNs run on but this gives me an idea that ISP's would rather then throttle VPN traffic cause the dont know what protocols are in the tunnel ?

You could have a VPN with your mate in CANADA/KOREA where bandwidth is dirt cheap and have blissful p2p and they would not know ? :cool:

you could try run your VPN on port 8080 or 443. Will give Telkom nightmares :-)
 
ScrnScrm said:
shaping works by doing stateful packet inspection at layer 7 of the tcp/ip stack.
Priotization is the same just on layer 4 then?

ScrnScrm said:
i know of at least one service provider in south africa that doesnt allow encypted data over their mail ports...
That might actually be for the ECT Act and the ISPA bill requirements, which state all ISP's and mail hosts must store a copy of all emails passed through their systems. If it is encrypted they can't do that, so they do not allow encrypted mail.
 
Thanks DFantom

Your analogy helps a lot. You're also the only person in this thread speaking english it seems.

cheers
 
Top
Sign up to the MyBroadband newsletter
X