Monday, February 20, 2012

GNS3 - PIX Firewall Emulation

PIX Firewall Emulation

GNS3 is also capable of emulating PIX firewalls. Once again, you’ll need to provide your own PIX image. If you want to run more than a restricted license, you’ll also need to have a valid serial number and activation keys.

Configuring Qemuwrapper and Cisco PIX image

First, go to Preferences on the Edit menu in GNS3. Click on Qemu in the left pane. The default path to the Qemuwrapper should be fine. You may want to specify a different working directory. Note that Qemuwrapper is shipped with a compiled version of Pemu, therefore you do not need Qemu to emulate PIX.

On PIX tab, use the button next to Binary image to specify the location of your PIX operating system image. You may also change other settings like RAM or the number of interfaces. Once you are finished with the settings, click on Save.

clip_image002clip_image004

You may use the default Key and Serial number, if necessary. This will provide a restricted license with limited features. You will need a valid serial number and activation keys to access additional features. The graphic below on the left is a restricted image. Failover, VPN-DES, and VPN-3DES-AES are disabled. You are also limited to 6 physical interfaces and 25 VLANs. The graphic below on the right is unrestricted. With an unrestricted license, these features are enabled along with support for additional interfaces and VLANs.

clip_image006

If you have a serial number and valid activation keys, you may move from a restricted license to an unrestricted license. Type in the activation keys separated by commas with no spaces. Use all lower case. Be sure your serial number is converted to hexadecimal. It is usually in decimal in a show version command. Use a calculator to convert from decimal to hexadecimal if necessary.

Using Cisco PIX

Click OK to return to the GNS3 main interface. Drag a PIX firewall icon from the Nodes Types pane into the workspace. Right-click FW1 and choose Start, then right-click on FW1 again and choose Console.

Once you console into your PIX firewall, issue a show version command. If the activation keys do not show up properly, then issue the following command from privileged mode (enable mode):

pixfirewall# activation-key 0x12345678 0x12345678 0x12345678 0x12345678

clip_image008

The command is issued on one line with spaces between the activation keys. Save the configuration using either the write command orcopy run start. Stop the device and restart it. Congratulations! Your PIX firewall is up and running.

Interfaces on the PIX are Ethernet interfaces. To connect to other devices, you’ll need to use either Ethernet or FastEthernet interfaces. You may not connect to a serial interface.

You may connect to other PIX firewalls, routers, and switches. You may not connect to a cloud. Consequently, to connect to a real network or to a Virtual PC, you’ll need to connect from the PIX to a switch, and then from the switch to your Cloud.

CPU usage with PIX

Just as with routers, CPU usage is an issue when emulating PIX firewalls on your computer. You will note that your CPU usage is most likely 100%. There are no idle-pc values available for PIX firewalls at this time. Instead, you may use third-party software to control your CPU usage. There are a variety of products on the market. The one that I use for Windows is called BES and is a free download.

Complete documentation is available on the Web site along with the program download. Once you start your PIX firewall, start BES. Click the Target button. Choose the pemu.exe process and click the Limit this button. A confirmation screen will appear.

Click the Control button to control how much CPU limiting will be used. I’ve set mine to reduce CPU usage by 50%. If you are running multiple firewalls, you will want to limit each one. This program may also limit other processes running on your Windows computer.

clip_image010clip_image012

For Linux, use cpulimit. You may learn more about cpulimit at the following Web site: http://cpulimit.sf.net. On ubuntu you can use Synaptic Package Manager or Ubuntu Software Centre to download and install cpulimit.

To run cpulimit, press F2 while holding the ALT key down (ALT+F2) in Ubuntu to open a Run Application box. Type the following in the box:

cpulimit –e pemu –l 40

clip_image014

This will limit the application pemu to 40% CPU usage.

Still in your Ubuntu, choose System Monitor under Administration on the System menu. Click the Resources tab. You should see that pemu process is running at 40% of your CPU usage.

Taken From: http://www.gns3.net/gns3-pix-firewall-emulation/

Tuesday, February 14, 2012

Cisco TSHOOT – Top 10 Show Commands

Cisco Router Tips
Top 10 'show' Commands by Tom Lancaster
clip_image002

One of the most important abilities a network administrator can have is the know-how to get information out of his network devices so he can find out what's going on with the network. In most networks, the staple of information gathering has been the "show" commands. Here are my top ten commands to know and love:

  1. show version: Start simple; this command gives uptime, info about your software and hardware and a few other details.
  2. show ip interface brief: This command is great for showing up/down status of your IP interfaces, as well as what the IP address is of each interface. It's mostly useful for displaying critical info about a lot of interfaces on one easy to read page.
  3. show interface: This is the more popular version of the command that shows detailed output of each interface. You'll usually want to specify a single interface or you'll have to hit 'page down' a lot. This command is useful because it shows traffic counters and also detailed info about duplex and other link-specific goodies.
  4. show ip interface: This often overlooked command is great for all the configuration options that are set. These include the switching mode, ACLs, header compression, ICMP redirection, accounting, NAT, policy routing, security level, etc. Basically, this command tells you how the interface is behaving.
  5. show ip route: This indispensable command shows your routing table, which is usually the primary purpose of the box. Get to know the options on this command.
  6. show arp: Can't ping a neighbor? Make sure you're getting an arp entry.
  7. show running-config: This is an easy one. It tells you how the box is configured right now. Also, "show startup-config" will tell you how the router will be configured after the next reboot.
  8. show port: Similar to the show interface command on routers, this command gives you the status of ports on a switch.
  9. show vlan: With the trend toward having lots of VLANs, check this command to make sure your ports are in the VLANs you think they are. Its output is very well designed.
  10. show tech-support: This command is great for collecting a lot of info. It basically runs a whole bunch of other show commands, and spits out dozens of pages of detailed output, designed to be sent to technical support. But, it's also useful for other purposes.

