Forum Discussion

Petak_333163's avatar
Petak_333163
Icon for Nimbostratus rankNimbostratus
Nov 02, 2017

VIP redirects to multiples ftp pools

Hi guys,

I have another situations right now, i have multiples A records on external DNS pointing to the same Public ip address (Big Ip ) these records are for ftp traffic, but they needs to be redirect to differents ftp pools based on the name/record that the client request.

Example:

       ftp.pepe.net --> ftp pool a
       ftp.pepe2.net --> ftp pool b

I saw some irules based on http request, but its not my case.

There is an irule to detect the fqdn requested and redirect to an specific pool ? If this is not possible, exists another way to have this done ?

Best regards

4 Replies

  • You should be able to parse the hostname from the TCP payload on the CLIENT_DATA event. Check out the example in the article here (especially line 15): https://devcentral.f5.com/codeshare?sid=519 They use the sitename parsed from the payload to do a DNS lookup. You can use it to make your load balancing decision.

     

  • Hi @crodriguez , thanks for the information. I will check that and test it, i will let you know the results.

     

    Thanks again :)

     

  • Hi,

     

    In first HTTP protocol version, the hostname was not included in the request. it is mandatory only from version HTTP/1.1.

     

    I think this is the same with FTP. with most of TCP protocols, requested hostname is not sent from client to server as it is used only to get the IP address from hostname.

     

    Look at FTP RFC if hostname is sent in the request (I looked quickly and I didn't find this).

     

    if the hostname is not sent, there is no solution.

     

  • I tested it , but the tcp payload doesn't contain useful information to route between ftp pools based on the fqdn. I did a tcpdump on the LB and also did a wireshark sniffin from a client. The resolution and information about the fqdn/record happens before contact the LB, and when the client hit the LB the traffic analyzed not have this specific info.

     

    I believe that we will need to create another record A on the DNS and use another ip on the LB.

     

    what do you thing of that ?

     

    Thanks :)