Archive for category Asesoria

Como usar dos ISP y sumar el ancho de banda en conexiones ADSL/DSL/Cable

Algunas veces se han planteado las siguientes preguntas:

1) Tengo dos conexiones ADSL, o una ADSL y otra de cable. ¿Cómo puedo “sumar” el ancho de banda y así aprovechar simultáneamente ambas?

2) Tengo dos conexiones ADSL y quiero usar una para navegar y otra para compartir datos con amigos, para lo cual uso algún programa seguro P2P.

3) Tengo dos conexiones ADSL y quiero usar una para Internet y la otra para conectarme a mi empresa en teletrabajo y sólo para ello.

Bien, estos casos, aunque similares, son totalmente diferentes. Empecemos con una introducción al funcionamiento del TCP/IP.

INTRODUCCIÓN: Funcionamiento del TCP/IP

En una máquina, el TCP/IP tiene siempre el mismo comportamiento: en función de la tabla de rutas (visible mediante el comando ‘route print’), la capa de red de TCP/IP selecciona por dónde y a quién enviar el paquete de datos. Si existe una ruta específica para una determinada dirección de red, o bien para un rango de direcciones, se enviará al gateway /puerta de enlace que está definida en la tabla de rutas. Si no, se enviará al gateway por defecto, el cual es aquel que en la tabla de rutas está definido como 0.0.0.0. Si existiesen varios con dirección 0.0.0.0 se seleccionará aquel que tenga menor “métrica”, y a igualdad de métrica se seleccionará el primero de ellos (leyendo la tabla de rutas de abajo a arriba).

Las capas del TCP/IP ante una tabla estática, una vez que han decidido no cambian su decisión. Y puerta de salida (gateway) activa sólo puede haber una: cuando salimos de una casa lo hacemos por una puerta, no por dos a la vez.

Ante esto, podemos ver que los tres problemas planteados tienen “en principio” las siguientes respuestas:

1) No es posible, o un ISP o bien el otro.

2) No es posible ya que las IP de los destinatarios P2P pueden ser cualquiera. Es similar al caso 1

3) Es posible, siempre y cuando establezcamos la tabla de rutas correctamente, añadiendo una entrada a la dirección o direcciones de la empresa y apuntando al gateway que deseamos. Igualmente, para el resto de direcciones modificaremos si es necesario la tabla de rutas para que apunte al otro gateway. Esto es sencillo de realizar con el comando ‘route add’ y ‘route delete’ y con el parámetro ‘persistent’ si deseamos hacerlas persistentes y no tener que redefinirlas en cada reinicio de la máquina (la ‘persistencia’ sólo es posible en sistemas NT, XP, W200x y no es posible en sistemas W9X / ME). Pueden verse otros artículos míos de detalle sobre el funcionamiento del TCP/IP y cómo configurar en estos casos.

El punto 1) puede solucionarse mediante el mecanismo de balanceo de carga, el cual sigue cumpliendo la normativa RFC del TCP/IP y, básicamente, y aunque no es real el funcionamiento ya que se utilizan otros mecanismos, podríamos “intuir” que si tenemos un software que va contando los paquetes enviados y va decidiendo en función del número de ellos por qué puerta de enlace enviar -mediante criterios más o menos ‘inteligentes’-, simplemente cambiando la tabla de rutas irá el sistema enviando a uno u otro. Aunque realmente se usan otros procedimientos, esta lógica ‘intuitiva’ puede servirnos.

Hay dos posibles soluciones para el Balanceo de Carga, una software (y me voy a ceñir únicamente a soluciones en el Sistema operativo XP) y otra hardware.

Realmente la descomposición completa, para abordar toda la casuística, sería:

* Balanceo de carga (Load Balancing) por software.
* Balanceo de carga por hardware.
* ‘Circuit Bonding’ -es solo solución hardware-.

La diferencia entre balanceo de carga y ‘circuit bonding’ es que, en la primera, si tenemos dos líneas ADSL de 1024 Mbps cada usuario o cada conexión tendrá un máximo de 1024, lo que sucede es que lanzando las dos conexiones a la vez, tendremos un ancho de banda total de 2048, pero por cada conexión, limitado a 1024. En cambio en ‘circuit bonding’ -sólo hardware y que veremos al final- es una suma real y cada conexión puede alcanzar los 2048.