Taken From: http://www.thenetworkadministrator.com/ciscoroutertips.htm

Sunday, February 12, 2012

Iperf Commands for Network Troubleshooting

Iperf is a very useful utility for network troubleshooting.  In this post I’ll share my list of Iperf commands that I have found useful.

What is Iperf?

Iperf is a network performance utility that can generate both TCP and UDP traffic for testing bandwidth, latency, and packet loss.  Iperf is very powerful and can easily generate enough traffic to saturate a 1Gb, or 10Gb connection.  Iperf is included with most Linux distributions but you can compile Iperf for windows if needed.

In order to use Iperf you’ll need to setup an Iperf server, Iperf clients can then connect to the server in order to run tests.  By default Iperf is uni-directional and sends data from the client to the server.

In my examples I’m using 192.168.1.1 as the address of my Iperf server.

Running iperf -s will setup a basic Iperf server, you can also run Iperf in daemon mode by running iperf -D.

Basic TCP Unicast Test

The simplest test you can do with Iperf is a basic TCP test.  By default the server will use a  TCP window size of 85.3KB.  The client will connect to the server on port 5001 using a TCP window size of 16KB.  The -t option instructs the client to run the test for 30 seconds instead of the default of 10 seconds.

[Server] – iperf -s -i 1

[Client] – iperf -c 192.168.1.1 -t 30

Parallel TCP connections

Parallel connections can be useful if you need to saturate the bandwidth of a link.  The bandwidth of a single TCP session can be greatly affected by the size of the receive window and the latency of the link.

To enable parallel connections add the -P flag to the Iperf client parameters followed by the number of connections you want.  Make sure to use a capital P, lowercase p will specify a different port number to connect on.

[Server] – iperf -s -i 1

[Client] – iperf -c 192.168.1.1 -t 30 -P 10

UDP Mode

Testing with UDP packets requires the -u flag on both the client and server.  The cool thing about UDP mode is that you don’t have to use a server.  Instead you can use the interface counters on your switches.  You can also specify the destination address to be a multicast group, the default TTL for multicast is 1 (be careful).  To set a different TTL use the -T option on the client.

If you want to test for jitter and packet loss then you should use UDP mode.

[Server] – iperf -s -i 1

[Client] – iperf -c 192.168.1.1 -t 30 -u

In UDP mode iperf defaults to 1Mb/s, you can tell it to use more bandwidth by using the -b flag followed by the number of bits/sec to send.  For example, iperf -c 192.168.1.1 -u -b 100000000 would send at a rate of 100Mb/s.

Bidirectional testing

If you want to test throughput both to and from the server at the same time you can use the -d option to run a bidirectional test.  This will send data to the server, and receive data from the server simultaneously.

[Server] – iperf -s -i 1

[Client] – iperf -c 192.168.1.1 -t 30 -d

Bandwidth limiting

If you need to test for packet loss or other problems at a specific rate of bandwidth you can use the -b flag to specify the maximum throughput in bits/second.

[Server] – iperf -s -i 1

[Client] – iperf -c 192.168.1.1 -t 30 -b 100000

Transfer 1GB of data then stop

Instead of running the test for a specific period of you can instruct Iperf to stop running after trasfering a certain amound of data.  The example below will send 1GB (1024³) of data to the server and then stop

[Server] – iperf -s -i 1

[Client] – iperf -c 192.168.1.1 -n 1073741824

Stop the iPerf server

To kill the iperf server just press CTRL+C in your terminal and it will interrupt the process.

If you are running iPerf in daemon mode you’ll need to find the process ID first

ps -ef | grep iperf
root     16186     1  0 22:00 ?        00:00:00 iperf -s -D

Then kill it

kill 16186

Useful References

Energy Sciences Network Host Tuning Guide

Using Iperf – Guide by Jon Dugan

Taken From: http://samkear.com/networking/troubleshooting/iperf-commands-network-troubleshooting

Friday, January 27, 2012

Getting Started with Arduino

Introduction


This article is a bit different from my usual column in two ways. First, it's starting with a hardware and software combo—something I've not done before. Second, the projects are linked to each other and come recommended to me by Perth LUG member, Simon Newton.
Given the mostly hardware-based information for the project, here are some carefully selected bits of information from the Web site:

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists and anyone interested in creating interactive objects or environments.

Arduino can sense the environment by receiving input from a variety of sensors and can affect its surroundings by controlling lights, motors and other actuators. The microcontroller on the board is programmed using the Arduino programming language and the Arduino development environment. Arduino projects can be standalone or they can communicate with software running on a computer.

The open-source Arduino environment makes it easy to write code and upload it to the I/O board. It runs on Windows, Mac OS X and Linux. The environment is written in Java and based on Processing, avr-gcc and other open source-software.

clip_image003Arduino: this hardware/software combo allows you to program chips and test them on the fly—a real advantage of open hardware.clip_image004One of the wacky creations possible with Arduino, this spider-like robot is made by Curtin University student, Phillip Lawrence.

Installation
For those who are happy with a binary, the Web site makes things very easy with 32- and 64-bit binary tarballs at the download page, and if you're lucky, the Arduino IDE may even be in your repository. If you're going with the binary tarball, just download the latest from the Web site, extract it, and open a terminal in the folder. To run the program, enter the command:

$ ./arduino

If you're running from source instead, instructions are available on the Web site with a link from the Downloads page, although I don't have the space here to cover its somewhat unusual installer method. Nevertheless, it does recommend a series of packages that should help troubleshoot mishaps with both the source and binary tarballs. The Web site says you need the following: Sun Java SDK, avr-gcc, avr-g++, avr-libc, make, ant and git.

