Monday, December 1, 2008

Configure cisco devices via console port with Linux using USBserial cable!

Hi,

If you were using Windows, then you might not notice any problem trying to configure cisco devices via a console port usign usbserial cable, just plug it in the USB of your laptop and install the appropriate driver, and you are done.

You will not notice a problem with MAC OS X either, some usbserial cables even do not need any driver.

But, when you are using Linux, then you are wondering, how to obtain the driver.

In Linux ,for ease of understand, comparing to Windows, drivers = kernel modules. So, you need to load the appropriate kernel module, to have the cable works.

Here is how to have this up and running, after reading this tutorial you will be able to configure your cisco devices or any other server via console port with your laptop using usbserial cable.

If you don't know how the usbserial cable looks like, here I have a picture for mine:













Steps:
1. Load the kernel module: 'sudo modprobe pl2303'


pl2303 is the kernel module that will enable using the usbserial, to verify that is has been loaded successfully use this command, 'echo $?', if the result is "0", then it is ok.


use: 'lsmod | grep pl2303' to see what are the modules that are loaded currently or depends upon by ours.
###
lsmod | grep pl2303

pl2303 22020 0
usbserial 35816 1 pl2303
usbcore 146412 7 pl2303,usbserial,usbhid,hci_usb,ehci_hcd,uhci_hcd
###
You can see that usbserial/usbcore modules are depended upon by pl2303.

2. plug the cable into any USB port in your laptop, and issue 'screen /dev/ttyUSB0 9600', supposing that your device's speed is 9600 and using the default for flow control and other parameters. If your devices uses speed other than 9600, then you have to specify it, if any of the parameters are different then you have to specify it either, read the manual page of the screen to see how.

3. your are now in your device console.

Cheers,

Friday, November 7, 2008

Resolving the APM issue, reducing HD Load_Cycle.

Hi,

There is a noticeable issue for whom using Linux (say Ubuntu) on laptops, which is the HD load cycle.

When you leave your laptop on battery power, HD generates a strange sound, maybe 3 time per minute or once every 10 seconds, this is the sound of parking/unparking.

This happens even during activity, and this severely shortens the life of hard drives, this bug is reported on the launchpad under the name: " Bug #59695 : High frequency of load/unload cycles on some hard disks may shorten lifetime".

Now, I think they managed to resolve the problem in the latest Ubuntu release 8.10. Yet, I am using Ubuntu 8.04.1 Hardy and the problem still exist.

Therefore, I have fixed this problem temporally until there is an official fix for this issue in the next update.

My solution will effectively keep this parameter at reasonable amount: 193 Load_Cycle_Count. You can know your number by executing this command in a shell: 'sudo smartctl -a /dev/sda', you have to install "smartmontools" program before you can use this command.

Steps:
1. install smartmontools by issuing this command in a shell: 'sudo aptitude install smartmontools'
2. create a new file named: "hdparm" in the /etc/init.d
3. edit /etc/hdparm.conf to add the following lines in it:

/dev/sda { #Your HD's name maybe different
apm = 255
spindown_time = 0
}

4. edit /etc/init.d/hdparm to add the following line in it:
#!/bin/sh
hdparm -B 255 /dev/sda #Or whatever your HD name is.
hdparm -S0 /dev/sda #Or whatever your HD name is.

5. give hdparm execute permission: 'sudo chmod +x /etc/init.d/hdparm'
6. edit /etc/acpi/power.sh: 'nano /etc/acpi/power.sh', to replace the 1 from the command '$HDPARM -B 1 /dev/$drive 2>/dev/null' with 255, the new command will be: '$HDPARM -B 255 /dev/$drive 2>/dev/null'
7. update the rc by issuing this command: 'sudo update-rc.d hdparm defaults', this will make hdparm script start at boot time.
8. DONE

This will reduce the number of spinning down per min/hour/day significantly.

Thanks

Saturday, October 25, 2008

VMware Workstation 6.5 ROCKS !!

Hi,

I have downloaded VMware Workstation 6.5 yesterday, it rocks, in fact it has more features than I thought.

One of the noticeable features is speed. Speed has been improved tremendously, huge gap comparing to the previous version.

I have been using VMware server 2 for a quite a while now, and wanted to do a quick comparison.