El ejemplo clásico es si nos estamos bajando un archivo grande, un ISO por ejemplo, en Load Balancing, (sin usar gestores de descargas que realizan conexiones múltiples), sólo estaremos bajando a 1024 -y nos quedan los otros 1024 libres para cualquier otra cosa. En cambio en ‘circuit bonding’ tendremos realmente los 2048 de bajada disponibles para dicha conexión.

BALANCEO DE CARGA POR SOFTWARE (XP)

Necesitaremos al menos dos NIC’s (tarjetas de red) si tenemos un PC únicamente, o bien 3 NIC’s si tenemos una red: dos de las NIC’s una a cada router ADSL, y la tercera NIC a la red local.

Únicamente hay en la actualidad dos programas capaces de hacerlo: Intergate www.vicomsoft.com y surfdoubler de midpoint software (www.midpoint.com). Esta última Web está cerrada en la actualidad -no sé si transitoriamente-, pero su software, al menos de demo, puede todavía encontrarse en muchos sitios de Internet.

La solución de midpoint, aunque es un software un poco antiguo y para W95 / NT con una interface un poco ‘cutre’, es una solución sencilla de configurar, rápida de instalar, estable y de un funcionamiento correcto. Sus mecanismos de balanceo y toma de decisión de la interface es correcta y rapidísima. En este sentido me parece mejor que la solución de Intergate.

En Intergate, existe actualmente la versión 9.02 en su Web, la cual puede bajarse para probarla. Esta versión, he sido incapaz de que funcionase, ni en XP-SP2 ni en W2000, ni en W2003. Entiendo que sólo es problema de la versión demo y no de la definitiva. El problema es que elimina el TCP/IP de Microsoft en las interfaces a Internet y lo sustituye por un servicio suyo que da la salida IP. Este servicio no arranca en ningún caso en sistemas limpios y recién instalados.

Leyendo documentación en Google, encontré buenas criticas de la versión anterior (8.60) y, ante la imposibilidad de obtenerla de Intergate, decidí bajarla de la red con el consiguiente peligro que esto conlleva (25 spyware y 7 virus). Aislada en una máquina virtual, a pesar de la infección, conseguí extraer los ejecutables reales limpios para prueba en otra instalación. Una vez instalado, -los manuales de la 9.02 sirven perfectamente para la versión anterior 8.60- su funcionamiento es totalmente correcto. Únicamente la matización, a nivel particular, de que no me gusta la desactivación del TCP de Microsoft y el uso de su stack IP independiente para este caso.

En las medidas realizadas, parece mas “ágil” la solución de Midpoint que por desgracia ya está sin soporte.

BALANCEO DE CARGA POR HARDWARE

El tema es más simple: un router con dos entradas WAN y ‘n’ salidas LAN. Cada router ADSL a una entrada WAN y el sistema hardware se encarga del balanceo en función de las peticiones de la LAN.

Los routers que he localizado en la actualidad y que cumplen estas características son:

Netgear FVS124G
Xincom XC-DPG402
Xincom XC-DPG502
Xincom XC-DPG602
OvisLink MN200
HotBrick Firewall VPN 600/2
HotBrick Firewall VPN 1200/2
ZyXEL ZyWALL 35
ZyXEL ZyWALL 70
Linksys RV082
Linksys RV016
Linksys RV042
Edimax BR-6104K
Xterasys XR-4106
Pheenet BIG-02/4
Symantec VPN 200
Nexland Pro800
BroDigit NFR3024
Hawking FR24

Esta lista no es exhaustiva y, aunque está actualizada en el momento de escribir este artículo, no estará de más una búsqueda en Internet de este tipo de routers si nos decantamos por una solución hardware.

CIRCUIT BONDIGN

Es una solución únicamente hardware (llamada también Bonding/muxing), en la cual los clientes tienen realmente la capacidad total, suma de ambas. Al contrario del Balanceo de Carga, en el cual dos líneas de 1024 equivalen a 2 x 1024 y limitada cada conexión a un máximo de 1024, esta solución da realmente los 2048 -suma de ambos- en este ejemplo.

Se necesitan varias condiciones en este caso:

1) Se requieren dos routers y otros dos dispositivos llamados MUXS.
2) Un router y un mux deben estar colocados en el ISP, y el otro router y mux en nuestro punto final de conexión.
3) El ISP, por tanto,debe ser único y no dos ISPs diferentes.
4) El ISP debe soportar, por supuesto, esta configuración. En la actualidad solo está soportado en líneas T1.