If you have a local repository version installed, chances are the program can be started with this command:

$ arduino

Under my Kubuntu installation, the Arduino IDE was available in the KDE menu under Applications→Electronics→Arduino IDE.
However, I must stop you here before actually running the program, and I apologize if I led you astray in the last few paragraphs (don't worry if you've already started it, you can close and re-open it with no worries). Obviously, before you can do anything with an Arduino board and the software, you first have to plug in your Arduino device. This will help in the configuration of your hardware, especially if you're using a USB connection.
Once that's out of the way, you now can start the program with any of the methods above.

Usage
With the program running and the device plugged in, let's set it up. Inside the main window, click on the Tools menu and navigate your way to the Board menu. From there, choose your Arduino device (I had the Arduino Uno). Now you have to choose your serial port, which is under Tools→Serial Port. If you had a USB device and the program found it, a USB option should appear here (in my case, /dev/ttyUSB0).
With all of that boring stuff out of the way, I'm sure you're keen to sink your teeth into this hardware/software combo. The IDE makes things simple with a series of examples in an easy-access menu. Look under File→Examples, and check out the impressive list of examples from which to choose. I recommend starting with Blink under the 1.Basics menu.

With Blink, you can start with the most basic of basics and come to grasp the syntax with well laid out code with documentation for each line. To try out this code, click Upload, which is the sixth button along in the blue menu, with the right-facing arrow. If all goes well, you should see your device start blinking from an LED, perhaps with a board reset in the process.

If your board has an enabled reset facility like the Uno I was using, you should be able to make code changes by uploading them, watching the board next to you reset and start again with the new program. In fact, I recommend you try it now. Change one of the lines, perhaps one of the lines dealing with the delay time, and then upload it again. Now this may seem lame, but to a hardware "n00b" like myself, changing around the program and updating the running hardware in a visible way was quite a buzz!

If you want to check out your code before uploading it, the start and stop buttons are for verifying the code, with the stop button obviously allowing you to cancel any compiling partway through. Although I'm running out of space for the software side, I recommend checking out more of the examples in the code, where genuinely real-world uses are available. Some highlights include ChatServer, "a simple server that distributes any incoming messages to all connected clients"; a reader for barometric pressure sensors; and a program for demonstrating and controlling sprite animations.

However, I've been neglecting one of Arduino's real bonuses, and that is the ability to use a board to program any number of chips, remove them from the main Arduino board, and use them to run external devices. The nature of open hardware really makes this a robotic enthusiast's wet dream, with examples like my close mate Phil's robotic spider showing some of the cool things you can achieve with this suite.
Nevertheless, I do have one specific use of Arduino in mind to tie this column together, and that is Simon Newton's Arduino RGB Mixer: a six channel color mixer that interfaces with OLA. Check out the following link for instructions on how to make this simple device that shows off both of these projects at the same time:
http://www.opendmx.net/index.php/Arduino_RGB_Mixer.

clip_image005
Simon Newton's RGB Mixer is a great way to use both Arduino and OLA together.Read more at: http://arduino.cc/en

Getting Started – The Basics
This example contains the bare minimum of code you need for an Arduino sketch to compile: the setup() method and the loop()method.

Hardware Required
Arduino Board

Circuit
Only your Arduino Board is needed for this example.
clip_image002
image developed using Fritzing. For more circuit examples, see the Fritzing project page

Code
The setup() function is called when a sketch starts. Use it to initialize variables, pin modes, start using libraries, etc. The setup function will only run once, after each powerup or reset of the Arduino board.
After creating a setup() function, the loop() function does precisely what its name suggests, and loops consecutively, allowing your program to change and respond as it runs. Code in the loop() section of your sketch is used to actively control the Arduino board.
The code below won't actually do anything, but it's structure is useful for copying and pasting to get you started on any sketch of your own. It also shows you how to make comments in your code.
Any line that starts with two slashes (//) will not be read by the compiler, so you can write anything you want after it. Commenting your code like this can be particularly helpful in explaining, both to yourself and others, how your program functions step by step.

void setup() {
// put your setup code here, to run once:
}



void loop() {
// put your main code here, to run repeatedly:
}



Getting Started – Hello World (Blink)
This example shows the simplest thing you can do with an Arduino to see physical output: it blinks an LED.

Hardware Required
· Arduino Board
· LED

Circuit
To build the circuit, attach a 220-ohm resistor to pin 13. Then attach the long leg of an LED (the positive leg, called the anode) to the resistor. Attach the short leg (the negative leg, called the cathode) to ground. Then plug your Arduino board into your computer, start the Arduino program, and enter the code below.
Most Arduino boards already have an LED attached to pin 13 on the board itself. If you run this example with no hardware attached, you should see that LED blink.
click the image to enlarge
clip_image002
image developed using Fritzing. For more circuit examples, see the Fritzing project page
Schematic
click the image to enlarge
clip_image004
Code
In the program below, the first thing you do is to initialize pin 13 as an output pin with the line
pinMode(13, OUTPUT);

In the main loop, you turn the LED on with the line:
digitalWrite(13, HIGH);

This supplies 5 volts to pin 13. That creates a voltage difference across the pins of the LED, and lights it up. Then you turn it off with the line:
digitalWrite(13, LOW);

That takes pin 13 back to 0 volts, and turns the LED off. In between the on and the off, you want enough time for a person to see the change, so the delay() commands tell the Arduino to do nothing for 1000 milliseconds, or one second. When you use the delay() command, nothing else happens for that amount of time. Once you've understood the basic examples, check out the BlinkWithoutDelay example to learn how to create a delay while doing other things.
Once you've understood this example, check out the DigitalReadSerial example to learn how read a switch connected to the Arduino.

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
  This example code is in the public domain.
*/


void setup() {                
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);     
}


