Forum Discussion
nitass_89166
Nov 23, 2014Noctilucent
e.g.
configuration
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 2
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
set storeid [URI::path [HTTP::uri] 1 1]
if { [class match -- $storeid equals storeid_to_ip] } {
set ip [class match -value -- $storeid equals storeid_to_ip]
HTTP::header replace Host $ip
HTTP::uri [string map [list $storeid /] [HTTP::uri]]
node $ip
}
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm data-group internal storeid_to_ip
ltm data-group internal storeid_to_ip {
records {
/0001/ {
data 200.200.200.101
}
/0002/ {
data 200.200.200.111
}
}
type string
}
trace
[root@ve11a:Active:In Sync] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.24.1(36489) <-> 172.28.24.10(80)
1416743408.3850 (0.0015) C>S
---------------------------------------------------------------
GET /0001/rest/of/url HTTP/1.1
User-Agent: curl/7.29.0
Accept: */*
Host: f5-retail
---------------------------------------------------------------
New TCP connection 2: 200.200.200.11(36489) <-> 200.200.200.101(80)
1416743408.3868 (0.0004) C>S
---------------------------------------------------------------
GET /rest/of/url HTTP/1.1
User-Agent: curl/7.29.0
Accept: */*
Host: 200.200.200.101
---------------------------------------------------------------
- nitass_89166Nov 23, 2014Noctilucenti used http because it is easier to trace.
- Ian_Rickerby_17Dec 05, 2014NimbostratusHi Thanks for this I thought I had this working but actually although the script runs It then uses the associated pool and load balances the connections in the normal manner I notice that you do not have a pool associated with your virtual server, however I am unable to create a virtual server without a pool. I have added the ltm virtual f5-retail { description "Broker" destination 10.127.10.144:http ip-protocol tcp mask 255.255.255.255 pool Retail profiles { http { } tcp { } } rules { qux } source 0.0.0.0/0 source-address-translation { type automap } vlans { VIP-VLAN } vlans-enabled }