Tuesday, January 18, 2011


MPLS is called multiprotocol because it works with the Internet IP, ATM, and frame relay network protocols. With reference to the OSI model, MPLS allows most packets to be forwarded at the layer 2 (switching) level rather than at the layer 3 (routing) level. In addition to moving traffic faster overall, MPLS makes it easy to manage a network for quality of service (QoS).
A Label Switch Path (LSP) can be established in MPLS that crosses multiple Layer 2 transports like ATM, Frame Relay or Ethernet. Thus, one of the true promises of MPLS is the ability to create end-to-end circuits, with specific performance characteristics, across any type of transport medium, eliminating the need for overlay networks or Layer 2 only control mechanisms.
IPLC basically uses Layer 3 (Routing) to build a path for the data to flow in the network. Data routing in an IPLC is done using complex route lookups based on the destination IP address. The routing hardware finds the shortest path between the source and destination IP addresses to send data. This can be a hardware intensive task in times of heavy traffic leading to slower data traffic speeds. With hardware becoming more powerful every day, this is not such a major issue.
However, IPLC has major drawbacks in situations where traffic engineering and setting performance characteristics for different classes of traffic are required. Factors like delay and jitter also come into the picture in an IPLC connection that can cause major drops in QoS levels. This can cause problems in networks where data like video-conferencing are used.
MPLS has an edge over IPLC on this front since it provides network administrators the ability to set the path traffic will take through the network, and set performance characteristics for a class of traffic.

If your network requirements are such that you only need point-to-point connectivity, an IPLC typically will cost less than an MPLS circuit. Since an IPLC is your own private circuit, you can use your managed switches to prioritize traffic. But if you have any near future to add a third node to this network, MPLS will be the best way to go

MPLS could provide at least 2 types of link for this.
a) You can have a layer 2 MPLS (which sort of pretends to be an Ethernet WAN link of various flavours).
this type of service normally needs Ethernet access at each site -so you can connect directly to your LAN switches (but you shouldstill route over the WAN to control what is going on).

Or go for a L3 service - tends to cost more, but more flexible, and likely to allow other services if you want them.
Then you have to decide whether you run the CE routers on the service, or get that bundled, or hook direct to your WAN switches.
Then decide what QoS you want if any, what speed access tails and what type of connections, then possibly how much bandwidth to be rate limited.

The flip side with MPLS is someone else is looking after it for you, and you can add more sites since you have connected to a "cloud" service.

CentOS upgrade from 5.2 to 5.5 (final)

How to upgrade CentOS

#ps auxwww | grep -i yum
#kill -9
Remove any excluded packages by commenting out any exclude=XXXXX lines in /etc/yum.conf
#yum -y upgrade

This will upgrade the kernal as well.

you need to reboot the machine to reflect the new kernel.

If you just want to upgrade the kernel not the OS packages.

#yum upgrade kernel
#yum upgrade kernel-smp (4+ gb ram)

when the kernel upgrade completes edit the grub.conf

nano /boot/grub/grub.conf

title CentOS (2.6.18-194.32.1.el5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-194.32.1.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-194.32.1.el5.img
title CentOS (2.6.18-92.1.13.el5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-92.1.13.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-92.1.13.el5.img
title CentOS (2.6.18-92.el5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-92.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-92.el5.img

here point to note
Grub starts at 0, so "default=0".

reboot the machine by
shutdown -r now
init 6

When it comes back up run uname -a to make sure it has the new kernel.

If you want to use your old kernel then set "default=1"

Monday, January 17, 2011

How to install xdebug & MysqlND on CentOS

1. yum install php-pear

2. Yum install php-devel

The pecl command can then be found at /usr/bin/pecl

You can just use the pecl command to install new extensions like

3.sudo pecl install xdebug

Build process completed successfully

Installing '/var/tmp/pear-build-root/install-xdebug-2.1.0//usr/lib/php/modules/xdebug.so'

install ok: channel://pecl.php.net/xdebug-2.1.0

You should add "extension=xdebug.so" to php.ini

At this point, you should open your php.ini file an add the line as suggested, but use the zend_extension directive as follows:

zend_extension = usr/lib/php/modules/xdebug.so

How to Test it

vim xdebug.php

function test(){

echo "Called @ ".xdebug_call_file().

":".xdebug_call_line()." from".





:wq (Save and exit)


# php -e xdebug.php

should return like

Called @ /root/phpscript.php:8 from{main}

wow, you are done....

mysqlnd is a 5.3 feature

MySQLnd will most likely be the database driver for both the PDO MYSQL extension

and mysqli extension in PHP 5.3. It is still under development, but there are

currently releases for the mysqli extension.

The MySQL native driver for PHP is part of the official PHP source code repository at

http://php.net. It is contained in the PHP source code as of PHP 5.3.

If you are compiling PHP yourself, please use the configure options

--with-mysql=mysqlnd, --with-mysqli=mysqlnd and --with-pdo-mysql=mysqlnd

to compile PHP with mysqlnd support.

Let’s see how PHP and MySQL works together. Here is the list of three extensions which PHP uses to connect to MySQL.

pdo mysql

All of the above mentioned extensions are rely on MySQL’s client library libmysql. Mysqlnd is an another and alternative way of connecting PHP 5 and PHP 6 to the MySQL Server. Now the question arises why use Mysqlnd instead of other extensions ?

Here is the list of advantages of Mysqlnd library over other mentioned extensions.

  • It is very easy to compile, it does not have any dependencies issues with mysql client programming support.
  • It performs much better then libmysql in certain cases.
  • It provides persistent connections for mysqli.
  • It key feature is that it uses PHP memory management and it supports PHP memory limit.
  • It is famous for reducing memory footprint because it stores every row only once in memory while in the case of libmysql it is saved twice in memory.

By default the MySQL database extensions are configured to use MySQL Client Library. In order to use the MySQL Native Driver, PHP needs to be built specifying that the MySQL database extensions are compiled with MySQL Native Driver support. This is done through configuration options prior to building the PHP source code.

For example, to build the MySQL extension, mysqli and PDO MYSQL using the MySQL Native Driver, the following command would be given:

./configure --with-mysql=mysqlnd \

--with-mysqli=mysqlnd \

--with-pdo-mysql=mysqlnd \

[other options]

As most of the pre-packaged PHP binary installations may not have the support for mysqlnd enabled by default, it is recommended to build PHP and the required database extensions with mysqlnd from the source code

Upgrade PHP 5.1 to 5.3 on CentOS 3

# yum install yum-priorities

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-6.ius.el5.noarch.rpm

# yum install httpd

# yum remove php php-*

# yum install php53u-pear php53u php53u-cli php53u-common php53u-devel php53u-gd php53u-mbstring php53u-mcrypt php53u-mysql php53u-pdo php53u-soap php53u-xml php53u-xmlrpc php53u-bcmath php53u-pecl-apc php53u-pecl-memcache php53u-snmp

# vi /var/www/html/phpinfo.php

// Show all information, defaults to INFO_ALL

// Show just the module information.
// phpinfo(8) yields identical results.


# service httpd restart

Finally browse to your phpinfo.php http://x.x.x.x/phpinfo.php and view your newly configured PHP 5.3.3 Apache server.