Monday, October 31, 2016

Get rid of "%AMDP2_FE-6-EXCESSCOLL" Error in IOU L2 Image

L2 IOU Images always pop up this error frequently saying %AMDP2_FE-6-EXCESSCOLL as shown below and it's really annoying to work with L2 image. I am using IOU image on Unetlab (UNL).

To get rid of this error, many places on internet says to enter following lines manually to each and every device which did not work for me.

logging discriminator EXCESS severity drops 6 msg-body drops EXCESSCOLL
logging buffered 50000 
logging console discriminator EXCESS

But the real solution to stop it was to edit sysctl.conf file in virtual machine with a one line of code.

SSH to virtual machine on VMware.

Enter the following command to edit the file
nano /etc/sysctl.conf

Go to the bottom of the file and paste the following lines
# Get rid of  %AMDP2_FE-6-EXCESSCOLL Error
net.unix.max_dgram_qlen = 2000000 

Hit Ctrl+X to exit and hit Y to save for the same name.

Restart the Machine
sudo reboot

Now it will not come again. I don't know whether high CPU or a Loopback traffics causes this issue. But it just worked for me this way. Hope this will be helpful to someone.

Update VMware Tools for UNetLab (UNL) to Stop Crashing Labs - "Error 20003"

When I was working with some larger typologies in UNL work space, labs got crashed many times because of this new method of adding links. Some times when nodes/links are added and deleted, it happened after auto refresh on webpage and shows "Error 20003" and you are done. If you have not backed up your lab with configurations you will not recover your lab again.

To stop this happening, VMware tools should be updated. I am running UNL on VMware workstation.

Go to VMware and go to VM > Install VMware Tools

SSH to the UNL machine.

Run these following commands:

Run this command to create a directory to mount the CD-ROM
sudo mkdir /mnt/cdrom

Run this command to mount the CD-ROM
sudo mount /dev/cdrom /mnt/cdrom

Run this command to find the exact name
ls /mnt/cdrom

It is 10.0.10-4301679 for me.

Run this command to extract the contents of the VMware Tools bundle
tar xzvf /mnt/cdrom/VMwareTools-x.x.x-xxxx.tar.gz -C /tmp/

Note: x.x.x-xxxx is the version discovered in the previous step.

Run this command to change directories into the VMware Tools distribution
cd /tmp/vmware-tools-distrib/

Run this command to install VMware Tools
sudo ./ -d

Now reboot the virtual machine
sudo reboot

Saturday, October 1, 2016

Get Raspberry Pi into Networking

As many electronic enthusiasts know, Raspberry Pi is a small credit card size computer which runs a Linux operating system called Raspbian which can be used in many ways to do computer engineering stuff. I am writing this post which I will use as a reference to my future posts regarding network solutions which can be provided using this small piece of electronics.

Get Hardware Fixed

Assemble Raspberry Pi into the casing with a fan. Because this is going to be a server, it is better to use a casing with a fan to reduce the heat caused by continuous long time operation. The only thing you need to know in fixing hardware is where to plug the fan. (click on the image to view full size)

Put it just like I have done on the long GPIO / Input Output line running on the board. 

Power (Red) must be connected to the 2nd pin from the left and the Ground (Black) must be connected to the 3rd pin from the left.

Format SD card

SD card is the hard disk of this machine.
You will also need a card reader if your PC does not have a SD card reader slot. Also before buying a SD card, check whether the card supports Raspberry Pi or not though most cards do support. 

To correctly format it use SDF Formatter from here

Go to Option and select Format Type as FULL (Erase) and Format Size Adjustment ON

Now go to My Computer and right click on the SD card and select Format.

This time select the File System as exFAT because it is more faster and select Quick Format and hit Start.

Now the Hard Disk is ready to install the OS.

Burn Raspbian OS to SD card

Now download Raspbian OS (Jessie) from
Do not download Noobs if you do not have a HDMI cable and  a LCD Display because SSH is not active by default in Noobs. I'm going to do SSH to install a remote access software like VNC next.
So I need clean OS which the SSH is enabled by default.

Time to download Win32 Disk Imager from here.

Select the downloaded image and hit Write.

Now the SD card is fully ready to insert in to the Raspberry Pi.

Boot up, SSH & Update Packages

Now plug your Pi to a 2.5A power plug (which is recommended) and plug an Ethernet Cable to the Pi which is connected to your home router. Because DHCP is enabled by default on the Ethernet port, it is the easiest way. And aslo you can guess the ip address which it will get by looking at your PC's IP and if you know how many devices are connected. If you are not sure, download a scanner like Advanced IP Scanner from here.

You can see the IP address of my Pi is which I'm going to SSH into.
Download Putty to do SSH. SecureCRT will not work because of a SSH version mismatch.

Select port 22, SSH etc. Just normal terminal access.

Hit Open.

In the 1st time you SSH, it will prompt an Security Alert in Putty.
Hit Yes to ignore it and log in to the Pi.

Default Logins:-

Log in as: pi
Password: raspberry

After logged in, enter the following command in terminal to access Pi's software configuration tool.

sudo raspi-config

Select Expand Filesystem to use all the space in SD card for root partition.

Hit Ok for the next dialog box and it will ask to reboot. Hit Ok and start a new SSH session after reboot.

Now enter following commands to download & update packages.

sudo apt-get update
sudo apt-get dist-upgrade

To view the available space in memory enter following command anytime in terminal.

df -h

After packages are updated, enter following commands to clean the downloaded update packages to free space & reboot.

sudo apt-get clean
sudo reboot

Install TightVNC to Access Desktop

Enter following commands to install and run TightVNC

sudo apt-get install tightvncserver

It will ask a password to the remote session. It will be used to login to the Pi via TightVNC. After confirming that it will ask a view only password. You can ignore that.

Remember to enter "tightvncserver" command to start a session with Pi everytime you reboot before accesing through TightVNC.

Now install TightVNC on your native PC from here.

Now open TightVNC from your PC and start a session to your Pi by giving IP address with a : followed by a 1 for the session like shown in the screen capture.

Hit Connect and it will ask the password. Give the password entered a short while ago and hit OK

Now you are on the desktop of the Pi.
Now it's only a GUI. You can move around easily and customize as you like.

From upper right hand corner, you can see the network icon on the tray. Click on it to connect Wifi network too using your Wifi Key. You can also give static IP from here too.

Go to Menu > Preferences > Raspberry Pi Configuration

You can change many important things here like Hostname, Password, Enable Interfaces, Overscan, Date and Time etc and reboot the Pi to make the changes effective.