Here is a part of the bigip_base.conf from my test lab:
-----------------------------------
vlan PROD {
tag 4094
interfaces 1.1
}
vlan VLAN-RTR-Cisco {
tag 4093
interfaces 1.3
}
stp instance 0 {
vlans
PROD
VLAN-RTR-Cisco
interfaces
1.1
external path cost 20K
internal path cost 20K
1.3
external path cost 20K
internal path cost 20K
}
self allow {
default
tcp ssh
tcp domain
tcp snmp
tcp https
tcp 4353
udp domain
udp snmp
udp efs
udp 1026
udp 4353
proto ospf
}
self 192.168.100.141 {
netmask 255.255.255.0
vlan VLAN-RTR-Cisco
allow default
}
self 192.168.155.141 {
netmask 255.255.255.0
vlan PROD
allow default
and the bigip.conf :
-----------------------------
profile persist pers_univ {
defaults from universal
mode universal
timeout indefinite
across services enable
across virtuals enable
across pools disable
rule Persist-univ
}
pool RTR_OUT {
monitor all gateway_icmp
members 192.168.100.200:http
}
pool rtr_f5 {
monitor all gateway_icmp
members 192.168.155.254:any
}
rule Persist-univ {
when CLIENT_ACCEPTED {
set adr ""
log local0. "LINK vlan_id : [LINK::vlan_id]"
if {[LINK::vlan_id] == "4094"}
{
set adr [IP::client_addr]
log local0. "vlan 4094 from client to servers - $adr"
}
else
{
set adr [IP::local_addr]
log local0. "vlan 4093 from server to client - $adr"
}
set mac1 "00:15:c5:16:94:47"
This mac adress is hardcoded, for tests only
set pipo [concat [string range $adr 0 end]$mac1]
set toto [persist lookup uie $pipo all]
if { $toto == "" }
{
log local0. "UIE PERS - New persistence entry created"
persist uie $pipo
}
else
{
log local0. "UIE PERS - Persistence existing in the table"
}
}
}
rule iRule_Cli2Srv {
when CLIENT_ACCEPTED {
log local0. "client accepted"
adr is storing the IP of the client
set adr [IP::client_addr]
The mac is hardcoded for tests lab only
set mac1 "00:15:c5:16:94:47"
the uie stores the client IP and Mac of the last hop gateway
set test [concat [string range $adr 0 end]$mac1]
log local0. "test variable content : $test"
set toto [persist lookup uie $pipo]
if { $toto ==""}
{
log local0. "No persistence found in the uie table"
persist uie $test
log local0. "uie value stored in the table = $test"
}
else
{
log local0. "Persistence existing in the table : $test"
}
}
}
rule iRule_Srv2Cli {
when CLIENT_ACCEPTED {
log local0. "client accepted"
set adr1 [IP::local_addr]
set mac1 "00:15:c5:16:94:47"
set test [concat [string range $adr1 0 end]$mac1]
log local0. "Content of the variable test = $test"
set toto [persist lookup uie $pipo]
if { $toto == "" }
{
log local0. "No persistence Found"
persist uie $test
log local0. "persistence stored in the uie table = $test"
}
else
{
log local0. "Persistence found in the uie table = $test "
}
}
}
virtual address any {
mask none
}
virtual VIP_OUT {
pool rtr_f5
destination any:any
mask none
vlans VLAN-RTR-Cisco enable
rules iRule_Srv2Cli
persist pers_univ
}
virtual VS_IN {
snat automap
pool RTR_OUT
destination 192.168.155.108:http
ip protocol tcp
vlans PROD enable
rules iRule_Cli2Srv
persist pers_univ
}
AND HERE ARE THE LOGS OF MY TESTS:
----------------------------------------------------------
First connection to the VIP of the servers
Sep 17 18:44:26 tmm tmm[1666]: Rule: Persist-univ vlan 4094 from client to servers - 192.168.155.57
Sep 17 18:44:26 tmm tmm[1666]: Rule: iRule_Cli2Srv test variable content : 192.168.155.5700:15:c5:16:94:47
Sep 17 18:44:26 tmm tmm[1666]: Rule: iRule_Cli2Srv uie value stored in the table = 192.168.155.5700:15:c5:16:94:47
Second connection to the VIP of the servers
Sep 17 18:44:32 tmm tmm[1666]: Rule: Persist-univ vlan 4094 from client to servers - 192.168.155.57
Sep 17 18:44:32 tmm tmm[1666]: Rule: iRule_Cli2Srv test variable content : 192.168.155.5700:15:c5:16:94:47
Sep 17 18:44:32 tmm tmm[1666]: Rule: iRule_Cli2Srv Persistence existing in the table : 192.168.155.5700:15:c5:16:94:47
First connection From the Server to the client (.57)
Sep 17 18:44:57 tmm tmm[1666]: Rule: Persist-univ LINK vlan_id : 4093
Sep 17 18:44:57 tmm tmm[1666]: Rule: Persist-univ vlan 4093 from server to client - 192.168.155.57
Sep 17 18:44:57 tmm tmm[1666]: Rule: Persist-univ UIE PERS - New persistence entry created
Sep 17 18:44:57 tmm tmm[1666]: Rule: iRule_Srv2Cli client accepted
Sep 17 18:44:57 tmm tmm[1666]: Rule: iRule_Srv2Cli Content of the variable test = 192.168.155.5700:15:c5:16:94:47
Sep 17 18:44:57 tmm tmm[1666]: Rule: iRule_Srv2Cli No persistence Found
Sep 17 18:44:57 tmm tmm[1666]: Rule: iRule_Srv2Cli persistence stored in the uie table = 192.168.155.5700:15:c5:16:94:47
What is the content of the persistence table ???
2 entries with the same uie persistence value.
[root@bip:Active] config b persist all show all
PERSISTENT CONNECTIONS
| Mode universal Value 192.168.155.5700:15:c5:16:94:47
| virtual any:any node 192.168.155.254:any age 30sec
| Mode universal Value 192.168.155.5700:15:c5:16:94:47
| virtual 192.168.155.108:http node 192.168.100.200:http age 55sec