Build 10Gbe SFP+ network in Home Lab

I build a Freenas box using a supermicro X8DTN-F motherboard with dual xeon L5630 24GB ram.

I also build a vmware box using all-in-one board SUPERMICRO X11SBA-LN4F with 32GB ECC ram.

X8DTN-F has 2 onboard Gib RJ-45 ports, they are not fast enough for iSCSI storage share.

SO I bought LOT OF 5 MELLANOX CONNECTX-2 10GbE ETHERNET NETWORK CARD MNPA19-XTR. They cost me $65 plush $12 shipping and $25 for customs.
I also bought 3 Genuine Cisco SFP-H10GB-CU3M 3 Meter 10GbE Twinax Cable 37-0961 COPQAA6J A. They cost me about $15 each.

I installed one card on Freenas box and another one on vmware box.

This is some tests from iperf.

/usr/lib/vmware/vsan/bin/iperf -c
Client connecting to, TCP port 5001
TCP window size: 32.5 KByte (default)
[ 3] local port 57624 connected with port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 8.05 GBytes 6.91 Gbits/sec

And using dd in a vm whos storage is based on iSCSI from Freenas over SFP+

dd if=/dev/zero of=testfile bs=1G count=10
10737418240 bytes (11 GB, 10 GiB) copied, 29.0997 s, 369 MB/s

This is a very good result.

One link of 10 Gib link cost me less than $56, This results are very acceptable.

Getting Started with Videos

OpenCV 3.0

    Learn to read video, display video and save video.
    Learn to capture from Camera and display it.
    You will learn these functions : cv2.VideoCapture(), cv2.VideoWriter()

DirectShow runtime is a core Windows component. It does not need a separate installation

Capture & Display Camera
ex: ffmpeg -i “rtsp://root:camera@” -vcodec copy -acodec none test.mp4
ffmpeg -f dshow -i audio=”virtual-audio-capturer”:video=”screen-capture-recorder” yo.mp4

list all ffmpeg
ffmpeg -list_devices true -f dshow -i dummy
Use the built-in GDI screengrabber (no install needed) like this :
ffmpeg -f gdigrab -framerate 10 -i desktop [output]
ffmpeg -f gdigrab -framerate 25 -i title=Calculator [output]
ffmpeg -f gdigrab -framerate 25 -i title=”Netflix – Google Chrome” [output]
ffmpeg -f gdigrab -framerate 25 -i title=”Netflix – Google Chrome” -f dshow -i audio=”virtual-audio-capturer” -c:v libx264 -b:v 200k test.mp4
ffmpeg -f dshow -framerate 25 -i video=”screen-capture-recorder” -f dshow -i audio=”virtual-audio-capturer” -c:v libx264 -b:v 200k test.mp4

ffmpeg wiki

x264 lossless
ffmpeg -i input -c:v libx264 -preset ultrafast -qp 0 output

Recording webcam
ffmpeg -f alsa -i default -f v4l2 -s 640×480 -i /dev/video0 output.mpg
ffmpeg -f alsa -i default -f v4l2 -s 640×480 -i /dev/video0 -acodec flac -vcodec libx264 output.mkv

VOB to any container
cat f0.VOB f1.VOB f2.VOB | ffmpeg -i – out.mp2

Two-pass MPEG-4 (very high quality)
ffmpeg -i video.mpg -an -vcodec mpeg4 -pass 1 -f rawvideo -y NUL
ffmpeg -i video.mpg -acodec libvorbis -aq 8 -ar 48000 -vcodec mpeg4 -pass 2 -b 8000k output.mp4

he FFmpeg package includes FFserver, which can be used to stream media over a network.

H264 Capture
-i audio=”Sound Blaster Audigy Fx”
Motion, a software motion detector http://motion.sf.net

Linux DDNS with namecheap

sudo apt-get update
sudo apt-get install ddclient

