Ask a question
Search in U-verse Forums

U-verse Forums

Reply
Highlighted
Posted Nov 23, 2008
8:20:52 PM
How To Measure Your Internet Usage Using VLANs and MRTG

With all the talk of the possible upcoming internet usage caps, I was wondering if there was a way that I could measure my own internet usage.  Although it looks like AT&T will provide us a usage meter that we can check to see the total usage on our own accounts, I wanted to see if I could measure my own usage myself as a cross-check on AT&T.

 

Some people have suggested downloading and installing a personal internet usage meter on your computer.  While this works well in single-computer environments, it doesn't solve the problem when there is more than one computer on your network.  You need a measurement system that can measure all internet traffic from all computers and internet devices.

 

A while back, I came up with a method that could measure the RG's total bandwidth usage using MRTG.  (See this thread over at UverseUsers).  However, this only showed total bandwidth, without regard to what bandwidth was being consumed by TV and what was being used by computers.  Since the proposed internet usage limits would be on computer use only, I needed a method to split the bandwidth usage statistics into IPTV and Internet.

 

To do this, I split up my network using VLAN-capable switches, and then used MRTG to measure only the computer bandwidth portion.

The switches I'm using are Netgear GS-108T switches, which can be had for only $79.00 each for an 8-port Gigabit managed switch -- a really good bargain.  The following is a diagram of my home network -- all connections throughout my network are Cat5e (no coax is used):

 

 

The trick is that the main switch (Switch 1) is uplinked to the RG twice.  Port 1 is a member of VLAN 1, which is carrying all Internet traffic, and port 2 is a member of VLAN 2, carrying IPTV traffic.  This enables MRTG to query port 1 of the switch to get traffic counters for only Internet traffic.  All IPTV traffic travels to/from the RG through port 2, so that traffic is not included in the port 1 counters.

 

The green lines on the diagram are Cat5e links that are carrying 802.1q VLAN-tagged frames.  These Ethernet frames have an additional header on them that tells the switch what VLAN they belong to.  When they get to the switch on the other end, that switch strips off the VLAN tag, and switches the packet only to the ports allowed by that VLAN.  What this essentially means is that the only place in the network where packets can go from VLAN 1 to VLAN 2 (or vice versa) is through the RG.  So, if Desktop 1 tries to ping the Office STB, the ping packet will travel all the way up to the RG and back to reach the Office STB.

 

The reason that switch 1 is uplinked to the RG twice is because the RG is not VLAN-aware.  To the RG, it looks like all 3 STBs are on port 2, and all computer hardware is on port 1.  The RG doesn't know that the network is actually mixed together.

 

The computer labeled as the video server actually runs MRTG.  It queries both the RG (for total VDSL statistics, error counts, and line sync rate/capacity) and switch 1 (to get traffic counters for IPTV and Internet off ports 1 and 2).  These parameters are graphed on the MRTG summary page (available here).

 

The final graph on that page, which shows the total Internet data transferred for the last 30 days, is generated on the fly from the MRTG log files.  If anyone is interested and wants to set this up themselves, I'll provide the source code for that (it's VBscript/ASP).

 

Here's some other examples of how data flows through the network for various functions:

 

1. Watching a live TV program on the Office STB.  Note that this traffic doesn't get counted as Internet traffic because it goes through port 2 of switch 1 (only traffic through port 1 of switch 1 gets counted by MRTG):

 

 

2. Watching a DVD from the Video Server on the Living Room XBox Media Center.  Note that this traffic doesn't get counted anywhere by MRTG because it doesn't traverse port 1 of switch 1:

 

 

3. Downloading a file from the Internet to Desktop 2.  This gets counted as Internet traffic since it flows through switch 1 port 1:

 

 

4. Now the really cool one. :smileyhappy:  Watching a recorded program from the DVR, using THDVR, from a remote location using the Slingbox.  This will get counted as Internet traffic in the upload direction as it traverses switch 1 port 1:

 

 

Now, here are some problems you may run into with the above setup:

 

1. Coax devices cannot get their traffic counted.  Now, this isn't a problem if you're only interested in counting Internet traffic.  However, if you have used the trick where you have an STB connected via coax, and then have used the Cat5e port on the STB as a bridge to a computing device, you won't be able to count the traffic from that computing device.

 

