informatica:linux:lvs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:lvs [2012/10/07 17:23] – javi | informatica:linux:lvs [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 16: | Line 16: | ||
Nota: todas las maquinas estan en la misma red | Nota: todas las maquinas estan en la misma red | ||
- | |||
===== Instalación y configuración inicial en el director (balanceador de carga) ===== | ===== Instalación y configuración inicial en el director (balanceador de carga) ===== | ||
Line 42: | Line 41: | ||
sudo ipvsadm -a -t 10.0.0.201: | sudo ipvsadm -a -t 10.0.0.201: | ||
+ | ===== Configuración de los real servers ===== | ||
+ | **IMPORTANTE**: | ||
- | ===== Configuración de los real servers ===== | + | http:// |
- | Probar, creo que pasos 1 y 2 NO son imprescindibles. Ver seccion errores | + | **TODO**: Hay que ver que consecuencias tiene eso a nivel de resolucion de nombres etc... |
- | 1. Ignoramos las peticiones ARP (http:// | + | 1. Ignoramos las peticiones ARP: |
sudo vim.tiny / | sudo vim.tiny / | ||
Line 54: | Line 55: | ||
Y le anyadimos las siguientes lineas (ajustar interfaz eth): | Y le anyadimos las siguientes lineas (ajustar interfaz eth): | ||
- | net.ipv4.conf.lo.arp_ignore = 1 | + | net.ipv4.conf.eth2.arp_ignore = 1 |
- | net.ipv4.conf.lo.arp_announce = 2 | + | net.ipv4.conf.eth2.arp_announce = 2 |
2. Aplicar los cambios: | 2. Aplicar los cambios: | ||
Line 61: | Line 62: | ||
sudo sysctl -p | sudo sysctl -p | ||
| | ||
- | net.ipv4.conf.lo.arp_ignore = 1 | + | net.ipv4.conf.eth2.arp_ignore = 1 |
- | net.ipv4.conf.lo.arp_announce = 2 | + | net.ipv4.conf.eth2.arp_announce = 2 |
3. Le asignamos la misma IP virtual del director (10.0.0.201) a la interfaz lo: | 3. Le asignamos la misma IP virtual del director (10.0.0.201) a la interfaz lo: | ||
Line 89: | Line 90: | ||
Teclear algo (' | Teclear algo (' | ||
+ | |||
+ | ===== Errores ===== | ||
+ | |||
+ | Si el paso 3 falla, hacer un flush de la tabla arp del cliente (10.0.0.16): | ||
+ | |||
+ | 1. Resolver la IP virtual: | ||
+ | |||
+ | nslookup 10.0.0.201 | ||
+ | |||
+ | En mi caso: | ||
+ | |||
+ | balancer2.dev.jj.com | ||
+ | |||
+ | 2. Hacer el flush de esa direccion: | ||
+ | |||
+ | sudo arp -nd balancer2.dev.jj.com | ||
+ | |||
+ | 3. Comprobar: | ||
+ | |||
+ | sudo arp -a | grep balancer2.dev.jj.com | ||
+ | |||
+ | balancer2.dev.jj.com (10.0.0.201) at < | ||
informatica/linux/lvs.1349630632.txt.gz · Last modified: 2015/04/13 20:19 (external edit)