During installation an installation wizard opens and wants to know some things from you. Here you can safely enter what you want,, because we have to adjust the configuration file manually either way, because the wizard does not support the Namecheap.com interface.

The following is the format of the DDClient configuration:


use=web, web=dynamicdns.park-your-domain.com/getip
password=your dynamic dns password

Raspbeery Pi3 with 2 wifi donggle/VPN router

connecting to a WPA WiFi network, your /etc/network/interfaces file will contain something like this:

allow-hotplug wlan0 # detect WiFi adapter
iface wlan0 inet dhcp # connect WiFi with DHCP
wpa-ssid “myhostnetwork” # WPA access point name
wpa-psk “myhostpassword” # WPA access point password

Manually restart WiFi to connect the Raspberry Pi to the Internet.
$ sudo ifdown wlan0
$ sudo ifup wlan0

You can validate that you have a WiFi connection by pinging a website or running the command:

$ ifconfig wlan0

Installing hostapd
$ wget https://github.com/jenssegers/RTL8188-hostapd/archive/v1.1.tar.gz
$ tar -zxvf v1.1.tar.gz
$ cd RTL8188-hostapd-1.1/hostapd
$ make
$ sudo make install


$ sudo service hostapd start
$ sudo update-rc.d hostapd enable

Install DHCP server
$ sudo apt-get install dnsmasq

dhcp-option=3, # our router
dhcp-option=6, # our DNS Server
dhcp-authoritative # force clients to grab a new IP


iface wlan1 inet static

$ sudo ifdown wlan1
$ sudo ifup wlan1
$ sudo service dnsmasq start
$ sudo update-rc.d dnsmasq enable

TOR, or The Onion Router, is an encryption technology that encrypts and distributes your internet data across a network of computers on the way back and forth to a website.
VPNs can be more secure than TOR if you trust your VPN server.

To install TOR,
$ sudo apt-get install tor
$ sudo service tor start
$ sudo update-rc.d tor enable

Installing VPN
$ sudo apt-get install openvpn

Edit /etc/openvpn/client.conf
$ sudo service ntp start
$ sudo update-rc.d ntp enable

$ sudo service openvpn start
$ sudo update-rc.d openvpn enable

$ echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
sudo iptables –t nat –A POSTROUTING –o tun0 -j MASQUERADE
$ sudo iptables –A FORWARD –i wlan1 –o tun0 -j ACCEPT
$ sudo iptables –A FORWARD –i tun0 -o wlan1 –m state –state RELATED,ESTABLISHED –j ACCEPT

persistent the settings
$ sudo sh –c “iptables-save > /etc/iptables.restore”
$ echo “up iptables-restore < /etc/iptables.restore” | sudo tee --append /etc/network/interfaces https://makezine.com/projects/browse-anonymously-with-a-diy-raspberry-pi-vpntor-router/




李 毅

