Forum Discussion

Allanwynn_16283's avatar
Allanwynn_16283
Icon for Nimbostratus rankNimbostratus
Nov 12, 2015

Redirect to another virtual server

Hi Everyone,

 

Can anyone help me, can irule do this.

 

VS 1: 172.16.2.74 port 9999 Pool - 172.16.2.208 port 9999 and 172.16.2.209 port 9999

 

VS 2: 172.16.2.74 port 9988 Pool - 172.16.2.208 port 9988 and 172.16.2.209 port 9988

 

So basically, 172.16.2.74 is binded with a hostname abc.company.com

 

How can we set usign irule or any other things that when the user access this abc.company.com he will be redirected either on VS1 or VS2?

 

4 Replies

  • BinaryCanary_19's avatar
    BinaryCanary_19
    Historic F5 Account

    YOu must create a virtual server for 172.16.2.74 Port 80.

    On this virtual server, you have an irule like this for example

    when HTTP_REQUEST {
       virtual VS1
    }
    

    Assuming that the virtual you want is called VS1 and they are all in the same administrative partition.

    To choose either VS1 or VS2, you will need perhaps an if Condition that makes a decision which of the VS to send the traffic to.

    Also, you can simplify your configuration greatly by simply attaching the pool directly on the Virtual for 172.16.2.74 port 80. The pool member ports do not have to be the same as the virtual server port. LTM will transparently translate the port when it sends the traffic to the pool member.

  • BinaryCanary_19's avatar
    BinaryCanary_19
    Historic F5 Account

    YOu must create a virtual server for 172.16.2.74 Port 80.

    On this virtual server, you have an irule like this for example

    when HTTP_REQUEST {
       virtual VS1
    }
    

    Assuming that the virtual you want is called VS1 and they are all in the same administrative partition.

    To choose either VS1 or VS2, you will need perhaps an if Condition that makes a decision which of the VS to send the traffic to.

    Also, you can simplify your configuration greatly by simply attaching the pool directly on the Virtual for 172.16.2.74 port 80. The pool member ports do not have to be the same as the virtual server port. LTM will transparently translate the port when it sends the traffic to the pool member.

    • Allanwynn_16283's avatar
      Allanwynn_16283
      Icon for Nimbostratus rankNimbostratus
      Hi can you give an example for a condition, i really not yet that familiar with irule.