No Comments

THE HEATSINK GUIDE: Maximum CPU temperature and maximum CPU power usage

Introduction

This page is there to answer the common question: “My CPU is running at xx degrees, is it too hot?“. Here are the maximum temperatures for the most popular CPUs.

Keep in mind that the onboard measurement facilities are often inaccurate and may report temperatures that are too low. This is especially the case with motherboards that use a thermal sensor below the CPU to “guess” the CPU temperature. The temperature values displayed by the BIOS have usually a correction value added, to compensate for this problem – but in some cases this correction value may be too low, or the sensor might not be in good contact with the CPU.

This means: If the maximum allowed temperature for your CPU is 95°C, and your motherboard reports a CPU temperature of 90°C, then you are not on the safe side.

However, this doesn’t mean that you should start to panic when your Athlon XP CPU reaches 60 degrees celsius, for example. Most people tend to underestimate normal CPU operating temperatures – maybe due to overclockers bragging with their super-low CPU temperatures in forums.

Also, note that these values are for CPUs that are not overclocked. Overclocked CPUs may run unstable even if their temperature is way below the maximal specified temperature.

What happens if the maximum operating temperatures are exceeded?

If your cooler is insufficient and the temperature exceeds the maximum operating temperature, then this does not mean that the CPU is automatically damaged. With AMD CPUs, you will usually encounter crashes if the CPU is overheated; but these go away as soon as the CPU is cooler again. In the long term, running the CPU at a temperature that is too high may reduce the CPU life, since an overheated CPU is more prone to electromigration – even if it runs stable. With P4 CPUs, the CPU will turn its speed down automatically when it overheats. No damage to the CPU is possible, but the system will get slower while it’s hot (which, in some cases, users might not even notice).

If you attempt to operate a CPU without heatsink at all, recent AMD CPUs will usually be permanently damaged within seconds, unless special protection circuitry is available on the motherboard. P4 CPUs will run excessively slow without cooler.

The purpose of this page is to give you a quick overview of typical maximum operating temperatures for common CPUs. In the case of Intel CPUs, values vary a bit; if you need precise information for one specific CPU model, please use the datasheets on the CPU manufacturer’s website, or visit Chris Hare’s Processor Electrical Specifications page – there, you will find more details, and also data for more exotic CPU types than the ones covered here.

Higher is better here

On cooling-related websites, lower temperatures typically correspond to better products. On this particular page, the opposite is true: The higher temperatures a CPU can withstand, the less cooling is required. CPUs with low electrical power, but high temperature rating can be used with more quiet and more compact coolers. An example for such a CPU is the Pentium-M, which dissipates less than 25 watts, but may reach temperatures of up to 100°C. The worst-case example is the Pentium 4 Extreme Edition 3.46GHz, which dissipates over 110 watts, but may only reach a maximum temperature of 66°C. Obviously, you need a large and possibly loud cooler here.

The actual data:

AMD Athlon, Athlon 64, Opteron, Duron and Sempron
All Slot A CPUs (Athlon classic, Athlon Thunderbird) 70°C
Athlon Socket A up to 1 GHz, Duron up to 1.3GHz 90°C
Athlon “Thunderbird” Socket A 1.1GHz or more 95°C
Athlon MP 1.33GHz or more 95°C
Athlon XP up to 2100+ 90°C
Athlon XP 2200+ and faster 85°C
Duron “Applebred” 1.4G and faster 85°C
AMD Opteron 69 or 70°C
depending
on model
Athlon 64, 64FX, Sempron Most models 70°C; 65°C for some Socket 939 Athlon 64 models
Athlon 64 X2 (dual core) 65°C
AMD K6 series
All K6 CPUs (166-300MHz) and most K6-2/K6-III CPUs 70°C
K6-2/K6-III CPUs, model name ending with X (e.g. K6-2-450AFX) 65°C
K6-2-400AFQ (uncommon) 60°C (!)
K6-2+, K6-III+, most mobile K6/K6-2 CPUs 85°C
mobile K6/K6-2 model name ending with K (e.g. mobile K6-2-P-400AFK) 80°C

