Archive for the ‘cacti’ Category

Fiber 1.5 year later

Friday, December 23rd, 2016

So how did the fiber do after 1.5 year? Actually quite good. 0.03% lost packages (most of which happens to be me fooling around) and 1.5 ms avg latency to the ISP gateway. I could use more bandwidth, but hey, I get this for free, who am I to complain. 

FTTH via TDC HomeDuo Fiber (egen router på TDC HomeDuo Fiber)

Monday, July 13th, 2015

Finally I got FTTH. My manager at my work was cool enough to let me have FTTH by upgrading my work@home package from ADSL to Fiber. This picture shows the difference between ADSL and Fiber very well. Latency goes from 16ms to 2ms. And the packet loss is gone (the drops you see in the 2ms line is me fooling around, but about that in a moment)

fiber

Technically TDC HomeDuo fiber consists of a Raycore RC-OE1A followed by Sagem HomeBox (rebranded for TDC). The latter is geared towards mr. and ms. ignorance and is very limited to what you can actually do. To make matters even worse, my company has a special profile that locks the box down even further, making it impossible to live with if you are just a bit technical. Playing around with the setup, and wanting to go back to my beloved rt-n16 running openwrt, I had some experiments, where I played around with it, to make it work (hence the packet drops). It is actually not that hard

  • TDC FTTH uses wlan 101 for WAN
  • To get your own router online fast, I suggest using the mac address from the Sagem crap.

So to get that to work, select network in openwrt. Select switch. Enable vlan tagging. Assign  vlan 101 to port 0 (WAN) and CPU

Screenshot from 2015-07-13 14:11:59

After that is done, you select interface, select WAN (eth0.101) and press edit

interfaceUnder the advanced tab you then override the mac address if needed and it ofcourse has to start at boot

Screenshot from 2015-07-13 14:27:36

And then under physical, you bind the WAN to eth0.101

Screenshot from 2015-07-13 14:28:20

And the result of going from Sagem to openwrt is also measuable. The difference is not large in latency, but it is there. The usability of openwrt over the sagem box is however worth every hassle endured.

openwrt_over_sagemThe bandwith provided by my work is “only” 50Mbit/s. The raycore is providing/connect at 100Mbit/s, so the limit is artificial and done on the TDC equipment upstream.

Graphing data obtained from the zyxel zynos ras interface in cacti

Monday, December 27th, 2010

After a brief IRC session on ADSL and noise levels with some former colleagues, I decided to graph the line quality of my ADSL connection using cacti. This blog post will briefly explain how to graph any data that can be obtained from the zyxel zynos ras interface. The data will be graphed using cacti and this blog assumes that a working cacti installation already is running.

The task at hand can be split into two:

  1. Obtaining data from a zyxel device (a P-2602R in my case)
  2. Graphing the data in cacti

Obtaining data from a zyxel device

I attacked the first problem by doing an snmpwalk of the zyxel device. A normal consumer zyxel ADSL router like the P-2602R will export two MIB trees:

  1. The normal iso.3.6.1.2.1 tree
  2. The private iso.3.6.1.4.1.890 tree

This can be seen by doing a normal SNMP walk of the device:

edison%  snmpwalk -v1 -c public 192.168.1.1 | head -2
iso.3.6.1.2.1.1.1.0 = STRING: "P-2602R-D1A"
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.890

A quick browse of the two MIB trees made it clear that not all values and parameters inside zynos was exported through SNMP.  I had to find another way of obtaining the values that I needed.

Besides utilizing SNMP one, can make a telnet session to the zyxel device, whereby you end up at a RAS prompt. From there you can interface and control a zyxel device in great detail. You will probably need a password for this to work. Living in denmark, having telenor as my ISP,  it is actually fairly easy as I, as  a customer, has access to all the information needed, ie. ipaddress of the ADSL router, the password and port information. Using this information, I logged into the router

telnet 192.168.1.1 23023
Trying 192.168.1.1…
Connected to 192.168.1.1.
Escape character is ‘^]’.
Password: **********

Copyright (c) 1994 – 2008 ZyXEL Communications Corp.

ras>

From there it was fairly easy to find the information that I was looking for

ras> wan adsl linedata near
noise margin downstream: 22 db
output power upstream: 15 db
attenuation downstream: 12 db

Now I just needed be able to do this automatically. I used the unix tool expect in the form of the nice and easy to use Expect.pm perl module. After 15-20 minutes of coding, I ended up with a little script that will fetch whatever values from the zynos ras prompt your heart desires in one go. Example usage of the script (XXXXXXX denotes the secret password)

edison% ./query_zynos_ras.pl 192.168.1.1 23023 XXXXXXXX "wan adsl  linedata near" "noise margin downstream:" "attenuation downstream:"

noise:22 attenuation:12

Graphing the data in cacti

Now that the data collection had been scripted the data had to be graphed in cacti. This involved defining

  • a data input method
  • a data template and
  • a graph template.

Quick and dirty screendumps on how to do it:

data input method

data template

graph template

After a day or so, you get a graph like the following

From the graph I could see that my telephone line is very stable and that I should be able to get far better speeds if my current employer would pay telenor to provide it to me.