Forum Discussion
iRule SNAT for multiple ISP
Hi Nicolas,
If you have to deal with multiple customes you may wanna take a look to the traffic-group feature. It will enable you to configure a virtual router for each customer. In this case each customer would have its own routing table and static SNAT settings. And no iRules needed then...
If multiple traffic groups are not an option for you, then the outline technique of my last responce would remain nearly the same. Designate one customer as default route and SNAT and then overwrite the nexthop and SNAT based on different source addresses. The iRules would then look like this...
when CLIENT_ACCEPTED {
log local0. "VS Reached"
if { ( [IP::addr [IP::client_addr] 10.32.1.192/26] ) or
( [IP::addr [IP::client_addr] equals 10.32.2.0/26] ) } then {
snat X.X.X.203
nexthop X.X.X.201
log local0. " -- SNAT CUSTOMER2 -- "
} elseif { ( [IP::addr [IP::client_addr] 10.32.3.192/26] ) or
( [IP::addr [IP::client_addr] equals 10.32.4.0/26] ) } then {
snat X.X.X.103
nexthop X.X.X.101
log local0. " -- SNAT CUSTOMER3 -- "
} elseif { ( [IP::addr [IP::client_addr] 10.32.5.192/26] ) or
( [IP::addr [IP::client_addr] equals 10.32.6.0/26] ) } then {
snat X.X.X.13
nexthop X.X.X.11
log local0. " -- SNAT CUSTOMER4 -- "
} else {
log local0. " -- SNAT DEFAULT -- "
}
}
Cheers, Kai
Recent Discussions
Related Content
* 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