第二个想不到,是蔡英文和民进党,想不到,大陆朝野完成祖国统一神圣大业的意志与决心。在本质上,在实质上,蔡英文,民进党,不了解中国,不了解中华文明。大陆很世俗,饮食男女,穷人吃喝玩乐,富人吃喝嫖赌抽,没有什么东西是神圣的。目前明文规定的,神圣的东西,只有一个:祖国统一神圣大业。祖国统一,在自古世俗的中华文明,为什么是唯一神圣的东西?夏商周,三千年,实际控制的地方,不大。领先世界两千年的中国,主要是秦皇汉武建立的。秦始皇千古一帝,统一了长城内外,大江南北,直到广东福建沿海。汉武帝雄才大略,继承秦皇统一大业,指挥卫青、霍去病等伟大将帅,打了将近四十年,消灭了北方大国匈奴,拿下了今天外蒙古,拿下了河西走廊,出河西走廊拿下了新疆,在南边建立了海南省,犯强汉者,虽远必诛。秦皇汉武,建立中国,尸积成山,血流成河。在元朝,700年前,西藏进入祖国大家庭。台湾自古是中国的,隋唐以来,郑成功以来,刘铭传以来,一千多年了,1888年,中国正式建立台湾省。1895年,因为甲午战争失败,中国台湾省被日本割去。1945年,因为中国抗战胜利,中国从日本收回台湾省。甲午战败割让台湾,是中国百年国耻的重要标志,任何爱国的中国人,每忆及此,情不自禁,痛彻心扉。秦皇汉武以降,两千年来,每次中国重新统一,大多尸积成山,血流成河。今天,中国经济总值世界第二,军费世界第二,正在赶超美国。今天,在台海这个局部战场,中国军队已对美日军队取得战略优势。今天,蔡英文,民进党,不承认九二共识,不承认两岸同属一中,全面加速走向文化台独、思想台独、教育台独、社会台独,消灭了和平统一的任何希望。这是中国的奇耻大辱。这是侮辱十四亿中国人民,这是侮辱中国军队,这是侮辱中国执政党,这是侮辱中国领袖。是可忍,孰不可忍。蔡英文民进党的如意算盘是,在陆客减少、经济穷台、烽火外交之后,蔡英文民进党岿然不动,大陆黔驴技穷,不得不承认现实,向蔡英文民进党低头让步。这是白日做梦。一两年内,大陆和平手段用尽之后,确认和平统一无望之时,就是台独势力灭亡之日。两千年来,中国的本质,不是一切向钱看,而是秦皇汉武毛泽东,是祖国统一的神圣大业。如果和平统一没有任何希望了,谁敢坐视? 没人敢坐视。
今年一月以来,大陆,台港澳,美日欧,研究台海局势的文章,中文的,英文的,读了几百篇。我同意:金灿荣的四个阶段说,朱成虎的四个幻想说,王洪光的台海战役方案。我有三篇长文,在全球华人广为流传。1月19日,《李毅台湾观选总结:和平统一 已无可能》。5月15日,《李毅再论和平统一已无可能》。6月12日,《美国之音李毅采访录》。拙文三篇,仅供批判,仅供参考。


Activate a Windows Operating System: Windows 7, Windows 8, Server 2008, Server 2008 R2, or Server 2012:
Open up an Elevated Command Prompt window. For instructions, please see our guide: How To Open an Elevated Command Prompt.
In the elevated Command Prompt window, verify that the current directory is C:\Windows\System32. If it is not, type
CD \Windows\System32
and press Enter.
Type the following command:
cscript slmgr.vbs /skms kms01.cit.cornell.edu
and press Enter.
(Note: The url in the command above begins with kay-emm-ess-zero-one.)
Type the following command:
cscript slmgr.vbs /ato
and press Enter.
Close the Command Prompt window.
And you’re done for that installation of Windows on that computer.

Activate Microsoft Office (2016, 2013, or 2010)
Open an Elevated Command Prompt window. For instructions, please see our guide How To Open an Elevated Command Prompt.
Type the following command, depending on your version of Office:
Office 2016:
CD \Program Files\Microsoft Office\Office16
Press Enter. This assumes you installed Office in the default location.
Note: If you installed the 32-bit version of Office on a 64-bit system, use this command instead:
CD \Program Files (x86)\Microsoft Office\Office16
Office 2013:
CD \Program Files\Microsoft Office\Office15
Press Enter. This assumes you installed Office in the default location.
Note: If you installed the 32-bit version of Office on a 64-bit system, use this command instead:
CD \Program Files (x86)\Microsoft Office\Office15
Office 2010:
CD \Program Files\Microsoft Office\Office14
Press Enter. This assumes you installed Office in the default location.
Note: If you installed the 32-bit version of Office on a 64-bit system, use this command instead:
CD \Program Files (x86)\Microsoft Office\Office14
Type the following command:
cscript ospp.vbs /sethst:kms01.cit.cornell.edu
and press Enter. (Note: The url in the command above begins with kay-emm-ess-zero-one.)
Type the following command:
cscript ospp.vbs /act
and press Enter.
Close the command prompt window.





