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 16:35] – javi | informatica:linux:lvs [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 29: | Line 29: | ||
| Notas: | Notas: | ||
| - | -El comando tiene en cuenta la interfaz (eth) adecuada | + | -El comando tiene en cuenta la interfaz (eth) adecuada\\ | 
| -Esa IP sera asignada posteriormente a los real servers | -Esa IP sera asignada posteriormente a los real servers | ||
| Line 40: | Line 40: | ||
| sudo ipvsadm -a -t 10.0.0.201: | sudo ipvsadm -a -t 10.0.0.201: | ||
| sudo ipvsadm -a -t 10.0.0.201: | sudo ipvsadm -a -t 10.0.0.201: | ||
| - | |||
| ===== Configuración de los real servers ===== | ===== Configuración de los real servers ===== | ||
| - | 1. Ignoramos | + | **IMPORTANTE**: | 
| + | |||
| + | http:// | ||
| + | |||
| + | **TODO**: Hay que ver que consecuencias tiene eso a nivel de resolucion de nombres etc... | ||
| + | |||
| + | 1. Ignoramos las peticiones ARP: | ||
| sudo vim.tiny / | sudo vim.tiny / | ||
| Line 50: | 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 57: | 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 85: | 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.1349627712.txt.gz · Last modified:  (external edit)
                
                