The temperatures specified for AMD CPUs max case surface temperatures. These CPUs do not have an internal diode to measure CPU temperature. The accuracy of the CPU temperature measurement depends on the motherboard; therefore, it is possible that the CPU overheats even though the CPU temperature reported by the motherboard is below the specified maximal temperature.

Intel Pentium III
Pentium III Socket 370 500-866MHz,
Pentium III Slot 1 (first generation, OLGA) 550-600MHz,
Pentium III Slot 1 (‘Coppermine’) 500-866MHz
80-85°C depending on model
Pentium III Socket 370 and Slot 1, 933MHz 75°C
Pentium III Slot 1 933MHz 60°C (!)
Pentium III Slot 1 1GHz 70°C for newer versions
60°C (!) for older version
Pentium III Slot 1 1.13GHz (first version) 62°C (!)

Pentium III max temperatures are the maximum temperatures reported by the thermal junction inside the CPU.

Intel Celeron / Celeron
Celeron 266-433MHz 85°C (max. CPU case temperature)
Celeron 466-533MHz (0.25µ) 70°C (max. CPU case temperature)
Celeron 533-600MHz (‘Coppermine) 90°C
Celeron 633 and 667MHz 82°C
Celeron 700-850 MHz 80°C
Celeron 900MHz-1.4GHz 69-70°C depending on model
Celeron 1.7GHz and faster 67-77°C depending on model

Celeron max temperatures are the maximum temperatures reported by the thermal junction inside the CPU, unless otherwise specified.

Intel Pentium II
Pentium II (1st generation, ‘Klamath’) 72-75°C depending on MHz
Pentium II (2nd generation, 2.0V core), 266-333MHz 65°C
Pentium II (350-400MHz) 75°C
Pentium II (450MHz) 70°C

Pentium II temperatures are the maximum temperatures of the thermal transfer plate (on which the heatsink is installed).

Intel Pentium 4, Pentium 4 Extreme Edition, Pentium M
Pentium 4
Max. temperature depends much on model and clockspeed, but no clear pattern is visible. Consult Intel’s tech specs for information on your particular model.
(Lowest: P4 Extreme Edition 3.2GHz with 64°C, highest: P4 Willamette 1.8GHz with 78°C).
64°C – 78°C
Pentium M 100°C (!)
Intel Pentium D (dual core)
Pentium D 820 (2.8GHz) 63°C
Pentium D 830 and 840 (3.0-3.2GHz) 69.8°C

Note: Pentium 4 and Pentium D temperature specifications indicate the maximum cover temperature, which is typically lower than the temperature reported by the internal thermal diode. Therefore, your system may be running fine even if the reported “CPU temperature” in the BIOS is higher than the temperature specified here. This does not mean that you’re on the safe side, though.

Intel Pentium Pro
Pentium Pro, 256 or 512K L2 cache 85°C
Pentium Pro, 1MB L2 cache 80°C

Pentium Pro temperatures are maximum surface temperatures.

Typical maximum power usage of common CPUs and overclocked CPUs

Apart from the maximum CPU operating temperature, the maximum power usage under typical worst-case conditions (thermal design power) is also essential for selecting a suitable cooling system. To find out about CPU power usage, please check out Chris Hare’s Processor Electrical Specifications page. There, you will find values for unoverclocked CPUs running at their specified voltage.

How can you estimate power usage of an overclocked CPU based on this value?

The theory behind calculating the power usage for an overclocked CPU is very simple: Power usage is proportional to clock speed, and proportional to the square of the core voltage.

Before we express this as a formula, let’s intruduce the following variables:

  • Ps is the power usage of the non-overclocked CPU
  • Po is the power usage of the overclocked CPU
  • Fs is the clock speed of the non-overclocked CPU
  • Fo is the clock speed of the overclocked CPU
  • Us is the default voltage of the non-overclocked CPU
  • Uo is the voltage at which the overclocked CPU runs

Here is the formula:

    Po = Ps * (Fo/Fs) * (Uo2/Us2)

A simple example:

We want to calculate the maximum power usage of a Athlon “Thunderbird” 1.33 GHz CPU  overclocked to 1.6GHz using 1,9V voltage. From this page, we find out that:

  • Ps is 70W (max)
  • Us is 1.75V

Also, we know that

  • Fs is 1.33GHz
  • Fo is 1.6GHz
  • and Uo is 1.9V