2. You cannot use the RG's built-in wireless if you want to count that traffic.  You must use an external 802.11g/n wireless access point connected to the Internet VLAN to get wireless devices' traffic counted.  This is why I have shown a wireless access point in my diagrams (I haven't installed that yet).

 

3. MRTG runs as a service, so it's required to be installed on a computer that runs 24/7. 

 

I know this setup goes beyond what many people may want to do, but I hope it gives you some ideas of what you might want to try with your network.

 

Message Edited by SomeJoe7777 on 11-24-2008 11:27 AM

With all the talk of the possible upcoming internet usage caps, I was wondering if there was a way that I could measure my own internet usage.  Although it looks like AT&T will provide us a usage meter that we can check to see the total usage on our own accounts, I wanted to see if I could measure my own usage myself as a cross-check on AT&T.

 

Some people have suggested downloading and installing a personal internet usage meter on your computer.  While this works well in single-computer environments, it doesn't solve the problem when there is more than one computer on your network.  You need a measurement system that can measure all internet traffic from all computers and internet devices.

 

A while back, I came up with a method that could measure the RG's total bandwidth usage using MRTG.  (See this thread over at UverseUsers).  However, this only showed total bandwidth, without regard to what bandwidth was being consumed by TV and what was being used by computers.  Since the proposed internet usage limits would be on computer use only, I needed a method to split the bandwidth usage statistics into IPTV and Internet.

 

To do this, I split up my network using VLAN-capable switches, and then used MRTG to measure only the computer bandwidth portion.

The switches I'm using are Netgear GS-108T switches, which can be had for only $79.00 each for an 8-port Gigabit managed switch -- a really good bargain.  The following is a diagram of my home network -- all connections throughout my network are Cat5e (no coax is used):

 

 

The trick is that the main switch (Switch 1) is uplinked to the RG twice.  Port 1 is a member of VLAN 1, which is carrying all Internet traffic, and port 2 is a member of VLAN 2, carrying IPTV traffic.  This enables MRTG to query port 1 of the switch to get traffic counters for only Internet traffic.  All IPTV traffic travels to/from the RG through port 2, so that traffic is not included in the port 1 counters.

 

The green lines on the diagram are Cat5e links that are carrying 802.1q VLAN-tagged frames.  These Ethernet frames have an additional header on them that tells the switch what VLAN they belong to.  When they get to the switch on the other end, that switch strips off the VLAN tag, and switches the packet only to the ports allowed by that VLAN.  What this essentially means is that the only place in the network where packets can go from VLAN 1 to VLAN 2 (or vice versa) is through the RG.  So, if Desktop 1 tries to ping the Office STB, the ping packet will travel all the way up to the RG and back to reach the Office STB.

 

The reason that switch 1 is uplinked to the RG twice is because the RG is not VLAN-aware.  To the RG, it looks like all 3 STBs are on port 2, and all computer hardware is on port 1.  The RG doesn't know that the network is actually mixed together.

 

The computer labeled as the video server actually runs MRTG.  It queries both the RG (for total VDSL statistics, error counts, and line sync rate/capacity) and switch 1 (to get traffic counters for IPTV and Internet off ports 1 and 2).  These parameters are graphed on the MRTG summary page (available here).

 

The final graph on that page, which shows the total Internet data transferred for the last 30 days, is generated on the fly from the MRTG log files.  If anyone is interested and wants to set this up themselves, I'll provide the source code for that (it's VBscript/ASP).

 

Here's some other examples of how data flows through the network for various functions:

 

1. Watching a live TV program on the Office STB.  Note that this traffic doesn't get counted as Internet traffic because it goes through port 2 of switch 1 (only traffic through port 1 of switch 1 gets counted by MRTG):

 

 

2. Watching a DVD from the Video Server on the Living Room XBox Media Center.  Note that this traffic doesn't get counted anywhere by MRTG because it doesn't traverse port 1 of switch 1:

 

 

3. Downloading a file from the Internet to Desktop 2.  This gets counted as Internet traffic since it flows through switch 1 port 1:

 

 

4. Now the really cool one. :smileyhappy:  Watching a recorded program from the DVR, using THDVR, from a remote location using the Slingbox.  This will get counted as Internet traffic in the upload direction as it traverses switch 1 port 1:

 

 

Now, here are some problems you may run into with the above setup:

 

1. Coax devices cannot get their traffic counted.  Now, this isn't a problem if you're only interested in counting Internet traffic.  However, if you have used the trick where you have an STB connected via coax, and then have used the Cat5e port on the STB as a bridge to a computing device, you won't be able to count the traffic from that computing device.

 

