Forum Discussion
Dee_21520
Oct 03, 2011Nimbostratus
iRule - Force a host to out a specific link advise
Hi,
we have f5 load balacers runing v9 at moment and have a simple irule as follows:
map24_Outbound_Routing
Version 1.0
when CLIENT_ACCEPTED {
if { [matchclass [IP::local_addr] equals $::map24] } {
if { [LB::status node 85.13.136.97] eq "up" } {
snat 85.13.136.100
node 85.13.136.97
} else {
snat 195.74.174.10
node 195.74.174.1
}
} else {
pool default_gateway_pool
}
}
we have a data group called map24 with Ip addresses of third party, and the irule is applied to default gateway virtual server
the rule ensures all traffic destined for map24 is going via their internet pipe.
----------
i need to add a new irule to push traffic for another company via another pipe so i created a irule and data group same as above but different names and associated to default gateway virtual server.
when i do this traffic for the first one stops completely, if i remove from default gateway first one works again.
does this mean i am only allow one irule per default gateway?
how can i do this so one site uses one internet pipe and another uses another (reason is third party have restricted access from one IP only)
will this work?
map24_Outbound_Routing
Version 1.0
when CLIENT_ACCEPTED {
if { [matchclass [IP::local_addr] equals $::map24] } {
if { [LB::status node 85.13.136.97] eq "up" } {
snat 85.13.136.100
node 85.13.136.97
} else {
snat 195.74.174.10
node 195.74.174.1
}
} else {
pool default_gateway_pool
}
if { [matchclass [IP::local_addr] equals $::new] } {
if { [LB::status node 100.100.100.100] eq "up" } {
snat 100.100.100.102
node 100.100.100.100
}
}
}
if not please can someone advise,
thanks
dee
- nitassEmployeedoes this mean i am only allow one irule per default gateway?
when CLIENT_ACCEPTED { if {[matchclass [IP::local_addr] equals $::map24]} { if {[LB::status node 85.13.136.97] eq "up"} { snat 85.13.136.100 node 85.13.136.97 } else { snat 195.74.174.10 node 195.74.174.1 } } elseif {[matchclass [IP::local_addr] equals $::new]} { if {[LB::status node 100.100.100.100] eq "up"} { snat 100.100.100.102 node 100.100.100.100 } } else { pool default_gateway_pool } }
- Dee_21520NimbostratusHi,
- Dee_21520NimbostratusHi,
- nitassEmployeeas when i did this before it stopped working.not sure what going on but i think "map24" data group could work. anyway, u said it did not.
- Dee_21520NimbostratusHi,
- nitassEmployeeso with the above map 24 would use one internet pipe and new would another pipe...correct?i think so.
- Dee_21520NimbostratusHi.
- nitassEmployeecan u put some log command in the irule and capture packet while problem is happening?
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