Therefore:

    Po = 70 W * (1.6/1.33) * (1.92/1.752) = 99.26 W

Values calculated using this method are not very accurate, since I/O voltage and FSB speed is not taken into account. However, they should be precise enough to help you decide what kind of power supply and cooling you need.

Disclaimer

The information here is provided WITHOUT WARRANTY of any kind. If you are designing a system and need to have accurate information on the maximum temperature of a specific CPU, please rely on the information provided by the CPU manufacturer, and not the information here.

Last update: December, 2004. Future CPU models (even if they are marketed under the same name/with the same MHz) as the CPUs mentioned here may have different thermal specifications.

Source: http://www.heatsink-guide.com/maxtemp.htm

No Comments

Instalar un Servidor SSH

Estoy preparando un post de programacion y necesitaba una maquina con conexion SSH para poder hacerlo asi que he decidido instalar un servidor de ssh en mi maquina.

Si necesitas conectar a tu maquina remotamente y quieres emplear un protocolo seguro esta es una buena opcion. Para la gente menos experta podriamos decir que SSH es como una conexion mediante telnet pero la informacion viaja de manera encriptada.

Con SSH te validas en el servidor y ya puedes introducir comandos de manera remota y segura. No es lo mismo que por ejemplo ejecutes un comando pasando un usuario y contraseña y esa informacion pueda ser capturada mediante un sniffer y sea facilmente legible, a que lo hagas con un protocolo seguro y aunque no imposible si que al menos es mucho mas dificil de descifrar.

Un buen servidor es “open ssh server“. Para instalarlo ejecuta el siguiente comando:


apt-get install openssh-server

Una vez instalado prueba a conectar con tu maquina:


ssh 127.0.0.1

Nota: 127.0.0.1 es la direccion IP que hace referencia a tu propia maquina

Deberas obtener algo similar a lo siguiente:


jose@soledad:~$ ssh 127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
RSA key fingerprint is 49:28:a6:6d:63:e8:bb:dd:e3:25:ff:56:3d:ac:7b:b1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts.
jose@127.0.0.1's password:
Linux soledad 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006 i686
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Last login: Thu Mar 15 16:05:30 2007
jose@soledad:~$

La primera vez que conectas con una maquina nueva a la que no has conectado antes, te aparece el mensaje:


The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
RSA key fingerprint is 49:28:a6:6d:63:e8:bb:dd:e3:25:ff:56:3d:ac:7b:b1.
Are you sure you want to continue connecting (yes/no)? yes

Si aceptas se guarda la entrada de la clave en tu directorio HOME en el directorio .ssh

Por ejemplo si listo el contenido de mi fichero sale:


jose@soledad:~/.ssh$ pwd
/home/jose/.ssh
jose@soledad:~/.ssh$ ls
known_hosts
jose@soledad:~/.ssh$ cat known_hosts
|1|Z4vAldjZlyCWX7qXzzTzi+PdRnw=|BhNX64JRBnggzBqga6Q2+nkiy0Q= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6Rm8mIRRmgiP5KIOsS68gTw9auscOi40fhyKyOnmgXTMZZFSv1GGThHfzSHdacLXfzAJiFOqWtCoH2CTHolsQOV5LcNcljTfWrAz4SwkZEBN5yKQlh9pAxStP2oJSXr6QyWgKI//cSIimzSOQonH8dw5Fxvt913D4Yq7MtPOsPrLIV/+FstfxEXJ00wjJ69s0ScUxipzPFvJ4fsSf8A/F2fdMMQw8McbHar4a9bDcs+s1FLJ09iPn5MsSArnX97fCRpSdzACrj4+ihTeR0fqKDUyyfukNTEMZx5QD5aoHqnciDsIu9nLXEYQWKqAkTlPG+wd9bI3kyI303v5BINbrQ==
jose@soledad:~/.ssh$

Las claves se guardan en un fichero denominado “know_hosts”, la proxima vez que conectes con una maquina a la que ya conectaste si su entrada esta en este fichero no te volvera a preguntar.

Una aclaracion, si cuando intentas conectar con tu servidor, tuvieras problemas de conexion con tu maquina o de conexion con otra maquina remota, comprueba que no tienes deshabilitado el acceso remoto:

Sistema > Administracion > Ventana de Entrada (Pestaña Remota y Accesibilidad)

No Comments