Monthly Archives: April 2012

Using Debian Linux on IOMEGA StorCenter Pro IX-12

Monitoring and fine tuning

In the previous post I covered process of the replacing buggy closed-source firmware with the Debian Linux on the  IOMEGA StorCenter Pro IX-12 NAS device. But for effective and reliable usage installation process is not enough – you also need to re-implement hardware and software monitoring. StorCenter Pro IX-12 is pretty standard intel-based box, but it has some vendor-specific customization which we will discuss now. Below is a [possibly incomplete] list:

Continue reading

Tagged , , , , , ,

Installing Debian Linux on IOMEGA StorCenter Pro IX-12

Why do I need this?

Initially I planned to use device as NAS only. I really need very limited functionality (in fact – FTP and HTTP) so I was expected that vendor firmware will completely satisfy my needs. It was not the case.

First of all I found that firmware is not very stable – sometime device is not booting at all without any visible reasons. Second issue was that there is no firewall on this box. Its hard to believe – box is running on Linux but without ability to setup firewall! In combination with many services running on the device, without any ability to disable them it makes highly insecure system. Web gui itslelf was also buggy, with a lot of needless things (they have a “facebook” and “youtube” icons!), but without very important functions, like Firewall or IPv6. Using undocumented trick I was able to get the root, but after all I decided that it would be easer to start with normal distribution then to fix this crap.

Continue reading

Tagged , , , , ,

Working with Synology hardware – /dev/synobios and /dev/ttyS1

It was interesting to me what is inside DS207 box, how it works and controlled. Because root access is allowed it was not very hard to do my investigation. Hardware itself is based on standard 8245 PPC CPU with 64Mb of memory. It starts booting from internal flash (/dev/mtdX) using PPCBoot 2.0.0. boot loader. After loading kernel from flash its trying to run OS from system partition and if it is not possible – waiting for commands from synology tools. If DSM is already installed then it will boot OS from the hard drive and will start the web interface and other services. Network and sata controllers are standard hardware with corresponding device drivers in kernel.  They are working in a standard way, as on any other hardware. Non-standard parts in the NAS hardware are: Buttons, FAN control/sensors, and temperature sensor. We will talk how to manage them in this article.

Continue reading

Tagged , , , ,

Command line dialing on Cisco 7940/7960 IP Phone

I decided to share my perl script which I am using to dial numbers on my Cisco 7960 from command line. It can be used for integration with callto:// links, PIM or just to dial from console. To dial script using telnet interface on the phone, so it must be enabled. Script using “test” which emulates buttons on the phone. Pause between commands is required to work correctly, without it phone will go mad.


use Net::Telnet;
use Time::HiRes;

# cisco phone host name
my $host='';
# cisco phone password
my $password='cisco';
# mute on a dial 0/1
my $mute=0;

my $sleeptime=.2;
my $prompt='/> $/';