void loop() {
digitalWrite(13, HIGH);   // set the LED on
delay(1000);              // wait for a second
digitalWrite(13, LOW);    // set the LED off
delay(1000);              // wait for a second
}

See Also
  • DigitalReadSerial: Read a switch, print the state out to the Arduino Serial Monitor.
  • AnalogReadSerial: Read a potentiometer, print it's state out to the Arduino Serial Monitor.
  • Fade: Demonstrates the use of analog output to fade an LED.

Based On

Plop – Boot USB Disks on Old Hardware and VMware

Using Plop Boot Manager for USB Boot

For PLOP USB Disks Booting on VMWARE check this post: http://myhowtosandprojects.blogspot.com/2011/12/boot-from-usb-disk-in-vmware.html

clip_image002

Portability is a huge advantage that Linux enjoys over most other desktop operating systems as most major distros work very well when installed to a flash drive. However, there are still machines in service that just won't play ball when it comes to USB booting. Fortunately, I found a nice little utility that can work around this problem.


Carrying data around on a flash drive is handy, but with Linux, it's possible to carry around an entire work environment. Unfortunately, however, there are some older systems that won't boot from USB. For example, I have a Sempron 3000+ system with 2GB of RAM that won't boot from USB, even though it's a usable system for some things. If the BIOS doesn't support booting from a flash drive, there's not much that GRUB can do as it doesn't contain any drivers and relies on the BIOS to find bootable media.


Plop Boot Manager aims to overcome these limitations. Like most boot managers, it presents a selection menu to choose the boot partition when the machine first starts up. As it contains its own USB drivers, you can use it to convince older hardware to boot from a device such as a flash drive. It's a quite a flexible piece of software. For example, you can set it up to be loaded by GRUB or the Windows boot loader menu or even something more exotic such as loading Plop from from a floppy disk drive in order to initiate a network boot. In this example, I'll just be documenting one single use case in which I used it to enable an older machine to boot from a USB drive.

clip_image004
Standard disclaimer: If you're carrying out a job like this, a single mistake or one bug in the software can easily wipe the contents of the entire disk. Back up valuable data.

clip_image006
In this case, I installed it to the MBR (Master Boot Record) as this is the simplest option. A word of warning here: when installed to the MBR, it will overwrite an existing GRUB installation if it too was placed in the MBR. As Plop isn't a Linux loader, this means that Linux will no longer work. In other words, you will have to reinstall GRUB onto the Linux boot partition itself, if you don't already have it working like that. There might be a slight problem here as USB keyboards wont work until the operating system itself has booted. This means that you can't actually select anything from the Grub menu if you are using a USB keyboard, which should’t be a huge problem for most uses. Obviously, Plop Boot Manager can select between operating systems. An existing Windows installation should continue to work without modification.

clip_image008

Within the archive, there are a few directories with the files needed for different types of installation. In this case I took the ISO installer image (all 480k of it) and burnt it to a CDR. As I said, if this isn't an option with the machine that you're working with, you can install from within an operating system that is already running on the computer. As with all of the system, the installer uses a flashy mixture of text mode and graphics. It's a simple system and it installs very quickly.


Rebooting, you're presented with the installer itself with options for booting from different types of media. As hoped, this allowed me to boot Xubuntu from the USB flash drive. One limitation of the program is that it can't handle booting from USB DVD/CDROM drives which is a shame. It's an interactive boot manager and you can reconfigure it on the fly to change things like appearance and default boot options.


Plop Boot Manager is a versatile piece of software. Risking the ire of Linux graybeards by saying it, I've often wished that more Linux distros made use of something a bit friendlier than the perennial GRUB. If you work with a lot of older hardware and would like to boot from a memory stick, the the ISO version of the boot loader on a CDR might be worth adding to your bag of tricks.


I've only scratched the surface of what Plop can do. Hit the docs for a full feature list.

______________________

UK based freelance writer Michael Reed writes about technology, retro computing, geek culture and gender politics.

Taken From: http://www.linuxjournal.com/content/using-plop-boot-manager-usb-boot

Tuesday, December 27, 2011

Install Android Applications on SD Cards (from Android1.6 and above)