2. You cannot use the RG's built-in wireless if you want to count that traffic.  You must use an external 802.11g/n wireless access point connected to the Internet VLAN to get wireless devices' traffic counted.  This is why I have shown a wireless access point in my diagrams (I haven't installed that yet).

 

3. MRTG runs as a service, so it's required to be installed on a computer that runs 24/7. 

 

I know this setup goes beyond what many people may want to do, but I hope it gives you some ideas of what you might want to try with your network.

 

Message Edited by SomeJoe7777 on 11-24-2008 11:27 AM
0
(0)
  • Rate this reply
View profile
Solved
Mar 18, 2011 9:17:42 AM
0
(0)
Expert

The graphics from the first post were lost in the forum move a few months ago, so I'm reposting them here.

 

 

Master diagram:

 

 

1. Watching a live TV program on the Office STB.  Note that this traffic doesn't get counted as Internet traffic because it goes through port 2 of switch 1 (only traffic through port 1 of switch 1 gets counted by MRTG):

 

 

 

2. Watching a DVD from the Video Server on the Living Room XBox Media Center.  Note that this traffic doesn't get counted anywhere by MRTG because it doesn't traverse port 1 of switch 1:

 

 

 

3. Downloading a file from the Internet to Desktop 2.  This gets counted as Internet traffic since it flows through switch 1 port 1:

 

 

 

4. Now the really cool one. Smiley Happy  Watching a recorded program from the DVR, using THDVR, from a remote location using the Slingbox.  This will get counted as Internet traffic in the upload direction as it traverses switch 1 port 1:

 

 

 

Accepted Solution

How To Measure Your Internet Usage Using VLANs and MRTG

16,910 views
32 replies
(0) Me too
(0) Me too
Reply
View all replies
(32)
0
(0)
  • Rate this reply
View profile
Nov 24, 2008 1:13:39 AM
0
(0)
Mentor
Dude, I love your diagrams.  Were they done in Visio?  Would you be willing to share the original file so we can make our own diagrams of our networks?  Thanks!
Dude, I love your diagrams.  Were they done in Visio?  Would you be willing to share the original file so we can make our own diagrams of our networks?  Thanks!

Re: How To Measure Your Internet Usage Using VLANs and MRTG

2 of 33 (16,772 Views)
0
(0)
  • Rate this reply
View profile
Nov 24, 2008 6:30:36 AM
0
(0)
Guru
This is very helpful!
This is very helpful!

Re: How To Measure Your Internet Usage Using VLANs and MRTG

3 of 33 (16,772 Views)
0
(0)
  • Rate this reply
View profile
Nov 24, 2008 9:32:36 AM
0
(0)
Expert
Edited by ATTDmitriyCM on Apr 14, 2014 at 6:28:46 AM

I thought about using Visio, but I just whipped these up in Photoshop.  Basically each element is in its own layer so I could move them around while making the diagram.  If you want to downlaod the Photoshop document, it's available here.

 

I thought about using Visio, but I just whipped these up in Photoshop.  Basically each element is in its own layer so I could move them around while making the diagram.  If you want to downlaod the Photoshop document, it's available here.

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

[ Edited ]
4 of 33 (16,772 Views)
0
(0)
  • Rate this reply
View profile
Nov 24, 2008 10:30:10 AM
0
(0)
Employee
I am not sure if the individual can measure usage in a complex setup like yours. The internet, phone, and the tv are seperate streams because of QoS. Basicly they are like vlan circuits. The RG if programmed should be able to display the usage of each stream. I have no idea how or what they are doing in Reno. So knowledge wise I am in the same boat as the rest of you.
I am not sure if the individual can measure usage in a complex setup like yours. The internet, phone, and the tv are seperate streams because of QoS. Basicly they are like vlan circuits. The RG if programmed should be able to display the usage of each stream. I have no idea how or what they are doing in Reno. So knowledge wise I am in the same boat as the rest of you.
*I am an AT&T employee and the postings on this site are my own and don’t necessarily represent AT&T’s position, strategies or opinions.

Re: How To Measure Your Internet Usage Using VLANs and MRTG

5 of 33 (16,772 Views)
0
(0)
  • Rate this reply
View profile
Nov 24, 2008 11:06:17 AM
0
(0)
Master
If all your STBs are on coax and all your computers are on a seperate router behind the RG, I believe you could use this page to monitor internet usage (http://192.168.1.254/xslt?PAGE=J07).

                              

If all your STBs are on coax and all your computers are on a seperate router behind the RG, I believe you could use this page to monitor internet usage (http://192.168.1.254/xslt?PAGE=J07).

                               neon_sign.jpg

Re: How To Measure Your Internet Usage Using VLANs and MRTG

6 of 33 (16,772 Views)
0
(0)
  • Rate this reply
View profile
Nov 25, 2008 1:29:40 AM
0
(0)
Mentor

SomeJoe7777 wrote:

I thought about using Visio, but I just whipped these up in Photoshop.  Basically each element is in its own layer so I could move them around while making the diagram.  If you want to downlaod the Photoshop document, it's available here.

 


Thanks, that's great.

 

Also thanks to the other Joe for posting the link to the Console.


SomeJoe7777 wrote:

I thought about using Visio, but I just whipped these up in Photoshop.  Basically each element is in its own layer so I could move them around while making the diagram.  If you want to downlaod the Photoshop document, it's available here.

 


Thanks, that's great.

 

Also thanks to the other Joe for posting the link to the Console.

Re: How To Measure Your Internet Usage Using VLANs and MRTG

7 of 33 (16,772 Views)
0
(0)
  • Rate this reply
View profile
Nov 25, 2008 5:41:16 AM
0
(0)
Master
Edited by ATTDmitriyCM on Apr 14, 2014 at 6:18:58 AM

Holy cow, I had a T2 tech call my network "scary" because I had more than one switch in my setup. The poor guy they sent to you must have crapped his pants and jumpped out the window Smiley Very Happy

                              

Holy cow, I had a T2 tech call my network "scary" because I had more than one switch in my setup. The poor guy they sent to you must have crapped his pants and jumpped out the window Smiley Very Happy

                               neon_sign.jpg

Re: How To Measure Your Internet Usage Using VLANs and MRTG

[ Edited ]
8 of 33 (16,772 Views)
0
(0)
  • Rate this reply
View profile
Dec 4, 2008 5:06:24 AM
0
(0)
Expert
Wow! :smileysurprised:
Wow! :smileysurprised:

Re: How To Measure Your Internet Usage Using VLANs and MRTG

9 of 33 (16,772 Views)
0
(0)
  • Rate this reply
View profile
Dec 5, 2008 1:31:43 AM
0
(0)
Teacher

Kudos given!

 

Nice diagram. Nobody can done it better.

Kudos given!

 

Nice diagram. Nobody can done it better.

Re: How To Measure Your Internet Usage Using VLANs and MRTG

10 of 33 (16,772 Views)
0
(0)
  • Rate this reply
View profile
Dec 5, 2008 4:58:03 PM
0
(0)
Mentor
Nice job.
Nice job.

Re: How To Measure Your Internet Usage Using VLANs and MRTG

11 of 33 (13,373 Views)
0
(0)
  • Rate this reply
View profile
Jun 24, 2009 10:55:32 PM
0
(0)
Guru
I  maybe late on finding this thread but....... IM BLOWING MY HEAD OFF!!!! MY NOSE IS BLEEDING. Are you from what planet somejoe777??? :smileyhappy:
I  maybe late on finding this thread but....... IM BLOWING MY HEAD OFF!!!! MY NOSE IS BLEEDING. Are you from what planet somejoe777??? :smileyhappy:

Re: How To Measure Your Internet Usage Using VLANs and MRTG

12 of 33 (13,373 Views)
0
(0)
  • Rate this reply
View profile
Jun 25, 2009 2:02:08 PM
0
(0)
Professor
This is fantastic!
This is fantastic!

Re: How To Measure Your Internet Usage Using VLANs and MRTG

13 of 33 (13,373 Views)
0
(0)
  • Rate this reply
View profile
Jul 12, 2010 8:17:36 PM
0
(0)
Tutor

SomeJoe, I have 3 NetGear switches in my house, now how do I get them to run like your network? Cause sometimes I get high ping times while Online Gaming on PS3. I have a switch in my room running a STB and my PS3. Another switch is in the Living Room with the DVR and the last one is the closest to the RG with a NetGear Switch running the computer and a STB. Can you help or give me some advice??

SomeJoe, I have 3 NetGear switches in my house, now how do I get them to run like your network? Cause sometimes I get high ping times while Online Gaming on PS3. I have a switch in my room running a STB and my PS3. Another switch is in the Living Room with the DVR and the last one is the closest to the RG with a NetGear Switch running the computer and a STB. Can you help or give me some advice??

Re: How To Measure Your Internet Usage Using VLANs and MRTG

14 of 33 (13,373 Views)
0
(0)
  • Rate this reply
View profile
Jul 12, 2010 8:42:25 PM
0
(0)
Expert

First, you need to have your line profile changed (I replied to your other post) so that your line runs properly.  If the latency persists after that then we'll address it.

 

First, you need to have your line profile changed (I replied to your other post) so that your line runs properly.  If the latency persists after that then we'll address it.

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

15 of 33 (13,373 Views)
0
(0)
  • Rate this reply
View profile
Jul 12, 2010 9:04:19 PM
0
(0)
Tutor

Okay ill see what i can do. How do you contact Tier II?

Okay ill see what i can do. How do you contact Tier II?

Re: How To Measure Your Internet Usage Using VLANs and MRTG

16 of 33 (13,373 Views)
0
(0)
  • Rate this reply
View profile
Jul 12, 2010 9:08:48 PM
0
(0)
Expert

Call tech support using the number in my signature or using 1-800-ATT-2020, and ask to speak to tier 2.

 

If they can't or won't reduce your profile, contact David and his team using the information in this thread, he can help.

 

Call tech support using the number in my signature or using 1-800-ATT-2020, and ask to speak to tier 2.

 

If they can't or won't reduce your profile, contact David and his team using the information in this thread, he can help.

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

17 of 33 (13,373 Views)
0
(0)
  • Rate this reply
View profile
Solved
Mar 18, 2011 9:17:42 AM
0
(0)
Expert

The graphics from the first post were lost in the forum move a few months ago, so I'm reposting them here.

 

 

Master diagram:

 

 

1. Watching a live TV program on the Office STB.  Note that this traffic doesn't get counted as Internet traffic because it goes through port 2 of switch 1 (only traffic through port 1 of switch 1 gets counted by MRTG):

 

 

 

2. Watching a DVD from the Video Server on the Living Room XBox Media Center.  Note that this traffic doesn't get counted anywhere by MRTG because it doesn't traverse port 1 of switch 1:

 

 

 

3. Downloading a file from the Internet to Desktop 2.  This gets counted as Internet traffic since it flows through switch 1 port 1:

 

 

 

4. Now the really cool one. Smiley Happy  Watching a recorded program from the DVR, using THDVR, from a remote location using the Slingbox.  This will get counted as Internet traffic in the upload direction as it traverses switch 1 port 1:

 

 

 

The graphics from the first post were lost in the forum move a few months ago, so I'm reposting them here.

 

 

Master diagram:

 

 

1. Watching a live TV program on the Office STB.  Note that this traffic doesn't get counted as Internet traffic because it goes through port 2 of switch 1 (only traffic through port 1 of switch 1 gets counted by MRTG):

 

 

 

2. Watching a DVD from the Video Server on the Living Room XBox Media Center.  Note that this traffic doesn't get counted anywhere by MRTG because it doesn't traverse port 1 of switch 1:

 

 

 

3. Downloading a file from the Internet to Desktop 2.  This gets counted as Internet traffic since it flows through switch 1 port 1:

 

 

 

4. Now the really cool one. Smiley Happy  Watching a recorded program from the DVR, using THDVR, from a remote location using the Slingbox.  This will get counted as Internet traffic in the upload direction as it traverses switch 1 port 1:

 

 

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

18 of 33 (12,803 Views)
Solution
0
(0)
  • Rate this reply
View profile
Mar 18, 2011 9:45:01 AM
0
(0)
Scholar

How do you know if your switches are VLAN-capable.  I already have a couple but they are D-LINK and at this point, I really only need 3 switches (1 in closet with RG, one for office and one for living room).  Why buy new hardware if what I have will work Smiley Happy

How do you know if your switches are VLAN-capable.  I already have a couple but they are D-LINK and at this point, I really only need 3 switches (1 in closet with RG, one for office and one for living room).  Why buy new hardware if what I have will work Smiley Happy

Re: How To Measure Your Internet Usage Using VLANs and MRTG

19 of 33 (12,793 Views)
0
(0)
  • Rate this reply
View profile
Mar 18, 2011 11:05:25 AM
0
(0)
Expert

 


rharkness wrote:

How do you know if your switches are VLAN-capable.  I already have a couple but they are D-LINK and at this point, I really only need 3 switches (1 in closet with RG, one for office and one for living room).  Why buy new hardware if what I have will work Smiley Happy


 

You will need to get the switch model number and look on D-Link's site for the documentation and see if the switches have VLAN capability.

 

In general, for a switch to be VLAN capable, they have to be a managed switch or a "smart" switch which has a web interface where the various switching features can be configured.

 

 


rharkness wrote:

How do you know if your switches are VLAN-capable.  I already have a couple but they are D-LINK and at this point, I really only need 3 switches (1 in closet with RG, one for office and one for living room).  Why buy new hardware if what I have will work Smiley Happy


 

You will need to get the switch model number and look on D-Link's site for the documentation and see if the switches have VLAN capability.

 

In general, for a switch to be VLAN capable, they have to be a managed switch or a "smart" switch which has a web interface where the various switching features can be configured.

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

20 of 33 (12,776 Views)
0
(0)
  • Rate this reply
View profile
Mar 18, 2011 11:41:39 AM
0
(0)
Scholar

I don't think mine are VLAN compatible.  But, I have been wanting to upgrade my network.  I currently have a router/switch in my office that also has 802.11g wireless and a hub in the closet and another really old switch in the living room.

 

I'm slowly trying to get my network capable of keeping the 1000mb throughput my house in case I ever get around to building the media server I want to build  so that I can take the hundreds of DVDs I own and make them easier to access by the family (another topic).


So, I am going to start researching to see about getting VLAN compatible switches.  I personally haven't had much love for netgear of linksys and have been with D-Link for awhile now. But if they don't have it, they don't have it

I don't think mine are VLAN compatible.  But, I have been wanting to upgrade my network.  I currently have a router/switch in my office that also has 802.11g wireless and a hub in the closet and another really old switch in the living room.

 

I'm slowly trying to get my network capable of keeping the 1000mb throughput my house in case I ever get around to building the media server I want to build  so that I can take the hundreds of DVDs I own and make them easier to access by the family (another topic).


So, I am going to start researching to see about getting VLAN compatible switches.  I personally haven't had much love for netgear of linksys and have been with D-Link for awhile now. But if they don't have it, they don't have it

Re: How To Measure Your Internet Usage Using VLANs and MRTG

21 of 33 (11,639 Views)
0
(0)
  • Rate this reply
View profile
Mar 18, 2011 1:23:03 PM
0
(0)
Expert

Lowest priced D-Link I could find with VLAN capability was the DGS-1210-10P, around $250.00.

 

Dell also has the PowerConnect 2808 8-port gigabit switches for $119.

 

Lowest priced D-Link I could find with VLAN capability was the DGS-1210-10P, around $250.00.

 

Dell also has the PowerConnect 2808 8-port gigabit switches for $119.

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

22 of 33 (11,630 Views)
0
(0)
  • Rate this reply
View profile
Mar 19, 2011 8:30:07 AM
0
(0)
Mentor

Joe - 

 

I got MRTG up and running, and have all internet traffic coming off Port4 of the RG. I setup a quick and dirty index page and it's got data starting to populate.

 

http://dale.versatechnetworks.net/mrtg/

 

I'd like to add a "Total Monthly Usage" that will calculate a data count... is it possible to do that with MRTG? All my internet facing devices are off 1 switch on port 4, no other port has a non-AT&T device on it. 

 

Thanks!

 

 

Joe - 

 

I got MRTG up and running, and have all internet traffic coming off Port4 of the RG. I setup a quick and dirty index page and it's got data starting to populate.

 

http://dale.versatechnetworks.net/mrtg/

 

I'd like to add a "Total Monthly Usage" that will calculate a data count... is it possible to do that with MRTG? All my internet facing devices are off 1 switch on port 4, no other port has a non-AT&T device on it. 

 

Thanks!

 

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

23 of 33 (11,597 Views)
0
(0)
  • Rate this reply
View profile
Mar 19, 2011 10:16:38 AM
0
(0)
Expert

You can get total cumulative data with MRTG with a helper app.  One that I just so happen to have written. Smiley Happy

 

MRTG Integrator will take an MRTG log file full of data rates and integrate it over time, producing a time-integrated total.

 

Download it from the above link, unzip, and put the .exe in the MRTG bin folder (usually, C:\mrtg\bin, which is the same directory where 2WireMRTG.exe is).

 

Example configuration in the mrtg.cfg file:

 

 

Target[192.168.1.11_9]: `C:\mrtg\bin\MRTGIntegrator.exe /q /m "C:\Inetpub\MRTG\192.168.1.11_1.log"`
SetEnv[192.168.1.11_9]: MRTG_INT_IP="192.168.1.11" MRTG_INT_DESCR="Total Cumulative Internet Traffic"
MaxBytes[192.168.1.11_9]: 250000000000
AbsMax[192.168.1.11_9]: 4000000000000
Options[192.168.1.11_9]: withzeroes, gauge
YLegend[192.168.1.11_9]: Total Data (B)
ShortLegend[192.168.1.11_9]: B
Title[192.168.1.11_9]: Total Cumulative Internet Traffic
LegendI[192.168.1.11_9]: Total Downloaded Data (B)
LegendO[192.168.1.11_9]: Total Uploaded Data (B)
AddHead[192.168.1.11_9]: <link HREF="default.css" rel="stylesheet" type="text/css">
PageTop[192.168.1.11_9]: <h1>Total Cumulative Internet Traffic</h1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>Total Cumulative Internet Traffic</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>SomeJoe7777</TD></TR>
   <TR><TD>Description:</TD><TD>Total Cumulative Internet Traffic</TD></TR>
   <TR><TD>ifType:</TD>     <TD>100Mbps Ethernet</TD></TR>
   <TR><TD>ifName:</TD>     <TD>Ethernet 4</TD></TR>
   <TR><TD>Maximum:</TD>    <TD>250 GB</TD></TR>
 </TABLE>

 

 

Change the Target line to point to your MRTG log file for the Ethernet 4 interface.

 

The program will reset the totals to 0 on the 1st of the month when the /m parameter is used.

 

You can get total cumulative data with MRTG with a helper app.  One that I just so happen to have written. Smiley Happy

 

MRTG Integrator will take an MRTG log file full of data rates and integrate it over time, producing a time-integrated total.

 

Download it from the above link, unzip, and put the .exe in the MRTG bin folder (usually, C:\mrtg\bin, which is the same directory where 2WireMRTG.exe is).

 

Example configuration in the mrtg.cfg file:

 

 

Target[192.168.1.11_9]: `C:\mrtg\bin\MRTGIntegrator.exe /q /m "C:\Inetpub\MRTG\192.168.1.11_1.log"`
SetEnv[192.168.1.11_9]: MRTG_INT_IP="192.168.1.11" MRTG_INT_DESCR="Total Cumulative Internet Traffic"
MaxBytes[192.168.1.11_9]: 250000000000
AbsMax[192.168.1.11_9]: 4000000000000
Options[192.168.1.11_9]: withzeroes, gauge
YLegend[192.168.1.11_9]: Total Data (B)
ShortLegend[192.168.1.11_9]: B
Title[192.168.1.11_9]: Total Cumulative Internet Traffic
LegendI[192.168.1.11_9]: Total Downloaded Data (B)
LegendO[192.168.1.11_9]: Total Uploaded Data (B)
AddHead[192.168.1.11_9]: <link HREF="default.css" rel="stylesheet" type="text/css">
PageTop[192.168.1.11_9]: <h1>Total Cumulative Internet Traffic</h1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>Total Cumulative Internet Traffic</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>SomeJoe7777</TD></TR>
   <TR><TD>Description:</TD><TD>Total Cumulative Internet Traffic</TD></TR>
   <TR><TD>ifType:</TD>     <TD>100Mbps Ethernet</TD></TR>
   <TR><TD>ifName:</TD>     <TD>Ethernet 4</TD></TR>
   <TR><TD>Maximum:</TD>    <TD>250 GB</TD></TR>
 </TABLE>

 

 

Change the Target line to point to your MRTG log file for the Ethernet 4 interface.

 

The program will reset the totals to 0 on the 1st of the month when the /m parameter is used.

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

24 of 33 (11,571 Views)
0
(0)
  • Rate this reply
View profile
Mar 19, 2011 10:42:45 AM
0
(0)
Mentor
Edited by doctorisham on Mar 19, 2011 at 10:42:59 AM

This is great, thank you man! I truly love your work, if you ever need a tester, just let me know, I'd be more than happy. And, if you ever need some bandwidth, let me know, I have some unmetered servers I'd be happy to share.

 

So Looking at the Daily Graph:

day

http://dale.versatechnetworks.net/mrtg/192.168.1.254_3-day.png

 

Am I correct in assuming this will show the last 24 hours, consistently growing? I'd imagine this would look something like a perfect stock market, slowly rising, by the end of the first 24 hour period?

 

Is there a way to draw a 3rd plot on this graph, showing the totals of up and down?

 

Thanks again!

 

This is great, thank you man! I truly love your work, if you ever need a tester, just let me know, I'd be more than happy. And, if you ever need some bandwidth, let me know, I have some unmetered servers I'd be happy to share.

 

So Looking at the Daily Graph:

day

http://dale.versatechnetworks.net/mrtg/192.168.1.254_3-day.png

 

Am I correct in assuming this will show the last 24 hours, consistently growing? I'd imagine this would look something like a perfect stock market, slowly rising, by the end of the first 24 hour period?

 

Is there a way to draw a 3rd plot on this graph, showing the totals of up and down?

 

Thanks again!

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

[ Edited ]
25 of 33 (11,561 Views)
0
(0)
  • Rate this reply
View profile
Mar 19, 2011 11:18:39 AM
0
(0)
Expert

 


doctorisham wrote:

 

Am I correct in assuming this will show the last 24 hours, consistently growing? I'd imagine this would look something like a perfect stock market, slowly rising, by the end of the first 24 hour period?

 

Is there a way to draw a 3rd plot on this graph, showing the totals of up and down?


 

Yes, this graph will slowly grow and reset on the 1st of the next month.  You are showing the daily graph there, but I find the monthly graph gives you a great snapshot of the data.

 

Unfortunately, there is no way to draw a 3rd plot on a graph with MRTG.  The MRTG scripts are hard-coded to work with only 2 parameters per graph.

 

You could theoretically do another helper app that would return the total and then have MRTG graph that.  Now that you mention it, I might add that functionality to the Integrator with a /t switch.  Then you could just make another entry block in the MRTG.cfg file that called the integrator with the /t switch and get another graph that represents the up+down total.

 

 


doctorisham wrote:

 

Am I correct in assuming this will show the last 24 hours, consistently growing? I'd imagine this would look something like a perfect stock market, slowly rising, by the end of the first 24 hour period?

 

Is there a way to draw a 3rd plot on this graph, showing the totals of up and down?


 

Yes, this graph will slowly grow and reset on the 1st of the next month.  You are showing the daily graph there, but I find the monthly graph gives you a great snapshot of the data.

 

Unfortunately, there is no way to draw a 3rd plot on a graph with MRTG.  The MRTG scripts are hard-coded to work with only 2 parameters per graph.

 

You could theoretically do another helper app that would return the total and then have MRTG graph that.  Now that you mention it, I might add that functionality to the Integrator with a /t switch.  Then you could just make another entry block in the MRTG.cfg file that called the integrator with the /t switch and get another graph that represents the up+down total.

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

26 of 33 (11,542 Views)
0
(0)
  • Rate this reply
View profile
Mar 19, 2011 12:22:52 PM
0
(0)
Mentor
Edited by doctorisham on Mar 19, 2011 at 12:23:12 PM

That would be great, let me know if you find the time to add that ability... would be more than happy to help test it. 

 

Same goes with your next rev. of UVRT Smiley Happy

That would be great, let me know if you find the time to add that ability... would be more than happy to help test it. 

 

Same goes with your next rev. of UVRT Smiley Happy

Re: How To Measure Your Internet Usage Using VLANs and MRTG

[ Edited ]
27 of 33 (11,534 Views)
0
(0)
  • Rate this reply
View profile
Mar 20, 2011 6:00:31 AM
0
(0)
Contributor

Dude, you are so my new god.

I have dreamed the impossible dream about such a setup for so many years, and to see it not only in operation, but diagrammed and explained for the masses, it's... such a pleasure to know that someone is enjoying the wonderousness of XBMCs, slingboxen, etc...

And I'm willing to be dollars to donuts you don't have a single exposed cat5e, either... just the wires running from units to runners to switches to wall plates...

Dude, you are so my new god.

I have dreamed the impossible dream about such a setup for so many years, and to see it not only in operation, but diagrammed and explained for the masses, it's... such a pleasure to know that someone is enjoying the wonderousness of XBMCs, slingboxen, etc...

And I'm willing to be dollars to donuts you don't have a single exposed cat5e, either... just the wires running from units to runners to switches to wall plates...

Re: How To Measure Your Internet Usage Using VLANs and MRTG

28 of 33 (11,494 Views)
0
(0)
  • Rate this reply
View profile
Mar 21, 2011 1:15:57 PM
0
(0)
Expert

I have one other tool I cooked up this weekend that's useful for network monitoring:

 

MRTGPing is an executable that can return max and average round-trip ping times to MRTG for graphing.  This is useful to see if your ping time has changed due to a routing change in AT&T's network or if a router in your area is overloaded.

 

Download it from the above link, unzip, and put the .exe in the MRTG bin folder (usually, C:\mrtg\bin, which is the same directory where 2WireMRTG.exe and MRTGIntegrator.exe are).

 

Example configuration in the mrtg.cfg file:

 

 

Target[www.google.com_ping4]: `C:\mrtg\bin\MRTGPing.exe /q www.google.com`
SetEnv[www.google.com_ping4]: MRTG_INT_IP="" MRTG_INT_DESCR="Google IPv4 Ping Times"
MaxBytes[www.google.com_ping4]: 100
AbsMax[www.google.com_ping4]: 200
Options[www.google.com_ping4]: withzeroes, gauge
YLegend[www.google.com_ping4]: Ping Time (msec)
ShortLegend[www.google.com_ping4]: msec
Title[www.google.com_ping4]: Google IPv4 Ping Time
LegendI[www.google.com_ping4]: Max Ping Time (msec)
LegendO[www.google.com_ping4]: Avg Ping Time (msec)
AddHead[www.google.com_ping4]: <link HREF="default.css" rel="stylesheet" type="text/css">
PageTop[www.google.com_ping4]: <h1>Google IPv4 Ping Time</h1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>Google IPv4 Ping Time</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>SomeJoe7777</TD></TR>
   <TR><TD>Description:</TD><TD>Google IPv4 Ping Time</TD></TR>
   <TR><TD>ifType:</TD>     <TD>Gigabit Ethernet</TD></TR>
   <TR><TD>ifName:</TD>     <TD>G0</TD></TR>
   <TR><TD>Maximum:</TD>    <TD>100 msec</TD></TR>
 </TABLE>

 

 

A couple of notes on this tool:

 

• This tool is written in .Net Framework 4.0, so you need to have the 4.0 framework installed on the MRTG computer for it to work.

• On the command line, you can use a DNS name (www.google.com) or an IP address.

• The tool is fully compatible with IPv6 if you are using it on an operating system with IPv6 installed.  Example command line to test IPv6 ping times: MRTGPing.exe /q ipv6.google.com

 

On the output lines, the first line (MRTG considers that the input) is the Max ping time (out of 10 attempted pings).  The second line (MRTG considered that the output) is the Avg ping time (out of 10 attempted pings).  Pings that are lost are not considered in the average.

 

I have one other tool I cooked up this weekend that's useful for network monitoring:

 

MRTGPing is an executable that can return max and average round-trip ping times to MRTG for graphing.  This is useful to see if your ping time has changed due to a routing change in AT&T's network or if a router in your area is overloaded.

 

Download it from the above link, unzip, and put the .exe in the MRTG bin folder (usually, C:\mrtg\bin, which is the same directory where 2WireMRTG.exe and MRTGIntegrator.exe are).

 

Example configuration in the mrtg.cfg file:

 

 

Target[www.google.com_ping4]: `C:\mrtg\bin\MRTGPing.exe /q www.google.com`
SetEnv[www.google.com_ping4]: MRTG_INT_IP="" MRTG_INT_DESCR="Google IPv4 Ping Times"
MaxBytes[www.google.com_ping4]: 100
AbsMax[www.google.com_ping4]: 200
Options[www.google.com_ping4]: withzeroes, gauge
YLegend[www.google.com_ping4]: Ping Time (msec)
ShortLegend[www.google.com_ping4]: msec
Title[www.google.com_ping4]: Google IPv4 Ping Time
LegendI[www.google.com_ping4]: Max Ping Time (msec)
LegendO[www.google.com_ping4]: Avg Ping Time (msec)
AddHead[www.google.com_ping4]: <link HREF="default.css" rel="stylesheet" type="text/css">
PageTop[www.google.com_ping4]: <h1>Google IPv4 Ping Time</h1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>Google IPv4 Ping Time</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>SomeJoe7777</TD></TR>
   <TR><TD>Description:</TD><TD>Google IPv4 Ping Time</TD></TR>
   <TR><TD>ifType:</TD>     <TD>Gigabit Ethernet</TD></TR>
   <TR><TD>ifName:</TD>     <TD>G0</TD></TR>
   <TR><TD>Maximum:</TD>    <TD>100 msec</TD></TR>
 </TABLE>

 

 

A couple of notes on this tool:

 

• This tool is written in .Net Framework 4.0, so you need to have the 4.0 framework installed on the MRTG computer for it to work.

• On the command line, you can use a DNS name (www.google.com) or an IP address.

• The tool is fully compatible with IPv6 if you are using it on an operating system with IPv6 installed.  Example command line to test IPv6 ping times: MRTGPing.exe /q ipv6.google.com

 

On the output lines, the first line (MRTG considers that the input) is the Max ping time (out of 10 attempted pings).  The second line (MRTG considered that the output) is the Avg ping time (out of 10 attempted pings).  Pings that are lost are not considered in the average.

 

Re: How To Measure Your Internet Usage Using VLANs and MRTG

29 of 33 (11,460 Views)
0
(0)
  • Rate this reply
View profile
Jan 16, 2012 10:46:16 PM
0
(0)
Tutor

Dan,

 

I had a question on your network setup.  I know you have two physical connections from your main/core switch running to the RG to monitor/measure your utilization with MRTG.  However metering aside, could you conceivably just used one connection since everything is VLAN tagged?  Does bandwidth utilization get too saturated if you just used one connection?

 

Thanks for your help.

Dan,

 

I had a question on your network setup.  I know you have two physical connections from your main/core switch running to the RG to monitor/measure your utilization with MRTG.  However metering aside, could you conceivably just used one connection since everything is VLAN tagged?  Does bandwidth utilization get too saturated if you just used one connection?

 

Thanks for your help.

Re: How To Measure Your Internet Usage Using VLANs and MRTG

30 of 33 (6,459 Views)
Advanced
You must be signed in to add attachments
Share this post
Share this post