martes, 19 de noviembre de 2013


Slide 1:
This presentation will demonstrate how to configure IPv6 EIGRP, as well as demonstrating the difference between real equipment and packet tracer.

Slide 2:
This is the topology we are going to use to demonstrate how to configure IPv6 EIGRP. Branch 2 and branch 3 were pre-configured with EIGRP. We are going to demonstrate using branch 1.

Slide 3:
When enabling IPv6 EIGRP on a router, you must first make sure ipv6 unicast-routing is enabled, or you will receive an error message. Once that is configured, we can go ahead and enable EIGRP on the router, along with the router ID. The EIGRP router ID is normally selected in the same manner as OSPF. The highest IP address assigned to a Loop back interface is selected as the router ID. If there are not any loopback addresses configured, the highest IP address assigned to any other interface is chosen as the router ID. Or we can simply hard-code the router ID using the EIGRP router ID command. The purpose of the EIGRP router ID is that it can be used as a loop prevention mechanism for external routes. Notice how there are two different command sets for real equipment and packet tracer. In order to enable ipv6 EIGRP and packet tracer, you enter the ipv6 EIGRP process ID, then configure a router ID, followed by the no shutdown command. The no shutdown command enables the ipv6 EIGRP process and packet tracer, but not necessarily on real equipment. Notice the difference in commands when using real equipment. You enter the ipv6 router process ID number, followed by the router ID command. When using real equipment, you can use either the EIGRP router ID command, or just router ID with the address. When you issue the show run command, it will display the router ID with EIGRP before it. Let's go ahead and configure branch 1 in packet tracer, with ipv6 EIGRP.

As you can see, the error message occurred when ipv6 unicast-routing was not enabled.
If we fail to enter the no shutdown command, the ipvr6 EIGRP routing process will not be enabled.
As you notice in the running configuration, it says shutdown. Now let's go to PUTTY and enter the commands on real equipment.
Again, the error message appears because ipv6 unicast-routing was not enabled.
Now if I go into the running configuration, you'll notice that it doesn't say shutdown where EIGRP is. You'll also notice it says EIGRP router ID, even though all we entered was the router ID command.

Slide 4:
Unlike IPv4 EIGRP, IPv6 EIGRP does not require the use of network command to advertise its networks. Instead IPv6 EIGRP must be enabled on all of the router's interfaces. This command must be configured on all of the router's interfaces that are participating in EIGRP. If we fail to configure this command on an interface, that network will not be advertised, therefore, it will not be learned by its neighbors.

Slide 5:
When IPv6 EIGRP is configured on all interfaces, a log message will inform you that an adjacency has been formed. Now let's go to packet tracer and configure the interfaces to participate in EIGRP.
Notice how no adjacencies are formed. This is because we did not enable the ipv6 EIGRP routing process using the no-shutdown command. Once a command is entered, an adjacency is formed.
Now let's go to branch 1 in real equipment and compare the difference.
Notice how an adjacency forms once I enable EIGRP on the serial interface. Let's issue the show IP route command and notice how nothing is being displayed. This is because the table is for ipv4 networks, but since we are using ipv6, we have to issue the ipv6 route commands.
Notice how branch 1 has learned networks from the other routers, as evidenced by the D in the ipv6 routing table. The L in the routing table is a new identifier, which indicates a specific address assigned to an interface, as opposed to the C, which only displays the subnet. You'll also notice that the L displays a 128-bit prefix, where the C displays the actual prefix configured on the interface.

Slide 6:
This is the show ipv6 eigrp neighbor command. As you notice, the link-local address is used to identify neighboring ipv6 EIGRP routers.

Slide 7:
The show IPv6 protocols command first shows that it's radical protocol being used is eigrp 100. Then it displays the K metrics. Then, if you notice below that, it says interfaces. Serial 0/0/0 and Serial 0/0/1. These are the interfaces that are participating, or enabled, for the EIGRP IPv6, and on the bottom it says distance: internal 90, external 170. These are the administrative distances for EIGRP.

Slide 8:
The show IPv6 route command displays more learned routes, as well as the Cs which are directly connected, and the Ls which are the interface addresses.