my $argc = @ARGV;
if ($argc!=1){
    print "Usage: <number>\n";
my $number=@ARGV[0];

if($number!~/^[0-9*#]+$/) {
    print "Error: wrong characters in the numer\n";
    exit 2;
$telnet = new Net::Telnet ( Timeout=>3, Errmode=>'die');
# connecting
$telnet->waitfor('/Password :$/i'); 

$telnet->print('test open');
$telnet->print('test key spkr');
    $telnet->print('test key mute');
$telnet->print("test key ".$number."#");
$telnet->print('test close');
Tagged , , ,

Improving network speed on Synology DS207 NAS

I have relatively old DS207 NAS with a Gigabit Ethernet port. Device CPU is mpc8241 PPC running @ 266MHz, so i never expected very fast transfer speed. NAS firmware is DSM3.2 with PowerPC 2.6.24 linux kernel. Performance was reasonable but less then i expected. After some experiments i found that bottleneck is network card (HDD works faster). What i really like in Synology DSM that there is no any needs for the device hacking – all you need to get the root is to enable “Terminal” option in the web interface.

Using “dmesg” command i found that Ethernet card is Yukon Gigabit Ethernet 10/100/1000Base-T Adapter. I decided to test it speed with iperf tool (using ipkg), wget and smbclient from my Linux box. I found that network speed PC -> NAS is about 230Mbit/sec and NAS -> PC ~120Mbit/sec. Kernel drvier for this card is sk98lin so i decided to see if there are any settings affecting performance to play with.

In Documentation i found 2 such settings Moderation and IntsPerSec. I decided to play with them.

To do this i modified /etc/rc boot script. I decided to add my “ismode” line before vendor one, to make sure that if there are any error in the options – device will continue to boot. Because my line is before one from vendor – system will use my settings (vendor module will be silently ignored with “File exists” message). Vendor modules are loaded on SYNOLoadModule ${NET_MODULES} line, so i just added insmod /lib/modules/sk98lin.ko Moderation=Dynamic before and restarted device. After restart driver settings could be shown using “cat /proc/net/sk98lin/eth0” command. I did 4 tests: without any changes (moderation disabled), Dynamic Moderation, Static Moderation (2000 ints/sec) and Static Moderation (1000 ints/sec). On every mode i did 3 tests:

  1. iperf bidirectional test with “iperf -c diskstation -t 15 --format KBytes -x CMS -r” on client and “iperf -s” on NAS
  2. Downloading of 1 GB from nginx HTTP server installed on NAS  with command “wget  http://diskstation:2080/1000mb.bin  -O /dev/null -o /dev/stdout|grep saved
  3. Downloading file from nas using SMB (CIFS) protocol with smbclient tool: “smbclient -c 'get 1000mb.bin /dev/null' -U admin //diskstation/music password"

Every test was running 3 times, without any other activity on this device. Raw data is available from my server. Below is a summary with average values for every test:

Moderation type iperf DL iperf UP HTTP (nginx) SMB (samba)
Disabled (default) 120.8 MBit/sec 230.6 MBit/sec 118.7 MBit/sec 118.2 MBit/sec
dynamic (2000 ints/sec) 140.7 MBit/sec 235.3 MBit/sec 148.5 MBit/sec 128.0 MBit/sec
static (2000 ints/sec) 141.4 MBit/sec 240.8 MBit/sec 165.1 MBit/sec 148.5 MBit/sec
static (1000 ints/sec) 155.9 MBit/sec 241.0 MBit/sec 185.1 MBit/sec 163.2 MBit/sec

As you could see there is a real improvement on all services. It is especially noticeable with nginx, probably because it using senfile() and epoll() kernel functionality. On HTTP i got 36% improvement, on SMB ~28%. I found no regression from this step, so will leave it as is.

Tagged , , ,

Enabling IPv6 on Synology DS207 NAS device

In my home network i have IPv6 connectivity kindly provided by Hurricane Electric. 6to4 tunnel is running on my OpenWRT router and then local addresses are assigned with radvd. This way my Linux/FreeBSD/Winsows boxes are getting IPv6 connectivity.

Also i have a relatively old NAS, Synology DS207 which is running on Linux with latest DSM 3.2 firmware. I found that it is not getting IPv6 address for some reason. To fix this you will need to enable SSH using “Control Panel -> Terminal” applet in web GUI. After logging in to the NAS i found that there is IPv6 module in kernel but it IPv6 is disabled on interfaces using sysctl`s net.ipv6.conf.eth0.disable_ipv6 and net.ipv6.conf.lo.disable_ipv6. After grepping in /etc i found that this was done in a boot time, by /etc/

I found that it checks /etc.defaults/synoinfo.conf file for ipv4only key value. And it was “yes” for some reason. I assume that it is because of some administrative reason. So i just changed in /etc.defaults/synoinfo.conf ipv4only to "no" using vi and restarted NAS. After restart it got IPv6 address automatically and also some IPv6 related settings in the web interface are available now, so firmware is 100% IPv6 compatible. I had no time to check if firewall is v6 ready because i am using one on OpenWRT.

Utilities ping6 and traceroute6 are available, so it is easy to check if IPv6 is working:

DiskStation> ping6
PING (2a00:1450:4016:801::1014): 56 data bytes
64 bytes from 2a00:1450:4016:801::1014: seq=0 ttl=55 time=23.128 ms
64 bytes from 2a00:1450:4016:801::1014: seq=1 ttl=55 time=16.509 ms
64 bytes from 2a00:1450:4016:801::1014: seq=2 ttl=55 time=16.035 ms

Tagged , , , ,