Forum Discussion
Renjith_p_Mathe
Nimbostratus
May 20, 2014Virtual Server creation & mapping
Dears
Kindly assist me on F5 for the following requirement.
A new virtual Server creation and its mapping to existing back end webserver listening on a specific port (eg: 8080)?
nitass
Employee
May 20, 2014e.g.
config
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 30
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo8080
ltm pool foo8080 {
members {
200.200.200.101:8080 {
address 200.200.200.101
}
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo8081
ltm pool foo8081 {
members {
200.200.200.101:8081 {
address 200.200.200.101
}
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
set host [HTTP::host]
switch $host {
"abc.com" {
pool foo8080
}
"xyz.com" {
pool foo8081
}
default {
do something
}
}
}
when HTTP_RESPONSE {
log local0. "client=[IP::client_addr]:[TCP::client_port] host=$host pool=[LB::server pool] server=[IP::server_addr]:[TCP::server_port]"
}
}
/var/log/ltm
[root@ve11a:Active:In Sync] config tail -f /var/log/ltm
May 20 04:12:37 ve11a info tmm[14715]: Rule /Common/qux : client=172.28.24.1:38358 host=abc.com pool=/Common/foo8080 server=200.200.200.101:8080
May 20 04:12:46 ve11a info tmm1[14715]: Rule /Common/qux : client=172.28.24.1:38359 host=xyz.com pool=/Common/foo8081 server=200.200.200.101:8081
Renjith_p_Mathe
Nimbostratus
May 20, 2014Thanks will try this......
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects