Forum Discussion

Yannick_Vranck1's avatar
Yannick_Vranck1
Icon for Nimbostratus rankNimbostratus
Jun 20, 2017

Routing of the Virtual IP

Hello,

 

I have a basic question about routing across the VIP.

 

Let's say a client comes in to the VIP to then be load balanced to the servers. This traffic needs to return.

 

Will the VIP route this back to the client? And how will he do this? Does he use a DGW? Do we need to setup a default gateway?

 

  • You need to make sure that the response of the selected pool member will be routed to the BigIP. If the pool members do not have a (preferrably floating) self IP of the BigIP configured as default gateway, you could for example use SNAT to make the BigIP appear as the client (source IP) to the selected pool member. When the response arrived at the BigIP, it will then route the response back to the last L2 hop it has seen when the request arrived using a feature called auto lasthop (by default). See K13876 for a description of this feature.

     

    HTH

     

    Martin

     

  • Hi,

    Short answer is Yes, VIP will route reply back to the client 🙂

    How it will be done mainly depends on configuration of two settings:

    • Auto Last Hop (can be set on global, VLAN and Virtual Server - let's say it equals VIP - level)
    • Last Hop Pool (Virtual Server level)

    If Auto Last Hop (ALH) is enabled (default setting) you do not need any DGW configured. BIG-IP will add source MAC and source VLAN of incoming packet (from client, or last router/firewall on the network path between client and BIG-IP) to session table entry - when

    show sys connection [type] all-properties
    is used - this is listed as Lasthop entry.

    All packets send back from VIP will use this data - so same VLAN will be used as well as target MAC in outgoing packet will be set to the MAC stored in session table.

    If ALH is set to disabled and there is no Last Hop Pool configured then routing table is used for returning packets.

    If src IP of client request is in other network than the one directly accessible by BIG-IP (one of the networks defined by configured Self IPs) then you need either DWG defined in Routes or specific static route for accessing client subnet.

    Or of course configure some dynamic routing protocols like RIP or OSPF.

    Piotr