The biggest advantage that Link2SD offers, in my opinion, is the possibility to be used in android versions as low as 1.6 to the higher versions above like 2.1 an so on, where the popular App2SD, can only be used starting at android 2.2.
Link2SD Guide and Usage Tutorial
Hello all,
As you know most of the android phone owner are getting hard time to manage internal phone space and so everyone are looking for some kind of apps that able to move apps and their data to SD card storage. Link2SD is one of that app and used by most of us atleast once. But some folks out there still having trouble to setup Link2SD and related partitioning procedure for SD Card. Hope this guide and usage tutorial helpful to everyone. Feel free to leave questions or any comments on comment section(very bottom).
1. Install “Link2SD” from market. Here is link: http://alturl.com/43oki. Once you install you see the icon as below image. Tap on that. It will load all apps in there and eventually will show the error message as shown in 2nd image. But don’t worry, that’s part of setup too. This error comes because your SD card is still not formatted (that’s i’m assuming clip_image001 )
clip_image003
clip_image005
2. Now download EASEUS Partition Masters. It’s Free. (Everyone has different selection for partitioning purpose, but in this tutorial i’ll go thru this tool.)
Here is link: http://alturl.com/7kueu
- Before starting plug your phone using USB to PC and “Turn on USB Mode” from your phone to get SD card access in PC.
- After that , run EASEUS from PC. You will see your SD Card partitions.
- Follow next step as shown in screenshot (below).
clip_image007
3. Follow next step as shown in screenshot (below).
clip_image009
4. As shown below, move the dot to left side according to your require partition size. Once you do that, this partition will be called “Unallocated” because we haven’t formatted yet. We’ll do in next step. (Note: this is the partition in which your apps will move or linked).
clip_image011
5. After performing above step, it will show warning message as shown below. Just click YES. clip_image001[1]
clip_image013
6. Now we will define format method for unallocated partition. As shown screenshot follow the options and then click OK.
clip_image015
7. Now we are going to apply our settings for SD card. Click on “Apply” and proceed ahead. It will create partition on SD card (i.e. 200MB- Ext2. )
clip_image017
8. Unplug your phone from PC. PLEASE RESTART YOUR PHONE NOW.
After reboot, Go to Link2SD app. As it will start, you will see the message as shown in screenshot. Basically it mount script on SD card and it will run on next reboot and mount the partition that we have created.  Go ahead press OK, it will restart your phone.
clip_image019
9. After reboot, open Link2SD. It will pop up 4 options for you. Select ONLY that partition that you have created using EASEUS. (i.e select ext2, as we have cerated ext2 partition using EASEUS)clip_image021
10. After that you ready to go. Click on any apps that you want to link to SD –> Click on “Create Link” option –>Check mark all the boxes (it’ll pop up menu to ask which data files you want to move. Select all) and press OK.
It will move that app to SD and as shown below ,it’ll show red text at the bottom of app if its linked successfully.
clip_image023
clip_image025
11. Let’s have a look to the some features. In last step we have move app and data manually. What about auto move?
Follow screenshot, you  will get it. It will move apps directly to SD card automatically after enabling “Auto Link” option. (Note: Already installed apps won’t move automatically from internal to SD card, you have to do manually for those. This option only effective for next installation of any apps.)

clip_image027
12. Another useful features are shown below.
clip_image029
13. Last but not least, it will give info of Internal storage and SD card partition storage.
clip_image031
14. Hope you have setup Link2SD app successfully. Still if you have any problem, questions or comments, feel free to post it below in comment section. clip_image032
Thanks
Taken From: http://www.madteam.co/2011/09/30/link2sd-guide-and-usage-tutorial/

Install Gnome in Ubuntu 11.10 (Unity Desktop)

Here we go again. A new version of Ubuntu is out and if you still don't want to switch from it because of Unity, you are welcome to try and install Gnome. (I didn't try removing or disabling Unity this time, but you are welcome to).
Keep in mind that the new gnome leaves a lot to be desired (like that clock in the middle of the screen) and will take some time to get used to (not as much as Unity though).
Steps:

1. Open shell and run:

     sudo apt-get install gnome-shell

2. Once installed, you have to reboot.

3. After the reboot, on the login window select Gnome classic


clip_image002

An alternative is XFCE, you can either get XUbuntu or do the following:

     sudo apt-get install xubuntu-desktop

I have done this and it works but Gnome looks like crap, I’m seriously considering switching to another distro like MintLinux. CANONICAL please support GNOME again, Unity is good for tablets, but not for the Desktop, you can put Unity in the netbook version off Ubuntu.

Based on: http://www.virtualhelp.me/linux/470-install-gnome-in-ubuntu-1110-oneiric-ocelot

Saturday, December 24, 2011

Backup a Cisco Config Automatically – Time (Kron Method)

In order to get a router to copy the running-config to startup-config, for example every Sunday at 23:00, complete these steps:

1 - Create a kron policy list—This is the script that lists what commands the router should run at the scheduled time.

Router#enable
Router#configure terminal
Router(config)#kron policy-list Backup
Router(config-kron-policy)#cli show startup-config | redirect tftp://192.168.1.252/test.cfg
Router(config-kron-policy)#exit

cli—Specifies EXEC CLI commands within a Command Scheduler policy list.
policy-list—Specifies the policy list associated with a Command Scheduler occurrence.

Note: The reason why write was used rather than copy running-config startup-config is because kron does not support interactive prompts and the copy running-config startup-config command requires interaction. It is important to remember this when you create commands. Also, note that kron does not support configuration commands.


2 - Create a kron occurrence—This informs the router when and how often the policy should run.

Router(config)#kron occurrence SaveConfigSchedule at 23:00 Sun recurring
Router(config-kron-occurrence)#policy-list Backup

SaveConfigSchedule—This is the name of occurrence. Length of occurrence-name is from 1 to 31 characters. If the occurrence-name is new, an occurrence structure will be created. If the occurrence-name is not new, the existing occurrence will be edited.

at—Identifies that the occurrence is to run at a specified calendar date and time.
recurring—Identifies that the occurrence is to run on a recurring basis.


3 - Verify the kron configuration by using the show command.

Router#show kron schedule
Kron Occurrence Schedule
SaveConfigSchedule inactive, will run again in 1 days 12:37:47 at 23:00 on Sun

inactive—Means that kron is not running the command(s) at present.
active—Means that kron is running the current command(s).


Router#show running-configuration
...
kron occurrence SaveConfigSchedule at 23:00 Sun recurring
policy-list Backup
!
kron policy-list Backup
cli show startup-config | redirect tftp://192.168.1.252/test.cfg
...


Note: You can use this to schedule other things, just change the the policy-list, to what you want.

Based Onhttp://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_tech_note09186a008020260d.shtml

Friday, December 23, 2011

Backup a Cisco Config Automatically – Changes ( Archive Method )

Cisco IOS has the ability to save it’s configuration when you run the write memory command.
Here is how:

R1#enable
R1#configure terminal
R1(config)#archive
R1(config-archive)#path tftp://172.16.10.61/sw3725/sw3725.cfg
R1(config-archive)#write-memory
R1(config-archive)#exit
R1(config)#exit

The “write-memory” option means that when the running-config is saved to the startup-config a copy will also be saved on the tftp server, thus backing up the startup-config every time it’s changed.

In this example, we’ve configured the switch to save to the configuration file to the sw3725 sub-directory of a ttp server.
To test the setup, run the “write memory” command.

R1#enable
R1#write memory

or
R1#copy running-config startup-config

Looking on the sw3725 on the tftp server, we see a configuration file was uploaded:

sw3725.cfg-1

if you save the running-config a couple more times you wil get something like this:

sw3725.cfg-1
sw3725.cfg-2
sw3725.cfg-3

like you see the number at the end of the file name is incremented, every time you save the running-config

Based On: http://www.rainingpackets.com/configuring-cisco-ios-automatically-save-running-configuration-tftp-server-save

More Info at:

Boot From USB Disk in VMWare Workstation (increase boot screen also)

Increase the VMWare Boot Screen Delay

If you’ve wanted to try out a bootable CD or USB flash drive in a virtual machine environment, you’ve probably noticed that VMWare’s offerings make it difficult to change the boot device. We’ll show you how to change these options.

You can do this either for one boot, or permanently for a particular virtual machine.

clip_image002

Even experienced users of VMWare Player or Workstation may not recognize the screen above – it’s the virtual machine’s BIOS, which in most cases flashes by in the blink of an eye.

If you want to boot up the virtual machine with a CD or USB key instead of the hard drive, then you’ll need more than an eye’s-blink to press Escape and bring up the Boot Menu. Fortunately, there is a way to introduce a boot delay that isn’t exposed in VMWare’s graphical interface – you have to edit the virtual machine’s settings file (a .vmx file) manually.

Editing the Virtual Machine’s .vmx

Find the .vmx file that contains the settings for your virtual machine. You chose a location for this when you created the virtual machine – in Windows, the default location is a folder called My Virtual Machines in your My Documents folder.

In VMWare Workstation, the location of the .vmx file is listed on the virtual machine’s tab.

clip_image004

If in doubt, search your hard drive for .vmx files. If you don’t want to use Windows default search, an awesome utility that locates files instantly is Everything.

Open the .vmx file with any text editor.

clip_image006

Somewhere in this file, enter in the following line… save the file, then close out of the text editor:

bios.bootdelay = 20000

clip_image008

This will introduce a 20 second delay when the virtual machine loads up, giving you plenty of time to press the Escape button and access the boot menu. The number in this line is just a value in milliseconds, so for a five second boot delay, enter 5000, and so on.

Change Boot Options Temporarily

Now, when you boot up your virtual machine, you’ll have plenty of time to enter one of the keystrokes listed at the bottom of the BIOS screen on boot-up.

clip_image010

Press Escape to bring up the Boot Menu. This allows you to select a different device to boot from – like a CD drive.

clip_image012

Your selection will be forgotten the next time you boot up this virtual machine.

Change Boot Options Permanently

When the BIOS screen comes up, press F2 to enter the BIOS Setup menu.

clip_image014

Switch to the Boot tab, and change the ordering of the items by pressing the “+” key to move items up on the list, and the “-” key to move items down the list. We’ve switched the order so that the CD-ROM Drive boots first.

clip_image016

Once you make this change permanent, you may want to re-edit the .vmx file to remove the boot delay.

Boot from a USB Flash Drive

One thing that is noticeably missing from the list of boot options is a USB device. VMWare’s BIOS just does not allow this, but we can get around that limitation using the PLoP Boot Manager that we’ve previously written about. And as a bonus, since everything is virtual anyway, there’s no need to actually burn PLoP to a CD.

Open the settings for the virtual machine you want to boot with a USB drive. Click on Add… at the bottom of the settings screen, and select CD/DVD Drive. Click Next.

clip_image018

Click the Use ISO Image radio button, and click Next.

clip_image020

Browse to find plpbt.iso or plpbtnoemul.iso from the PLoP zip file. Ensure that Connect at power on is checked, and then click Finish.

clip_image022

Click OK on the main Virtual Machine Settings page.

clip_image024

Now, if you use the steps above to boot using that CD/DVD drive, PLoP will load, allowing you to boot from a USB drive!

clip_image026

Conclusion

We’re big fans of VMWare Player and Workstation, as they let us try out a ton of geeky things without worrying about harming our systems. By introducing a boot delay, we can add bootable CDs and USB drives to the list of geeky things we can try out.

Download PLoP Boot Manager

The Plop Boot Manager is a small program with unbelievable many features.

Here is a list of features, but you can do more...

  • USB boot without BIOS support (UHCI, OHCI and EHCI)
  • CD/DVD boot without BIOS support (IDE)
  • PCMCIA CardBus support to enable boot from USB PC-Cards
  • Floppy boot
  • Different profiles for operating systems
  • Define up to 16 partitions
  • No extra partition for the boot manager
  • Hidden boot, maybe you have a rescue system installed and the user should not see that there is another system installed
  • Boot countdown
  • Hide partitions
  • Password protection for the computer and the boot manager setup
  • Backup of partition table data
  • Textmode user interface 80x50
  • Graphical user interface 640x480, 800x600, 1024x786, 1280x1024
  • MBR partition table edit
  • Start of the boot manager from harddisk, floppy, USB, CD, DVD
  • Starting from Windows boot menu
  • Starting from LILO, GRUB, Syslinux, Isolinux, Pxelinux (network)
  • It can be used as PCI option ROM in your BIOS
  • Access the whole USB hard disk (up to 2TB) even when the bios has a 128 GiB limit
  • You can run the boot manager over the network
  • Start the networkcard bootrom from the boot manager to boot from the network

Based On: http://www.howtogeek.com/howto/16876/how-to-increase-the-vmware-boot-screen-delay/

Sunday, December 11, 2011

HTC Hero Modes - Key Combination