Slide 9:
The passive-interface is not currently supported by the current version of Packet Tracer for IPv6 EIGRP. But hopefully it will be added to our future version. You can use the passive interface command to control the advertisement of routing information. The command enables the suppression of routing updates over some interfaces while it allows updates to be exchanged normally over other interfaces. When used with EIGRP, it suppresses the exchange of hello packets between routers which will result in the loss of a neighbor relationship. Therefore, it is only used on interfaces where no routers are connected.
This stops not only routing updates from being advertised, but it also suppresses incoming routing updates. 

Slide 10:
The configuration is the same as those with IPv4 EIGRP. Let's go to PUTTY to show...
...IPv6 procol command and how it shows how gigabit interfaces are participating in EIGRP.
You notice that it shows not only gigabit interfaces, but the serial interface as well.
Now we are going to enter the passive interface command and suppress routing updates from being sent across gigabit interfaces.
Now let's go back to the show ipv6 protocol command and notice how it displays passive next to the gigabit interfaces. This tells you that the passive interface command was enabled.
Slide 12:
Now we are going to summarise Branch-3’s LANs into one summary address and then advertise to Branch-2.

Slide 13:
Summarized addresses are based on common bits in the network portion of the address. These two networks have 63-bits in common. As you can see, they have 16-bits in common on the first three hextets, and 15-bits in the fourth hextet, giving you 63-bits in total. Therefore, the summary address would be 2001:DB8:ACAD:A::/63.

Slide 14:
To advertise a summary address, issue the ipv6 summary-address eigrp AS address command and apply it to an interface where you would like the address to be advertised. This is applied to the serial interface that is connected to branch 2. This command is only entered on interfaces that connect to other routers. Before we configure the summary route on branch 3, let's go into branch 2 and enter the show ipv6 route command.

Here you'll notice how both routes are visible in the routing table.
Now let's go ahead and establish the summary route on branch 3 Serial0/0/1 interface. This is the interface that connects to branch-2. Now if branch-3 were connected to another router, say branch-4 on a Serial0/0/0 interface, we would configure the same command on that interface as well.
Now let's go back to branch-2 and issue the show ipv6 route command. But first did you notice how it changed the neighbor adjacency. A log message appeared, displaying this.
In branch-2, notice how I replace the two routes with one summary route with the prefix of 63.

Slide 15:
Normally, if a specific route to a particular network does not exist, a router will drop all traffic destined to that network. A default route, or "gateway of last resort", allows traffic to be forwarded, even without a specific route to a particular network listed in the routing table, With ipv6, a default route is identified the ipv6 route ::/0, the exit interface, the next hot router, or a fully specified route which uses both the exit interface and the address of the net hot router. We are going to configure a default router on branch-2, pointing to its loopback interface. This will be used to simulate the internet. In order to propagate the default route, we entered the reestablished static command, in IPV6 router mode.

Slide 16:
This slide shows the difference between the router that I configured with the default route, in this case branch-2, and the output of the router that learnt the default route - branch-1. The default route was configured on Branch-2 and is displayed as a static route via the Loop back interface. Branch-1 displays the default route in its routing table as an external route. The only differences between IPv4 EIGRP and IPv6 EIGRP is (1) there is no asterisk shown on the device that creates the default route and it doesn’t list the gateway of last resort. This completes my presentation on ipv6 EIGRP. I hope this was a helpful demonstration and may your networks continue to converge.

Si te gustó esta publicación no olvides compartirlo. Espero sus comentarios.

miércoles, 6 de noviembre de 2013

Solución: Error driver oci8 en php Codigniter con Oracle

Durante el desarrollo de mi aplicación web no tuve inconvenientes en conectarme con mi base de datos en Oracle, claro que ya había instalado del controlador OCI e integrado con PHP en mi servidor de pruebas bajo Fedora 20.

Al intentar desplegar mi aplicación a nivel de producción en un servidor CentOS 6, había realizado los mismos pasos de instalación de OCI8 pero mi aplicación no se conectaba con la base de datos y me desplegaba el mensaje:

A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: /home/helper/public_html/third_party/MX/Loader.php
Line Number: 102

Desactivé el debug de base de datos en application para que me muestre los errores con mas detalle en /application/config/database.php cambiando

$db['production']['db_debug'] = TRUE;


$db['production']['db_debug'] = FALSE;

Fue entonces donde obtuve los siguientes errores

A PHP Error was encountered

Severity: Warning
Message:  oci_parse() expects parameter 1 to be resource, boolean given
Filename: oci8/oci8_driver.php
Line Number: 186

A PHP Error was encountered

Severity: Warning
Message:  oci_set_prefetch() expects parameter 1 to be resource, null given
Filename: oci8/oci8_driver.php
Line Number: 171

A PHP Error was encountered

Severity: Warning
Message:  oci_fetch_assoc() expects parameter 1 to be resource, null given
Filename: oci8/oci8_result.php
Line Number: 153

A PHP Error was encountered

Severity: Warning
Message:  oci_fetch_assoc() expects parameter 1 to be resource, null given
Filename: oci8/oci8_result.php
Line Number: 153


El origen de estos errores estaba en el servidor Web Apache por lo siguiente: al reiniciar el servicio me salia el mensaje:

# service httpd restart

Parando httpd:                                             [  OK  ]
Iniciando httpd: httpd: apr_sockaddr_info_get() failed for WEBSERVER
httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName
                                                           [  OK  ]

Adicioné el nombre de mi servidor al archivo /etc/hosts al final de las lineas que comenzaban con y ::1

# vi /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4 WEBSERVER
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 WEBSERVER

Reinicié nuevamente el servidor web

# service httpd restart

Y el error desapareció y así logré conectarme sin inconvenientes a la base de datos tal cual lo hacia a nivel de desarrollo.

Otra posible causa de error

Quizá el problema que tengas es en el propio controlador OCI8 y su versión.

Para corregir el problema primero deberás verificar cual es la versión de tu driver oci8, para ello tienes dos opciones:
Opción 1. crearte el archivo info.php en el directorio raíz de tu sitio web con el siguiente contenido:

<?php phpinfo() ?>

Y acceder desde tu navegador web a través de la url http://tu.sitio/info.php. O si es local por medio de http://localhost/info.php

Ahora busca la sección de oci8 y ahí encontraras la versión del driver:


OCI8 Supportenabled

Opcion 2. Si tienes el CLI de php instalado ejecuta desde la linea de comandos:

$ php --ri oci8

y te desplegará algo similar a:


OCI8 Support => enabled
Version => 2.0.6
... => ...

Tanto por una opción o por otra obtenemos el mismo resultado: Versión de OCI8 "2.0.6" y precisamente ahí esta el problema.

Al parecer, en la versión 2 del driver OCI 8 se realizaron algunos cambios que están generando problemas en Codeigniter.

Es por eso que si la versión del driver OCI8 es 2.0.x, debemos instalar el último controlador estable de la versión 1.

¿Cómo hacemos eso?

Ahora bien, hagamos el cambio de versión del driver OCI 8 en GNU/Linux CentOS 6, si utilizas Ubuntu, Fedora, RedHat u otras distribuciones, no te preocupes pues también aplica.

Primero, desinstalamos el driver OCI 8 2.x desde la linea de comandos como superusuario:

# pecl uninstall oci8

instalamos el driver oci8 1.4.10

# pecl install oci8-1.4.10

Una vez concluido reiniciamos nuestro servidor Apache

# service httpd restart

Nuevamente comprobamos la versión de nuestro driver para verificar que todo este bien.


OCI8 Supportenabled
Revision$Id: 44bfa713983a99b3e59477f6532e...
Active Persistent Connections0
Active Connections0
Oracle Run-time Client Library Version12.
Oracle Instant Client Version12.1
Temporary Lob supportenabled
Collections supportenabled

Ahora probamos nuevamente la conexión a nuestra base de datos y los mensajes de error habrán desaparecido.

Si te gustó esta publicación no olvides compartirlo. Espero sus comentarios.