2016-12-11 new test

office Results
Office Internet

Bench Marks
Geekbench 4 scores are calibrated against a baseline score of 4,000 (which is the score of an Intel Core i7-6600U @ 2.60 GHz). Higher scores are better, with double the score indicating double the performance.
Xeon CPU Single-Core Score 1634 Multi-Core Score 14163
GPU OpenGL Scores 98125

VM X3470 2 VCores Single-Core Score 2414 Multi-Core Score 4100

openssl speed rc4 aes
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
rc4 159006.44k 268251.83k 333113.94k 357163.01k 365226.67k
aes-128 cbc 40476.44k 45582.87k 47630.99k 119251.29k 121312.60k
aes-192 cbc 34584.42k 38270.81k 39600.90k 101186.40k 102191.02k
aes-256 cbc 29730.55k 32524.41k 33697.13k 87645.47k 88743.94k

E5-1650 VM
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
rc4 474722.01k 637783.56k 768633.73k 810385.69k 825222.23k
aes-128 cbc 128898.97k 119135.41k 146525.09k 147826.03k 136773.41k
aes-192 cbc 112993.81k 121691.71k 106095.54k 126747.41k 126995.31k
aes-256 cbc 99919.90k 104369.55k 109507.89k 109137.02k 109050.14k

X3470 VM
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
rc4 306668.07k 426158.85k 467770.11k 480143.70k 481804.29k
aes-128 cbc 100775.06k 108721.77k 111111.17k 232358.23k 237480.33k
aes-192 cbc 85099.41k 90430.59k 92906.75k 198164.55k 200168.79k
aes-256 cbc 72925.21k 77958.38k 79049.80k 170237.27k 170196.99k

Raspberry Pi 2 B+
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
rc4 56269.73k 66391.47k 69212.33k 70118.74k 70380.20k
aes-128 cbc 19625.01k 21155.04k 21714.86k 21878.78k 21927.25k
aes-192 cbc 17120.37k 18346.20k 18786.63k 18821.12k 18847.06k
aes-256 cbc 15325.02k 16303.68k 16714.74k 16678.57k 16700.76k

Comparision of Unix bech results

Hostus E5-1650 i core 768MB Ram 20GB,Centos 6

Benchmark Run: Thu Sep 22 2016 06:06:49 – 06:35:41
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 41794589.8 lps (10.0 s, 7 samples)
Double-Precision Whetstone 3700.4 MWIPS (13.3 s, 7 samples)
Execl Throughput 5768.7 lps (29.8 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 852337.3 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 240052.1 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 1963033.5 KBps (30.0 s, 2 samples)
Pipe Throughput 1845457.8 lps (10.0 s, 7 samples)
Pipe-based Context Switching 1.0 lps (10.0 s, 7 samples)
Process Creation 14123.6 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 6504.9 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 848.6 lpm (60.0 s, 2 samples)
System Call Overhead 2980547.2 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 41794589.8 3581.4
Double-Precision Whetstone 55.0 3700.4 672.8
Execl Throughput 43.0 5768.7 1341.6
File Copy 1024 bufsize 2000 maxblocks 3960.0 852337.3 2152.4
File Copy 256 bufsize 500 maxblocks 1655.0 240052.1 1450.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 1963033.5 3384.5
Pipe Throughput 12440.0 1845457.8 1483.5
Pipe-based Context Switching 4000.0 1.0 0.0
Process Creation 126.0 14123.6 1120.9
Shell Scripts (1 concurrent) 42.4 6504.9 1534.2
Shell Scripts (8 concurrent) 6.0 848.6 1414.3
System Call Overhead 15000.0 2980547.2 1987.0
System Benchmarks Index Score 539.8

Ubuntu 16.04 Dell i5-3470 16GB RAM