Recovery mode: Home + HangUp.
Fastboot mode: HangUp + Back.
Soft reset: Call + Menu + HangUp - has the same efect has removing the battery
Start in Safety Mode: Keep the Menu key pressed while phone is booting

These modes migth only work with rooted rom or a cyanogen mod.

HTC Hero Root/Recovery and ADB (Debug Mode)

Not sure if this has been put anywhere yet but a noobs guide to Rooting and using ADB. If your new to Android lots of ADB commands in forums can look scary but its really not. This guide will hopefully help you understand it all.
Information from the Unlockr Video guide., I Recommend watching this first to help with understanding.
http://www.youtube.com/watch?v=7w_R4...layer_embedded
1. Download these 4 files:

Android SDK
http://developer.android.com/sdk/dow...ows-1.5_r3.zip
Fastboot (scroll to Fastboot tool and download the appropriate one for you computer’s OS)
http://www.htc.com/www/support/android/adp.html#s2
Fastboot is a command line tool used to directly flash the filesystem in Android devices from a host via USB. It allows flashing of unsigned partition images


CM-Hero-Recovery.img
http://rapidshare.com/files/26262114...covery.img.zip


Superuser.zip
http://forum.xda-developers.com/atta...9&d=1249225060

2. Once you download the SDK, extract the SDK files to “C:\AndroidSDK”. Then extract the fastboot program to the C:\AndroidSDK\tools\ folder.

 
3. Extract the CM-Hero-Recovery.img.zip contents into the Tools folder in the AndroidSDK folder on your computer.


4. Extract the Superuser.zip contents into the Tools folder in the AndroidSDK folder on your computer.


5. Turn off the phone, then turn it back on by holding down the Power and Back button (to enter bootloader mode).


6. Plug the phone into the computer via USB. Make sure that it says FASTBOOT USB instead of FASTBOOT now.


7. Your computer should say installing drivers right now (if this is the first time you have connected the phone in fastboot mode).

8. Goto the Start menu type cmd into the run section of the start menu and hit enter to bring up the Command Prompt.

9. Type the following into the command dos prompt on the computer (the black screen with white letters that just opened) while the phone is connected through USB, hitting enter at the end of the line:
   cd\
   cd androidsdk\tools\
   fastboot devices


10.
You should see a serial number pop up and the word fastboot to the right of it. This means that your USB drviers are all set up correctly and you can continue. If you do NOT see this, then you need to start over or Google for how to set up the USB drivers correctly.


11. If the serial number and the word fastboot next to it popped up, then go back to the command prompt on the computer and type
   fastboot boot cm-hero-recovery.img


12. Once the phone boots up into the recovery screen type the following in the command prompt on the computer: 
  adb shell mount /system
   adb push su /system/bin/
   adb shell chmod 4755 /system/bin/su
   adb push Superuser.apk /system/app/
   adb shell reboot

13. Once the phone reboots, click the Menu button and click Settings.

14. Goto Applications > Development and check the USB debugging on.

15. While the phone is still plugged in, goto the Command Prompt still up on your computer and type:
adb devices
You should see a serial number, which means the computer is seeing the device.

16. Then type:
  adb shell
  su

The phone should pop up an su request. Click Always Allow on the phone.

17. Type:
   adb reboot

18. Phone should reboot and you now have Root Access! Try downloading a program that needs root access and see if it works to test it out.
notes, I have a custom rom after step 16 I did not get the request rebooted and opened up shootMe and it asked for permission at that stage I clicked Always Allow

ADB (Android Debug Bridge) – Install App (ShootMe) From PC
If you are not a developer and just want custom roms and apps. You don’t need the full SKD, if you have ever looked at guides for that and been scared away. You only need the SKD from google,(which you downloaded to get root) and not the eclipse parts.
download ShootMe http://www.mediafire.com/?igmztlyzzwj (as this is a good test if root access worked)


Make a folder called apps in your tools folder
Make a folder called apps in your tools folder.

  C:\AndroidSDK\tools\apps

In the apps folder put all the APK files you want to install. 

Open CMD 
Change directory to tools

   cd \
   cd AndroidSDK\tools\

Now type:
   adb remount
   (this is to make sure phone is mounted safety first)

Now type:
  adb push apps\ com.bw.picme.local.apk /system/app/
   (Replace com.bw.picme.local.apk with the title of your apk for other installs. )

Now type:
   adb reboot
   (after you have pushed your apps do a restart. And everything should be installed fine)


Open the application and have fun.
Please note that the slashes are different from each directory.  The first uses “\” this is from your computer
Second uses “/” this is on your phone.


Taken From: http://htcpedia.com/forum/htc-hero/1523-noob-guide-htc-hero-root-adb.html

Saturday, December 10, 2011

Cyanogen Mod on HTC Hero

HTC Hero (GSM): Full Update Guide

This guide will walk you through the process of taking the HTC Hero (GSM) from stock to having the ability to flash the latest version of CyanogenMod.

Contents

Before you do anything — Make a backup

Don't forget to back up your data. If you have synced the device with a Google account, then the contacts, calendar, Gmail, & select other Google-related data will not be lost and will come back after the next sync. However, you should backup anything you want to keep that is not stored on the SD card:
It would also be a good idea to backup everything stored on the SD card in the rare case the SD card must be formatted to resolve any major problems.
MyBackup Root, SMS Backup & Restore, and Call Backup & Restore are all free applications that can assist with backing up your data.

Installing a Custom Recovery Image

