F5 LTM Configuring BIG-IP v11
F5 LTM Configuring BIG-IP v11
F5 LTM Configuring BIG-IP v11
F5 BigIP LTM
Capacitacin
Avanzada
Agenda
1.
2.
3.
4.
iRules
Monitores personalizados
TMOS 11 new features
TMOS 11 new features: iAPPs
Agenda
5.
6.
7.
8.
TMOS 11 Mantenimiento
Redundancia BIGIP V11
Enterprise Manager
Laboratorios
Agenda
9. Viprion
10. Laboratorios
iRules
Conceptos y Sintaxis
Eventos
Configuracin
iRules
when EVENT {
if { conditional_statement } {
action_when_condition_true
}
}
iRule: Nombre
10
iRule: Evento
11
iRule: Condicin
12
iRule: Accin
13
iRule: Operadores
Relacionales
contains
match
equals
starts_with
ends_with
Logicos
not
and
or
14
iRule: Eventos
Syn, Syn-Ack, Ack
Internet
Client Data
CLIENT_ACCEPTED
CLIENT_DATA
HTTP_REQUEST_DATA
SERVER_SELECTED
Syn, Syn-Ack, Ack
SERVER_CONNECTED
Server
Response
HTTP_RESPONSE_DATA
SERVER_DATA
15
iRule: Eventos
Globales
Client Accepted Syn, SynAck, Ack
Server Data html page to client
HTTP
HTTP request o HTTP response
SSL
Client SSL handshake
Authenticacin
Auth Failure
16
iRule: rdenes
Las rdenes de iRules provocan que
Big-IP realice una accin
Siempre aparecen entre llaves en la
declaracin del evento
Tipos de rdenes
rdenes de Consulta
rdenes de Accin o Modificacin
rdenes de Instruccin
17
18
19
20
iRule: Eventos
Eventos HTTP
HTTP_CLASS_FAILED - Triggered when an HTTP request is made to a virtual server with at least one HTTP
class configured. and the request does not match the filters of any HTTP class.
HTTP_CLASS_SELECTED - Triggered when an HTTP request matches an HTTP class.
HTTP_REQUEST - Triggered when the system fully parses the complete client HTTP request headers.
HTTP_REQUEST_DATA - Triggered when an HTTP::collect command has collected the specified amount of
request data.
HTTP_REQUEST_SEND - Triggered immediately before an HTTP request is sent to the server-side TCP
stack.
HTTP_RESPONSE - Triggered when the system parses all of the response status and header lines from the
server response.
HTTP_RESPONSE_CONTINUE - Triggered whenever the system receives a 100 Continue response from
the server.
HTTP_RESPONSE_DATA - Triggered when an HTTP::collect command has collected the specified amount of
response data.
HTTP_REQUEST_RELEASE - Triggered when the system is about to release HTTP data on the serverside of
the connection.
HTTP_RESPONSE_RELEASE - Triggered when the system is about to release HTTP data on the clientside
of the connection
21
rule BrowserType {
when HTTP_REQUEST {
if { [[HTTP::header User-Agent] contains MSIE] }
{ pool IE_pool }
elseif { [[HTTP::header User-Agent] contains Mozilla] }
{ pool Mz_pool }
}
}
22
23
24
Configuracin de iRules
Se deben Crear los Pools primero
Luego crear las reglas
Luego apuntar el VS a la regla
25
Configuracin de iRules
Creacin de la Regla
26
Configuracin
iRule Editor
Download http://devcentral.f5.com/Default.aspx?tabid=66
Se pueden subir directamente a los BIG-IP
No es posible guardarlas localmente
27
iRule: Eventos
Comandos eventos HTTP
HTTP::class - Returns or sets the HTTP class selected by the HTTP selector.
HTTP::close - Closes the HTTP connection.
HTTP::collect - Collects an amount of HTTP body data that you specify.
HTTP::cookie - Queries for or manipulates cookies in HTTP requests and responses.
HTTP::disable - Changes the HTTP filter from full parsing to passthrough mode.
HTTP::enable - Changes the HTTP filter from passthrough to full parsing mode.
HTTP::fallback - Specifies or overrides a fallback host specified in the HTTP profile.
HTTP::header - Queries or modifies HTTP headers.
HTTP::host - Returns the value of the HTTP Host header.
HTTP::is_keepalive - Returns a true value if this is a Keep-Alive connection.
HTTP::is_redirect - Returns a true value if the response is a redirect.
HTTP::method - Returns the type of HTTP request method.
HTTP::password - Returns the password part of HTTP basic authentication.
HTTP::path - Returns or sets the path part of the HTTP request.
HTTP::payload - Queries for or manipulates HTTP payload information.
HTTP::query - Returns the query part of the HTTP request.
HTTP::redirect - Redirects an HTTP request or response to the specified URL.
HTTP::release - Releases the data collected via HTTP::collect.
HTTP::request - Returns the raw HTTP request headers.
HTTP::request_num - Returns the number of HTTP requests that a client made on the connection.
HTTP::respond - Generates a response to the client as if it came from the server.
HTTP::retry - Resends a request to a server.
HTTP::status - Returns the response status code.
HTTP::uri - Returns or sets the URI part of the HTTP request.
HTTP::username - Returns the username part of HTTP basic authentication.
HTTP::version - Returns or sets the HTTP version of the request or response.
28
iRule: Eventos
Eventos de conexiones
CLIENT_ACCEPTED - Triggered when a client has established a connection.
CLIENT_CLOSED - This event is fired at the end of any client connection.
regardless of protocol.
CLIENT_DATA - Triggered each time new data is received from the client while
the connection is in collect state.
CLIENTSSL_DATA - Triggered each time new SSL data is received from the
client while the connection is in collect state.
SERVER_CLOSED - This event is triggered when the server side connection
closes.
SERVER_CONNECTED - Triggered when a connection has been established
with the target node.
SERVER_DATA - Triggered when new data is received from the target node after
TCP::collect command has been issued.
SERVERSSL_DATA - Triggered when new SSL data is received from the target
node after SSL::collect command has been issued.
29
iRule: Eventos
Comandos de conexiones
IP::addr - Performs comparison of IP address/subnet/supernet to IP
address/subnet/supernet. or parses 4 binary bytes into an IPv4 dotted quad address.
IP::client_addr - Returns the client IP address of a connection
IP::hops - Gives you the estimated number of hops the peer takes to get to you.
IP::idle_timeout - Returns or sets the idle timeout value.
IP::local_addr - Returns the IP address of the virtual server the client is connected to or
the self-ip LTM is connected from.
IP::protocol - Returns the IP protocol value.
IP::remote_addr - Returns the IP address of the host on the far end of the connection.
IP::server_addr - Returns the servers IP address.
IP::stats - Supplies information about the number of packets or bytes being sent or
received in a given connection.
IP::tos - Returns the ToS value encoded within a packet.
IP::ttl - Returns the TTL of the latest IP packet received.
IP::version - In Progress - Add Summary Here
30
iRules DevCentral
Interactive User Community
http://devcentral.f5.com
31
Monitores personalizados
External Monitor
Nos permite crear nuestros propios monitores.
Nos dan Flexibilidad, fcil de implementar.
Pueden programarse en BASH o PERL.
Consideraciones especiales
Utilizar solo si es realmente necesario.
El status del monitor no es compartido en HA
32
Monitores personalizados
Se configuran en /config/monitors.
Salida a stdout Monitor UP.
Sin salida a stdout Monitor DOWN.
Se permite el paso de argumentos
33
Monitores personalizados
cURL is a very flexible command
line tool you can use in shell and
perl scripts for complex interactions
with HTTP and FTP servers.
netcat is another useful command
line tool that facilitates interaction
with TCP and UDP services.
34
Monitores personalizados
Prueba de monitores
[root@bigiptest:Active] monitors # ./monitor ::ffff:192.168.22.31 169
192.168.22.31 server
Variables
$1 = 192.168.22.31
$2 = 169
$3 = IP
$4 = server
35
DevCentral
Interactive User Community
http://devcentral.f5.com
36
TMOS 11 Mantenimiento
Instalacin TMOS
Versiones instaladas
37
TMOS 11 Mantenimiento
Instalacin HOTFIX
38
TMOS 11 Mantenimiento
Instalacin HOTFIX
39
Mantenimiento BIGIP
Instalacin de HotFix en V11
1. Los Hotfixes son acumulativos
(HFA3 incluye el HFA1 y HFA2).
2. Cada Hotfix corresponde a un nmero de versin
(V9.4.X V10.1.X V11.1.X).
3. Debemos tener dos o ms volmenes instalados para
aplicar los Hotfixes.
4. Instalar los Hotfixes en los volumenes no productivos.
5. Probar su correcto funcionamiento durante un tiempo
prudencial.
6. El Hotfix lo comenzamos a utilizar cuando elegimos bootear
con la imagen actualizada.
40
41
Devices groups
Es una coleccin de Devices que tienen relaciones de confianza entre ellos y pueden
sincronizar la configuracin o realizar failover.
Traffic groups
Coleccin de configuraciones de objetos (VIPs y selfIP flotante). Cuado un equipo se vuelve
inaccesible el Traffic group pasa para el otro equipo.
42
43
44
45
GTM
LTM
46
Visibilidad y Monitoreo.
Estadisticas de Virtual Servers y Pool members.
Visibilidad a nivel de objeto.
Alertas con umbrales definidos.
Grficos en tiempo real.
Reportes.
Device Administration
Software Update.
Configuration Management.
Certificate Management.
Configuration Comparison
Configuration Archive & Restore
47
Metricas
Virtual Server - Packets In (Pkts)
Virtual Server - Packets Out (Pkts)
Virtual Server - Current Connections (Conn)
Pool - Total Connections (Conn)
48
49
Device Alerts
EM Alerts
Enterprise Manager system alerts for CPU, disk, and memory usage.
History
Triggered alerts history
50
51
52
53
54
VIPRION
Application delivery controller
NEBS certified
Add up to four blades to its chassis
Add up to four guest to blade
All redundant and hot swappable
55
VIPRION
VIPRION runs on TMOS
TCP Express
Client
Server
Side Side
OneConnect
TCP Proxy
Compression
3rd Party
XML
Caching
Web Accel
ASM
SSL
Microkernel
TCP Express
Client
Rate Shaping
TMOS
iRules
High Performance HW iControl API
Server
56
VIPRION
vCMP ( Conceptos bsicos)
57
VIPRION
vCMP ( Virtualized Clustered Multiprocessing )
VCMP Hardware
VIPRION
4200 B2100 blades
4400 PB200 blades
58
VIPRION
Resource Allocation
Single-slot o all-slots
2 de 8 CPU cores sobre un Single slot
8 de 32 CPU cores para all-slots
Relocacion Automtica
59
VIPRION
Disk and Memory Allocation
Disk Allocation
Memory Allocation
Fixed size
3G
60
VIPRION
Independent Instances
61
VIPRION
Licensing and Provisioning
62
VIPRION
Licensing and Provisioning
63
VIPRION
Guest Configuration
Muy fcil!!
Sytem VCMP
64
VIPRION
Guest Configuration
65
VIPRION
Guest Statistics
66
VIPRION
Guest Configuration
67
VIPRION
Guest Configuration
68
VIPRION
Guest Configuration
69
VIPRION
Guest Configuration All slots (hasta 8 CPUs con 4 blades)
70
VIPRION
Configuracin de vCMP con tmsh
Configuracin de vCMP
tmsh modify sys provision ltm level none
tmsh modify sys provision vcmp level dedicated
71
VIPRION
Configuracin de guest con tmsh
Creacin de un guest
# tmsh modify sys vcmp guest guest_movi management-ip 10.50.50.59/24 management-gw
10.50.50.1 slots single configured management-network bridged initial-image BIGIP11.1.0.1943.0.iso
72
VIPRION
Configuracin de guest con tmsh
Opciones para crear un guest
hostname [hostname]
initial-image [image-filename]
management-gw [ip-address]
management-ip [ip-address/netmask | ip-addess/prefixlen]
management-network [bridged | isolated]
slots [single | all]
state [configured | provisioned | deployed]
Virtual-disk [filename]
Vlans [add | delete | replace-all-with ] { [VLAN name ] }
73
VIPRION
Configuracin de guest con tmsh
Haciendo el deploy de un guest
# tmsh modify sys vcmp guest guest_movi state deployed
Una vez que cambia de estado a deployed podemos entrar por HTTPS a la IP de
management.
https://10.50.50.59
No es necesario cargar licencias
74
VIPRION
Acceso consola a un guest
Conexin a consolas con Vconsole
vconsole < Guest Name> [ < slot> ]
Permite configurar los Guest con TMSH como cualquier BIG-IP
Para salir del shell exit
Para salir de consola Ctrl-] luego en
telnet> quit
75
VIPRION
Status y estadsticas del sistema
System VCMP
76
VIPRION
Status y estadsticas de Guest
show vcmp guest BigIP-Pasivo all-properties
77
VIPRION
Comandos adicionales
show net vlan-allowed
Lista las VLANs para un Guest en particular
list net interface
Lista las placas asignadas a un Guest
show net interface
Lista el status y estadsticas de las interfaces asignadas al Guest
78
VIPRION
HA Failover
Guest sync + HA dentro del chassis No est
soportado
Guest sync + HA entre chassis Est soportado
Guest sync + HA failover se configura va Device and
Traffic groups
Host sync + HA failover No est soportado
79
VIPRION
Troubleshooting & Best Practices
watch tmsh show sys vcmp guest <guest name>
No borrar un Guest en transicin
vcmpd h
-h, help
-l, -loglevel <loglevel >
-d, -debug
-v, -verbose
-o, -stdout
80
VIPRION
Failure to start a Guest
Fallo en arrancar Guest (puede pasar..)
Vcmpd reintenta 3 veces
tmsh show sys vcmp guest (detecta el estado )
Workarround 1
vretry
Workarround 2
81
Perfiles
Internet
Virtual Server
82
Perfiles
Conceptos de Perfiles
Dependencias
Tipos de Perfil
Configuracin
83
Conceptos
Un perfil es:
Donde se define el comportamiento del trfico:
84
Escenario #1 Persistencia
1
3
1
3
85
Encriptado
Desencrip.
86
El cliente comienza la
conexin de control
El Servidor comienza la
Conexin de
transferencia de datos.
87
Dependencias
Dependencias
siguiendo el
modelo OSI
Algunos no
pueden ser
combinados en el
mismo VS
Cookie
HTTP
FTP
TCP
Network
Data Link
Physical
UDP
88
Tipos de Perfil
Servicios Orientado al tipo de datos
Persistencia Orientado a la sesin
Protocolos Orientado a la conexin
SSL Orientado a la encripcin
Autenticacin Orientado a la seguridad
Otros Orientados al flujo de datos TCP
89
Conceptos de Configuracin
Creados a partir de perfiles por default
Los Perfiles Default pueden ser modificados pero no
borrados
Existen relaciones Padre-Hijo
Almacenados en /config/profile_base.conf
90
91
Configuracin
92
Configuracin (Cont.)
Especificacin de
Propiedades
Mapeo a VS
93
Trfico SSL
Encriptado
Encriptado
94
Trfico SSL
Cliente SSL
Servidor SSL
Configuracin de Perfiles
95
Cliente SSL
Se encripta solo el trafico entre el cliente y
el BigIP
Desencrip.
Encriptado
96
Servidor SSL
Se encripta solo el trafico entre el BigIP y
los Web servers
Encriptado
Desencrip.
97
Generacin de Certificados
98
Configuracin de perfil
99
Redundancia de equipos
Consiste en dos equipos F5 BIGIP
configurados de forma tal que
permite continuar procesando el
trfico incluso si uno de los equipos
deja de estar disponible
Requrimientos de hardware
Requrimientos de software
Requrimientos de Hot-Fix
100
Redundancia de equipos
Modos de trabajo
Active-Standby
- Solo uno acepta y atiende las conexiones
- El equipo standby monitorea el estado del activo. Si
el activo no responde, se auto-promueve como
activo.
Active-Active
- Ambos aceptan conexiones.
- Si uno de los equipos no responde, el otro atiende
todas las conexiones.
101
DevCentral
Interactive User Community
http://devcentral.f5.com
102
Estticos
Least Connections
Fastest
Observed
Dinmicos
Predictive
Dynamic Ratio
Priority Group Activation
Fallback Host
Mecanismos
de Falla
103
Round Robin
Clientes
Internet
Router
Los pedidos son
distribuidos de
manera pareja
BIG-IP LTM
2
5
3
6
4
7
Servidores
104
Ratio
Clientes
Internet
Router
El Administrador setea
una relacin para
distribuir los pedidos
BIG-IP LTM
Ejemplo: 3:2:1:1
1
8
12 14
2
9
13
10
11
Servidores
105
Least Connections
Clientes
Internet
Router
Los pedidos van hacia los
nodos con menor
cantidad de conexiones
abiertas
1
4
BIG-IP LTM
Servidores
3
5
459
460
461
470
Current Connections
106
Least Connections
Clientes
Internet
Router
Mismo caso,
BIG-IP LTM
otro ejemplo
61
Servidores
62
63
280
290
111
112
Current Connections
107
Fastest
Clientes
Internet
Router
Los pedidos van al
nodo con mejor
tiempo de respuesta
BIG-IP LTM
1
4
Servidores
2
5
10ms
10ms 10ms 17ms
Current Response Times
108
Observed
Clientes
Internet
Router
BIG-IP LTM
1
2
Servidores
109
Predictive
Internet
Los pedidos van al nodo
con la mejor combinacin
de menos conexiones y
mejor respuesta
promedio
Clientes
Router
Servidores
1
2
110
Internet
Si se setea al Priority Group
en 2, y 3 de los servidores de
alta prioridad estn
disponibles Los servidores
de baja prioridad no se
utilizarn
Router
BIG-IP LTM
Priority 4
1
2
4
Priority 1
3
Servidores
111
Internet
Si el nmero de
miembros baja a menos
de lo configurado (2), se
utiliza el resto de los
servidores
Router
BIG-IP LTM
Priority 4
2
1
5
Servidores
Priority 1
3
6
4
7
112
Fallback Host
Internet
Clientes
Router
BIG-IP LTM
Servidores
113
114
1
2
http
107
108
99
ftp
25
Current Connections
115
Utilizando el Nodo
Internet
1
2
http
107
108
99
ftp
25
Current Connections
116
117
118
119
120
predefinidos.
121
122
123
124
125
Realizar tareas de
mantenimiento
Ver estado de nodos
Habilitar o deshabilitar
nodos
126
equipos.
127