VMWorkstation:

- Unity mode: rather than only summary, console, quick switch and full screen, there is a new one called unity, so much like the seamless mode in VirtualBox, but far more speedy and stable.
- Wide range of guest OS support.
- New GUI installer for Linux.
- New virtual network editor (works great, and more than enough).
- When you chose a CD ISO image while creating a new VM, it auto-detects the guest OS (you can change the guest later).
- Aimed at Workstation virtualization (Desktop and Laptop).

VMServer:

- Wider range of guest OS support.
- Great performance, in focus on networking.
- Extra flexibility on networking.
- Client-Server design, for remote administration.
- WebGUI interface runs on top of a lightweight http server.
- VMware Infrastructure like management console.
- Aimed at server virtualization.

Enjoy,

Saturday, October 18, 2008

Hyper-V Integration Services Requires a Newer Version of Windows Vista

Hi,

Virtualization is a revolutionary technology, it offers so many features. In this article David is reviewing an error rises in the MS hyper-V, please read the full article:
Hyper-V Integration Services Requires a Newer Version of Windows Vista

Thanks

Use extended ping and extended traceroute to better troubleshoot your Cisco network

Hi all,

Ping and traceroute are the very basic troubleshooting commands issued by the network administrator to figure out problems.

Cisco routers offers an extended ping and traceroute commands, to know more about the extended commands offered by cisco, read David's article:
Use extended ping and extended traceroute to better troubleshoot your Cisco network



Regards

Friday, September 19, 2008

VIM text editor highlighted..

Hi,

If you are Ubuntu user, you are by default using vim text editor without highlighting. Well, if you have used openSUSE before, then you will notice that its vim editor comes with this feature out-of-the-box.

We managed to see Ubuntu easier and more eye-candy than other Linux distros, so, why this feature is absent from Ubuntu while it is a nice and eye-candy one.

Lets go ahead and enable it together, it is easy:

1. Open a shell ..
2. Type this:
sudo gedit /etc/vim/vimrc
(Install vim if it is not already installed, just type: sudo aptitude install vim).
3. Search for: "syntax"
4. You will see this line commented:
#syntax on
5. Remove the # sign (uncomment the line).
6. Save and exit gedit.
7. We are done, enjoy vim highlighted.

Thanks.

Wednesday, September 10, 2008

Enjoy man pages colorized

Hi everyone,

Linux users know that manual pages (aka man pages), is initially black and white.

Yet, we can colorize them with two simple steps: (I use Linux mint/ubuntu here)

-- Open a shell and execute this:
sudo aptitude install most
-- After application is installed successfully, execute the following:
sudo update-alternatives --set pager /usr/bin/most

That is it, now enjoy a beautiful colored man pages..

Cheeeeeeeers.

Sunday, September 7, 2008

How to look up in the dictionary, via CLI (Command Line Interpreter)

Hi,

Have you been in a problem, when you don't have a GUI, and want to look up a word in the dictionary.

Here is how to do it, so let's begin:

Everybody heard about www.dict.org. Oh, you did not! so let me tell you, dict.org is a WWW interface to several freely available on-line dictionaries.

This is the first resource, second, is DICT protocol, which is a protocol to access dictionary services on the Internet (like www, a protocol to access hyper-text transfer services on the Internet, i.e. web browsing).

So, we need a combination, to make DICT to transfer data from dict.org via CLI. Yes, we have curl.

CURL, is a tool to transfer data from or to a server, using one of the supported protocols HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction.

Now, how to use curl to transfer dictionary queries from dict.org to our CLI, here is how:

curl dict://dict.org/d:<word_to_look_in_the_dictionary>

for example: curl dict://dict.org/d:lion, will give the following results:

220 aspen.miranda.org dictd 1.9.15/rf on Linux 2.6.18-6-k7 <675471.1393.1220856699@aspen.miranda.org>
250 ok
150 1 definitions retrieved
151 "Lion" gcide "The Collaborative International Dictionary of English v.0.48"
Lion \Li"on\ (l[imac]"[u^]n), n. [F. lion, L. leo, -onis, akin
to Gr. le`wn. Cf. {Chameleon}, {Dandelion}, {Leopard}.]
1. (Zool.) A large carnivorous feline mammal ({Panthera leo},
formerly {Felis leo}), found in Southern Asia and in most
parts of Africa, distinct varieties occurring in the
different countries. The adult male, in most varieties,
has a thick mane of long shaggy hair that adds to his
apparent size, which is less than that of the largest
tigers. The length, however, is sometimes eleven feet to
the base of the tail. The color is a tawny yellow or
yellowish brown; the mane is darker, and the terminal tuft
of the tail is black. In one variety, called the {maneless
lion}, the male has only a slight mane.
[1913 Webster]

2. (Astron.) A sign and a constellation; Leo.
[1913 Webster]

3. An object of interest and curiosity, especially a person
who is so regarded; as, he was quite a lion in London at
that time.
[1913 Webster]

Such society was far more enjoyable than that of
Edinburgh, for here he was not a lion, but a man.
--Prof.
Wilson.
[1913 Webster]

{American lion} (Zool.), the puma or cougar.

{Lion ant} (Zool.), the ant-lion.

{Lion dog} (Zool.), a fancy dog with a flowing mane, usually
clipped to resemble a lion's mane.

{Lion lizard} (Zool.), the basilisk.

{Lion's share}, all, or nearly all; the best or largest part;
-- from Aesop's fable of the lion hunting in company with
certain smaller beasts, and appropriating to himself all
the prey.

{Lion of Lucerne}, a famous sculptured lion at Lucerne,
Switzerland, designed by Thorwaldsen and dedicated in 1821
as a memorial to the Swiss Guards who fell defending Louis
XVI. in the attack of the mob on the Tuileries, Aug. 10,
1792. The animal, which is hewn out of the face of a rock,
is represented as transfixed with a broken spear and
dying, but still trying to protect with its paw a shield
bearing the fleur-de-lis of France.

{Lion of St. Mark}, a winged lion, the emblem of the
evangelist Mark, especially that of bronze surmounting a
granite column in the Piazzetta at Venice, and holding in
its fore paws an open book representing St. Mark's Gospel.


{Lion of the North}, Gustavus Adolphus (1594-1632), King of
Sweden, the hero of the Protestant faith in the Thirty
Years' War.
[1913 Webster + Webster 1913 Suppl.]
.
250 ok [d/m/c = 1/0/17; 0.000r 0.000u 0.000s]
221 bye [d/m/c = 0/0/0; 0.000r 0.000u 0.000s]

Thank you for viewing,

Saturday, August 30, 2008

Change the MAC address of a NIC in Debian system

Hi,

Today we will see how to change the MAC address of a Network Interface Card (NIC) in a Debian/Debian like system.

There are a lot of reasons you might want to manually set your MAC address for your network card.

To do so, we need to edit the "/etc/network/interfaces" file.
Run this command in a shell:
gedit /etc/network/interfaces
OR
vim /etc/network/interfaces

We should see the line for the NIC, it should be eth0 for the first Ethernet interface, or wlan0 for the first wireless Lan. If we have dhcp enabled, it will look like this:

auto eth0
iface eth0 inet dhcp

By adding another line we shall change the NIC MAC address:

auto eth0
iface eth0 inet dhcp
hwaddress ether 00:13:e8:a5:2a:c9

MAC address (Media Access Control), is a 6 bytes address in hexa format, its format should look like this: xx:xx:xx:xx:xx:xx. Each x is a number from 0-9, or a letter from a-f.

Now, we have to restart the networking service for the changes to take effect, by running this command in a shell as root:
/etc/init.d/networking restart

After changes take effect, we have successfully changed the MAC address of our happy NIC.

Regards,

Friday, July 25, 2008

OSPF, some useful info

OSPF is a Link-Stat routing protocol, which relies on the Djikestra algorithm to calculate all of its tables (routing table ... etc), here are some of its key specifications:

* There is a property called Adjacency, which is the relationship between two or more routers that its formation is a condition to begin exchange routing information, there are variables must match for that adjacency to form, and other variables must be unique:
-- Must match:
- Area number
- Hello and dead timers
- Mtu (the maximum transmission unit)
. ip ospf mtu-ignore - in case we want to ignore this variable
- Compatible network types
- Stub flags
- Authentication

-- Must be unique
- IP address
- OSPF router-id

OSPF network types:
-- Types
- BC (broadcast network)
- Non-BC (non-broadcast network)
- P2P (point-to-point network)
- P2MultiP (point-to-multi-point network)
- P2MultiP Non-BC (point-to-multi-point non-broadcast)

Network types affects the following:
- Unicast/ Multicast
- DR/BDR election
- Next-hop processing

-----------------------------------------

Broadcast network type:
- Default on broadcast medias - Ethernet/Token Ring
- Sends hellos as multicast - 224.0.0.5/6
- Performs DR/BDR election

DR/BDR election:
- Used to minimize LSA replications
. Like BGP router-reflector
- Election based on priority and router-id
. 0-255
. Higher is better
. 0=never prompt the election
- Router-id - higher wins
. Highest loopback/interface IP
. Can be statically set
. higher is better

Non-broadcast network
- Default on multi-point NBMA medias
. Frame relay / ATM
- Sends hellos as unicast
. static "neighbor" command is necessary
- Performs DR/BDR election

Point-to-Multipoint
- Non a default option
- Sends hellos as multicast
. 224.0.0.5
- No DR/BDR election happens
- Modifies next-hop processing
- Best option for NBMA

Point-to-multipoint non-broadcast
- Not a default option
- Sends hellos as unicast
. Static "neighbor" statement
- No DR/BDR election
- Modifies next-hop processing

OSPF Convergence Timers
- Convergence based on hello and dead timers.
- Different timers for different network types
- Changing hello time automatically adjusts dead time
. ip ospf hello-interval
. ip ospf dead-interval
- New feature: sub-second convergence

Changing the network type will cause adjacency to form but no routing information will be exchanged.
Broadcast -------
|--> will adjacent and will exchange routing information
Non-broadcast ---
|
|------> will adjacent but will not exchange routing information
|
Point-to-Point ----------------
Point-to-Multipoint |--> Will adjacent and will exchange routing information
Point-to-Multipoint Non-Broadcast ----

Kind regards,

Tuesday, July 22, 2008

EIGRP is a DV protocol, and the secondary IP in the routing protocols ..

Hi,

This articles is written to declare somethings regarding EIGRP and a hidden trick in every routing protocol:

-- EIGRP:

It is common to say EIGRP is a hybrid routing protocol, BUT, this is a common mistake.
In fact, EIGRP is a distance vector routing protocol, well, at least it has the split-horizon feature. Furthermore, EIGRP contains all the distance vector features, the big BUT here is: it is an enhanced Distance Vector protocol, so, it does not have the negative features other DV protocols have.

Anyway, if you don't believe me, then, you are free to refer to the official Cisco website, there you will have the ultimate shock ;-)

-- The hidden trick:

Sometimes, easy things become a nightmare for the engineer whom configuring a router, when configuring a routing protocol, and you think everything is going fine, BUT, the nightmare is: the routing protocol does not work as expected.

Why? Here we begin troubleshooting. And nothing wrong found.

Finally rises the hidden hated trick, the network you are trying to advertise in the routing protocol is one of the subnets assigned to an interface as a secondary IP.

It is that easy, but it turns a journey into a nightmare. Here is the trick: no routing protocol deals with a secondary IP, and even if you add the network statement hundreds of times for that particular subnet, it will not included in the routing protocol calculations.

Just for fun, both of these created problems to me, and turned my funny work into a hell.

I hope it was informative for you,
My regards,

Sunday, July 20, 2008

How to make firefox faster

Mozilla Firefox is a graphical web browser developed by the Mozilla Corporation.

Mozilla Firefox is a cross-platform browser, providing support for various versions of Microsoft Windows, Mac OS X, and Linux.

Although not officially released for certain operating systems, the freely available source code works for many other operating systems, including FreeBSD,OS/2, Solaris, SkyOS, BeOS and more recently, Windows XP Professional x64 Edition.

I am providing some Very Useful Tips to speedup your Firefox.

Lets begin:


In your location bar (URL), type about:config

Tip1
In the filter bar type network.http.pipelining
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Tip2
In the filter bar again and type network.http.pipelining.maxrequests
Default it says 4 under value field and you need to change it to 8

Tip3
Go to the filter bar again and type network.http.proxy.pipelining
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Tip4
Go to the filter bar again and type network.dns.disableIPv6
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Tip5
Go to the filter bar again and type plugin.expose_full_path
Normally it says ” false ” under value field , Double click it so it becomes ” true “.

Tip6
Now you need to Create new Preference name with interger value for this got to Right click -> New -> Integer
Here you need to type nglayout.initialpaint.delay and click ok
Now you need to enter 0 in value filed and click ok

Tip7
Now you need to Create one more Preference name with interger value for this got to Right click -> New -> Integer
Here you need to type content.notify.backoffcount and click ok
Now you need to enter 5 in value filed and click ok

Tip8
Now you need to Create one more Preference name with interger value for this got to Right click -> New -> Integer
Here you need to type ui.submenuDelay and click ok
Now you need to enter 0 in value filed and click ok

Some more Tweaks
Enable the spellchecker for inputfields and textareas (default is textareas only)
layout.spellcheckDefault=2

Open lastfm://-links directly in amarok
network.protocol-handler.app.lastfm=amarok
network.protocol-handler.external.lastfm=true

Firefox Memory Leak Fix
Open a new tab. Type “about:config” without quotes into the address bar and hit enter/click Go.
Right-click anywhere, select New, then Integer. In the dialog prompt that appears, type:
browser.cache.memory.capacity


Click OK. Another dialog prompt will appear. This is where you decide how much memory to allocate to Firefox. This depends on how much RAM your computer has, but generally you don’t want to allocate too little (under 8MB), but if you allocate too much, you might as well not do this. A good recommended setting is 16MB. If you want 16MB, enter this value into the dialog prompt: 16384

(Why 16384 instead of 16000? Because computers use base-12 counting. Thus 16 megabytes = 16384 bytes. Likewise, if you want to double that and allocate 32MB, you’d enter 32768.)

Click OK to close the dialog box, then close all instances of Firefox and restart. If your Firefox still uses the same amount of memory, give it a few minutes and it should slowly clear up. If that fails, try a system reboot.

Now your Firefox will now be 3 - 30 times faster in loading pages.



Original article can be found in: www.ubuntugeek.com

How to make fonts in Ubuntu Linux more clear

This is how to make fonts in Ubuntu Linux more clear and nicer.
Four very easy steps and all done, so lets get started:

-- Open a terminal window and write this line into it:
sudo ln /etc/fonts/conf.avail/10-autohint.conf /etc/fonts/conf.d/. -s

-- edit the file ~/.fonts.conf, which is in your home directory, or create it if it does not exist:
gedit ~/.fonts.conf

-- then write the following xml code in it:

code

Done, save and exit gedit.

-- Finally run the following command in the opened terminal window:
fc-cache -vf

Now you are done, but one more step further, restart your graphical session ;-)

You will notice the fonts are very clear and much more sharper and nicer.

Regards,

Saturday, July 19, 2008

How did I achieve my CCNA certificate

I achieved my CCNA by passing the fast-track 640-802.

When you start to prepare for the CCNA exam, you have to make a studying program. If your studying is random, then you will not pass it for your life.

I made this program for myself, and I stuck to it:

-- I studied continuously for 51 days.

-- I started with Chris Bryant video course (TrainSignal). With 10 hours of studying a day, I was able to finish this course with 17 days, including the labs.

-- After that, I begun with the Cisco Press, and finished it with 12 days. (17+12=29)

-- After finishing Cisco Press, I begun studying Jeremy's course (CBT Nuggets), I finished with 17 days, I consider this course a review. (29+17=46).

-- I toke 3 days for rest. (46+3=49).

-- One day before the exam for registration. (49+1=50).

-- One day for the exam. (50+1=51).


By the way, I have my own lab, I don't have to rent a rack remotely. I have built my own lab for preparation for the CCNA exam, and upgraded it to help myself passing CCIE.


Finally, I passed the exam (640-802) with 947 points.

Now, I am preparing for the CCIE, I was planning to do the CCNP first, but, I decided finally to achieve the CCIE directly.

My best wishes to you all ;-)

Welcome to my newly opened blogsite

Hi everyone,

I am so happy to open my blog, it still new, and there are no posts into it for the moment. BUT it will be enriched with IT stuff very soon.

I invite you to my site too: http://laith43d.googlepages.com


Kindest regards,

Laith Z.