For the HTC Hero (GSM), there are two custom recovery images available, Amon_Ra's Recovery & the ClockworkMod Recovery. Choose one and follow the instructions below on how to install each custom recovery image. If the HTC Hero (GSM) already has a custom recovery image, skip this section.
WARNING: INSTALLING A CUSTOM RECOVERY IMAGE ON THE HTC HERO (GSM) WILL VOID THE WARRANTY.
Amon_Ra's Recovery
  1. You will need ADB on the computer to install Amon_Ra's Recovery on the HTC Hero (GSM). Follow the Android SDK guide, to get the ADB shell on the computer.
  2. Download flash_image & the latest version of Amon_Ra's Recovery:
    • flash_image: Download
      md5: bd475f29e0665c702f8eaf57a0423b58
    • Amon_Ra's Recovery 1.7.0.1: Download
      md5: 2c399ba2d780742c1eb8bb2710a31684

  3. Unzip the flash_image &and copy its contents with Amon_Ra's Recovery to the same folder as adb (the /platform-tools folder within the Android SDK folder).

  4. Connect the HTC Hero (GSM) to the computer via USB.

  5. On the computer, open terminal and run the following commands:
    adb push recovery-RA-hero-v1.7.0.1.img /data/local/
    adb push flash_image /data/local/
    adb shell chmod 777 /data/local/recovery-RA-hero-v1.7.0.1.img
    adb shell chmod 777 /data/local/flash_image
    adb shell rm /data/local/rights/mid.txt
    adb shell ln -s /dev/mtd/mtd1 /data/local/rights/mid.txt
    adb reboot

  6. The HTC Hero (GSM) will reboot. Once it's booted back all the way, run the following command:
    adb shell /data/local/flash_image recovery /data/local/recovery-RA-hero-v1.7.0.1.img

  7. Amon_Ra's Recovery should now be installed on the HTC Hero (GSM).
ClockworkMod Recovery
  1. You will need ADB on the computer to install the ClockworkMod Recovery on the HTC Hero (GSM). Follow the Android SDK guide, to get the ADB shell on the computer.
  2. Download flash_image & the latest version of the ClockworkMod Recovery:
    • flash_image: Download
      md5: bd475f29e0665c702f8eaf57a0423b58
    • ClockworkMod Recovery 2.5.0.7: Download
      md5: 4e576c048d8d4d8890e755992577a5b
  3. Unzip the flash_image &and copy its contents with the ClockworkMod Recovery to the same folder as adb (the /platform-tools folder within the Android SDK folder).

  4. Connect the HTC Hero (GSM) to the computer via USB.

  5. On the computer, open terminal and run the following commands:
    adb push recovery-clockwork-2.5.0.7-hero.img /data/local/
    adb push flash_image /data/local/
    adb shell chmod 777 /data/local/recovery-clockwork-2.5.0.7-hero.img
    adb shell chmod 777 /data/local/flash_image
    adb shell rm /data/local/rights/mid.txt
    adb shell ln -s /dev/mtd/mtd1 /data/local/rights/mid.txt
    adb reboot

  6. The HTC Hero (GSM) will reboot. Once it's booted back all the way, run the following command:
    adb shell /data/local/flash_image recovery /data/local/recovery-clockwork-2.5.0.7-hero.img

  7. The ClockworkMod Recovery should now be installed on the HTC Hero (GSM).

 

Flashing CyanogenMod

Amon_Ra's Recovery process
  1. Download the latest version of CyanogenMod.
    Optional: Download the Google Apps for the device.

  2. Place the CyanogenMod update.zip file on the root of the SD card.
    Optional: Place the Google Apps .zip on the root of the SD card also.

  3. Boot into Amon_Ra's Recovery.

  4. Once you enter Amon_Ra's Recovery, scroll up & down with the trackball, and the trackball button to select.

  5. Select Wipe, then Wipe data/factory reset

  6. Select Flash zip from sdcard.

  7. Select the CyanogenMod update.zip.
    • Optional: Install the Google Apps by performing steps 6 & 7 again and choosing the Google Apps update.zip.

  8. Once the installation has finished, select Reboot system. The HTC Hero (GSM) now should boot into CyanogenMod.
ClockworkMod Recovery process
Method via Recovery
  1. Download the latest version of CyanogenMod.
    Optional: Download the Google Apps for the device.

  2. Place the CyanogenMod update.zip file on the root of the SD card.
    Optional: Place the Google Apps .zip on the root of the SD card also.

  3. Boot into the ClockworkMod Recovery.

  4. Once the device boots into the ClockworkMod Recovery, use the side volume buttons to move around, and either the power button or the trackball to select.
    Optional: Select backup and restore to create a backup of current installation on the HTC Hero (GSM).

  5. Select the option to Wipe data/factory reset.

  6. Then select the option to Wipe cache partition.

  7. Select Install zip from sdcard.

  8. Select Choose zip from sdcard.

  9. Select the CyanogenMod update.zip.
    Optional: Install the Google Apps by performing steps 7 - 9 again and choosing the Google Apps update.zip.

  10. Once the installation has finished, select +++++Go Back+++++ to get back to the main menu, and select the Reboot system now option. The HTC Hero (GSM) should now boot into CyanogenMod.
Method via ROM Manager
  1. Launch RomManager.
    Optional: Choose the first option in the app, Flash ClockworkMod Recovery to update to the latest version.

  2. Select the Download ROM option from the main menu in the ROM Manager.

  3. Select the CyanogenMod option, and then choose the latest version of CyanogenMod from the menu.
    Optional: When you select the latest version of CyanogenMod, check the Google Apps* option.

  4. Once the ROM is finished downloading, it asks if you would like to Backup Existing ROM and Wipe Data and Cache.

  5. If Superuser prompts for root permissions check to Remember and then Allow.

  6. The HTC Hero (GSM) will now reboot into the recovery, wipe data and cache, and then install CyanogenMod. When it's finished installing it will reboot into CyanogenMod.

Taken From: http://wiki.cyanogenmod.com/wiki/HTC_Hero_(GSM):_Full_Update_Guide