Forum Discussion
Wildcard forwarding for direct node traffic with PBR
Apologies if this question has been asked before; I've waded my way through a lot of forum posts but haven't seen the problem I'm facing - feel free to prove otherwise.
I am currently have a HA LTM pair with a single trunked interface (eight trunk members aggregated using LACP and with VLANs trunked on the connected switch). Policy based routing is used on the node VLANs to route matching traffic back to the F5 self IP interface for that VLAN. The default gateway on the nodes is not set to the F5 and all other traffic not matched by PBR uses the default gateway.
Everything works fine, however it is occasionally necessary to connect directly to a service on a node rather than the virtual server. In this case, return traffic is still being routed by PBR to the F5's. I have created a forwarding wildcard virtual server on 0.0.0.0/0 and all ports (with loose connection initiation, etc.), but am still not seeing the traffic being forwarded.
I am seeing the "in" traffic in the virtual server statistics and can match it to individual requests, but I am not seeing "out" traffic be incremented. Before I spend hours poring over packet dumps, can anyone suggest what the problem is likely to be? Is it possible that the F5 is not able to route the traffic, and if so where would I see evidence of this (if anywhere)?
Cheers
21 Replies
- The_Bhattman
Nimbostratus
Hi LTP, - ltp_55848
Nimbostratus
Hi Bhattman, - The_Bhattman
Nimbostratus
Hi Ltp, - ltp_55848
Nimbostratus
Hi Bhattman, - ltp_55848
Nimbostratus
After some though on the matter; I ended up creating an iRule on the wildcard virtual server on the backend VLAN to output some verbose logging for the purposes of gathering information form an LTM perspective. - The_Bhattman
Nimbostratus
Posted By ltp on 07/04/2011 07:59 PMIt doesn't require NATing/SNATing from the VIP. This would work if you were attempting to directly route towards the client and back via the switch using the real IP address. This is assuming that the switch is connected on the same VLAN as the node and the node's default gateway is the switch.
Here are 2 examples
Client to node communication:
1. Source: 10.2.0.12 (Client) --> Destination: 10.4.0.21 (Node) ; Request Leaves the client towards the host
2. Source: 10.2.0.12 (Client) --> Destination: 10.4.0.21 (Node); Request hits the Nexus Switch router
3. Source: 10.2.0.12 (Client) --> Destination: 10.4.0.21 (Node); Nexus Switch router then forwards the traffic towards the host on TEST_VLAN since it's directly attached (Layer 2)
4. Source: 10.2.0.12 (Client) --> Destination: 10.4.0.21 (Node); Host receives the request and then returns a response
5. Source: 10.4.0.21 (Node) --> Destination: 10.4.0.21 (Client); Nexus Switch receives the response because node's gateway is 10.4.0.1
6. Nexus applies PBR matches Test_deny ACL statement, exits out of the route map and then the Nexus switch router forwards response to client perserving the node's real IP addresses.
Client to node communication via VIP
1. Source: 10.2.0.12 (Client) --> Destination: 10.3.0.10 (vip) ; Request Leaves the client towards the VIP
2. Source: 10.2.0.12 (Client) --> Destination: 10.3.0.10 (vip); Packet hits the Nexus Switch router
3. Source: 10.2.0.12 (Client) --> Destination: 10.3.0.10- (vip); Nexus Switch router then forwards the traffic towards the VIP
4. Source: 10.2.0.12 (Client) --> Destination: 10.3.0.10 (vip); F5 receives the response
5. Source: 10.4.0.10 (SNAT/CLIENT) --> Destination: 10.4.0.21 (NODE); F5 SNATs the client's IP address and sends it towards the selected node
6 Source: 10.4.0.10 (SNAT/CLIENT) --> Destination: 10.4.0.21 (Node); Node receives the request and returns a response
5. Source: 10.4.0.21 (Node) --> Destination: 10.4.0.x (SNAT/Client); Nexus Switch receives the response because node's gateway is 10.4.0.1
6. Source: 10.4.0.21 (Node) --> Destination: 10.4.0.x (SNAT/Client); Nexus applies PBR matches Test_Allow ACL statement which states the next HOP is 10.4.0.10. Response is sent to F5
7. Source: 10.3.0.10 (vip) --> Destination: 10.2.0.12 (Client); F5 receives the response on 10.4.0.10 and then retranslates back to client
8. Source: 10.4.0.21 (Host) --> Destination: 10.4.0.21 (Client); Client receives the response.
I hope this clarifies what the test pBR example will do.
Bhattman
- The_Bhattman
Nimbostratus
Posted By ltp on 07/05/2011 06:39 AMHi Ltp,
I believe i might have miss understood the reason why you used the pBR. If the goal was to reach the backend node perserving the IP address but not caring about a requirement to route via switch network directly, then you could do it where you do not need a PBR or SNATing at all. Smply have a route that points to F5 self-ip on the "external VLAN" to get to node address block (10.4.0.0/x) and then repoint the node's gateway to F5 self-ip on the "internal" vlan. The F5 wildcard virtual IP forwarding would allow the return traffic.
However, I am glad that it worked out for you.
Bhattman
- ltp_55848
Nimbostratus
Hi Bhattman, - The_Bhattman
Nimbostratus
Hi Ltp, - ltp_55848
Nimbostratus
Hi All,
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