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_MatheMay 20, 2014
Nimbostratus
Thanks will try this...... - Renjith_p_MatheMay 20, 2014
Nimbostratus
Hello nitass there is some change in my requiremnt i have one webservice (eg:abc.com) is published on internet and its working fine now through F5. Its virtual server IP 1.2.3.4 (port 80) & Back end Server IP 5.6.7.8 (port 8080). My new requirement is publish a new 2 webservices (xyz1.com & xyz2.com) to be published on internet through F5 by using the same public IP. but the Back end Server IP is same 5.6.7.8 on differnt port 8081. Which way is better to achieve this redirection either through i rule or HTTP Class Profile ? Please share with me GUI steps for this HTTP Class profile for the same....
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