|
Example 6 (the same as example 5 but with an additional condition)
Goal You are an administrator of your office network. Your PCs have IP addresses, ranging 192.168.3.2-192.168.3.255. The office network is connected to the Internet by a NAT router running Microsoft Windows
Server 2003 (192.168.3.1). Your goal is to count the Internet-traffic for every PC of the office network. The traffic between the PCs within the office network must not be accounted. You have an additional condition:
- to count the total Internet traffic of the whole office network
- to block the Internet access for a specific PC if this PC has reached the limit of 50mb of the Internet traffic
Solution You should do the following:
- Install TrafMeter Service on a PC running a NAT router
- Choose two network adapters for the traffic capture in TrafMeter (the network adapter connected to the office network and the network adapter connected to your ISP)
- Select Active Capture Mode in TrafMeter
- Fill in the Local Address Table (LAT) with a range 192.168.3.1-192.168.3.255
- Create the filters for the traffic accounting (one filter per PC)
Note
- In this example, the traffic will be captured from 2 network adapters simultaneously. Therefore, you should avoid counting the same packet twice. To do this, the Internet traffic of the network adapter, connected to ISP will be counted using a MAC address. Let's assume that the MAC address of that adapter is 010203040506.
| Filter 1. The total Internet traffic of whole office network |
N Rule |
Type of IP protocol |
Source address |
Source port |
Destination address |
Destination port |
Both directions |
Action for packet |
Additional condition |
| 1 |
Any |
MAC: 010203040506 |
|
IP addresses of WAN |
|
Yes |
Count and Pass |
|
| Filter 2. Internet traffic of PC 192.168.3.2. |
N Rule |
Type of IP protocol |
Source address |
Source port |
Destination address |
Destination port |
Both directions |
Action for packet |
Additional condition |
| 1 |
Any |
192.168.3.2 |
|
IP addresses of WAN |
|
Yes |
Deny |
When sent or recv counter is greater than 50mb |
| 2 |
Any |
192.168.3.2 |
|
IP addresses of WAN |
|
Yes |
Count |
|
| Filter 3. Internet traffic of PC 192.168.3.3. |
N Rule |
Type of IP protocol |
Source address |
Source port |
Destination address |
Destination port |
Both directions |
Action for packet |
Additional condition |
| 1 |
Any |
192.168.3.3 |
|
IP addresses of WAN |
|
Yes |
Deny |
When sent or recv counter is greater than 50mb |
| 2 |
Any |
192.168.3.3 |
|
IP addresses of WAN |
|
Yes |
Count |
|
| Filter 4. Internet traffic of PC 192.168.3.4... |
| Filter 5. Internet traffic of PC 192.168.3.5... |
Note
- The traffic counters can be dropped to zero using TrafMeter Administrative Console or using the command line utility TrafReset.exe included in the TrafMeter package. You can schedule a launching TrafReset.exe by Windows Scheduler to obtain the daily/weekly/monthly traffic limits.
- In this example, you should not use the DHCP service to assign the IP addresses to the PCs.
- In this example, TrafMeter Service must run only on a NAT router.
|