A Simple Tutorial for WANem

Being a networking related product developer, we always face issues which can not be easily reproducted in LAB(because in most cases we have LAN only environments).
Here I introduce you a tool, WANem – a WAN emulator tool from TATA. And we can benifit a lot in reproducing issues or trouble shooting simply by using WANem.

What does WANem do?

WANem is a Wide Area Network Emulator, meant to provide a real experience of a Wide Area Network/Internet, during application development / testing over a LAN environment. Typically application developers develop applications on a LAN while the intended purpose for the same could be, clients accessing the same over the WAN or even the Internet. WANem thus allows the application development team to setup a transparent application gateway which can be used to simulate WAN characteristics like Network delay, Packet loss, Packet corruption, Disconnections, Packet re-ordering, Jitter, etc. WANem can be used to simulate Wide Area Network conditions for Data/Voice traffic and is released under the widely acceptable GPL v2 license. WANem thus provides emulation of Wide Area Network characteristics and thus allows data/voice applications to be tested in a realistic WAN environment before they are moved into production at an affordable cost. WANem is built on top of other FLOSS [Free Libre and OpenSource] components and like other intelligent FLOSS projects has chosen not to re-invent the wheel as much as possible.

Where to download WANem?

WANem is an open-source project, and it hosts on source forge, you can download it here: http://wanem.sourceforge.net

Start to use.

1. Start WANem image with VMware

1. knoppix5.3 bootup2. Choose your network configuration, DHCP or manual static IP. Here I’m using static IP.

2. dont use DHCP3. Setup your password for your VM(Knoppix).

3. setup your passsword4. Open a browser and navigate to WANem with an URL like this: http://ip-address/WANem, such as http://172.16.184.203/WANem

4. open a browser and navigate to WANem5. Add route rule for your test endpoints/peers

5. add route rule for your test endpoints6. Start WANem by a specified Loss percentage.

6. start WANem7. Run your tests.

A sample route setting

a. Delete default route for your endpoint

route delete 0.0.0.0

b. Add a force route to WANem

route add 0.0.0.0 mask 0.0.0.0 172.16.184.203

* You need to change the IP address with the IP address of your own WANem server.

However, all the data from this endpoint will be forced to route to WANem if this route is applied. If you wish it works only for one another peer IP, you can change the command to

route add 172.16.184.202 mask 255.255.255.255 172.16.184.203

This means, if you are connecting or sending data to 172.16.184.202 from this endpoint, all the data packages will first route to 172.16.184.203 (WANem server)

c. Test your route

You can use this command to test the route setting if your application is working under windows:

tracert 172.16.184.202

If you have any questions about using WANem, you can leave a message for me under this post.

EzFaceRecognizer – a simple implementation of face recognition

One of my EasyIV project’s featured function is face detect, but obviously it was only used to collect faces for further process, like face recognition, of some other application or system working along with EasyIV.

I’d say here, face recognition was also included in my plan for EasyIV.

However, after digged into it for sometime, I found it’s really a big problem to me. I tried several ways to implement the face recognition process, but all the results are sad, none of the can work precisely.

P.S. Lucky me, I didn’t bring this topic to my paper, otherwise I’ll be doomed in the coming Mid-term examination.

Here I share with you a simple test program I used to practice face recognition by using Eigenface.

What is Eigenface?

Eigenfaces is the name given to a set of eigenvectors when they are used in the computer vision problem of human face recognition.[1] The approach of using eigenfaces for recognition was developed by Sirovich and Kirby (1987) and used by Matthew Turk and Alex Pentland in face classification.[2] The eigenvectors are derived from the covariance matrix of the probability distribution over the high-dimensional vector space of face images. The eigenfaces themselves form a basis set of all images used to construct the covariance matrix. This produces dimension reduction by allowing the smaller set of basis images to represent the original training images. Classification can be achieved by comparing how faces are represented by the basis set.