distinct groups and numbers from a given group are assigned to devices of a particular type and or to applications of a particular type illustratively when port numbers are assigned solely based on devices types voip phones are assigned port numbers that correspond to 0 in modulo 8 representation of the port number numbers that when divided by 8 leave a remainder of 0 computers are assigned port numbers that correspond to 1 in modulo 8 representation of the port number games are assigned port numbers that correspond to 2 modulo 8 representation of the port number etc a total of 8 different types are thus permitted correspondingly module 121 is sensitive not only to whether the port number of incoming packets belong to the preselected set of port numbers but also to the subset of port numbers to which the port number belongs that is the processing for port numbers as indicated above another approach for the soft ap assigning port numbers is based on the type of application that a connected device wishes to run and the qos class requested by the application each application can be mapped to a particular qos class e g background best effect voice and video the soft ap in cell phone 11 can then assign a nat source port number according to the qos e g 0 in modulo 8 for default qos class 1 in modulo 8 for background qos 2 in modulo 8 for best effect qos class 3 in modulo 8 for voice qos class and 4 in modulo 8 for video qos class etc if there are two or more applications with the same qos class e g voice qos class active at.