Forum Discussion

assaf_benedic_1's avatar
assaf_benedic_1
Icon for Nimbostratus rankNimbostratus
Aug 02, 2007

iRule for address translation and port port traslation

Hi,

 

 

How can I create an iRule that do a layer 3 redirection (address translation + port translation) without creating a virtual server that supports that?

 

 

The reason -

 

 

* I have 2 members in my pool.

 

* The virtual server (intercept port 80 only) redirect traffic to the pools in layer 2 (address tranlation and port tranlation checkboxes are unchecked).

 

 

* the traffic to one server must sent in Layer2 and to second server must in Layer3.

 

 

Since I can't create two different virtual servers, each to handle one type of redirection, I need to find a different method to do that.

 

 

Thanks in advanace,

 

 

Assaf.
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Can you provide more detail on what you are wanting to happen? It sounds like you have a virtual server defined on a single IP address on port 80. When requests come in to the virtual server, do you want to have port translation performed only if it goes to the first node, and have address translation performed only if the request goes to the second node?

     

     

    Aaron
  • Thank you for the reply.

     

     

    You are correct, except that for the first node I don't want to apply port/address translation and for the second node I want to apply port+address translation.

     

     

    I'll try to explain what I mean by Layer2 and layer3 redirection

     

     

    Layer 2 redirection -

     

    When the F5 redirect traffic to a node it changes only the destination MAC and keep the original destination IP and the original destination port.

     

     

     

    Layer 3 redirection -

     

    When the F5 redirect traffic to a node it changes the destination MAC, destination IP Address and the destination port according to the member configuration.

     

     

     

    My virtual server intercept port 80 (virtual server destination 0.0.0.0) and load balance the traffic to a pool with two members. One member accept layer2 redirection and the other member accept only layer3 redirection.

     

     

    Till now I used two different virtual servers to implement that.

     

    The first virtual server redirected traffic from client A to member A in Layer2 (address and port translations checkboxes are unchecked) and the second virtual server redirected traffic from client B to member B in Layer 3 (address and port translations checkboxes are checked).

     

     

    I can't use two virtual servers now because both clients (A,B) can use both members.

     

     

    Assaf.

     

     

  • I think you can also use the "virtual" command to select another virtual server, which will perform layer 3 translation. But perhaps this is slower than using simply "node" command as in Hoolio's post.