Forum Discussion

Lior_54855's avatar
Lior_54855
Icon for Nimbostratus rankNimbostratus
Jan 12, 2014

Clone pool and change destination port

Hi,

 

I need to clone some of the traffic reaching a virtual server using iRule. I wish to change the destination port of the traffic when cloning it. The original traffic is in port 80. The pool I'm sending the traffic to has one node which listens on port 8080.

 

This is the iRule: when LB_SELECTED { if { argument } { clone pool pool_name }

 

But all the traffic flows to the node with destination port 80. Is it possible to change the destination port without using TCP::collect?

 

Thank you,

 

11 Replies

  • Hi,

     

    The destination port used to send traffic to your pool member is not defined on your virtual server.

     

    IT's defined into your pool configuration. All your pool member will have this port, except if on a pool member you define a specific port.

     

    • Lior_54855's avatar
      Lior_54855
      Icon for Nimbostratus rankNimbostratus
      Hi, Thank you for the reply. I'm talking about the destination ports of the pool members, not the virtual servers. From all the checks I've made, it's not possible to do. I mean if I configure clone pool named "clone_pool_1" with one pool member: 10.0.1.1:8080 And I have virtual server named "virt_1_http" 200.0.0.1, with default pool named "pool_http" with one pool member: 10.0.0.1:80 When I clone traffic from the virtual server to the clone pool, it ignores the destination port of the clone pool member and sends the traffic with destination port 80. So I was looking for a way to clone traffic and change the destination port from 80 to 8080, but it seems to be impossible without TCP::collect. Regards,
  • Hi,

     

    The destination port used to send traffic to your pool member is not defined on your virtual server.

     

    IT's defined into your pool configuration. All your pool member will have this port, except if on a pool member you define a specific port.

     

    • Lior_54855's avatar
      Lior_54855
      Icon for Nimbostratus rankNimbostratus
      Hi, Thank you for the reply. I'm talking about the destination ports of the pool members, not the virtual servers. From all the checks I've made, it's not possible to do. I mean if I configure clone pool named "clone_pool_1" with one pool member: 10.0.1.1:8080 And I have virtual server named "virt_1_http" 200.0.0.1, with default pool named "pool_http" with one pool member: 10.0.0.1:80 When I clone traffic from the virtual server to the clone pool, it ignores the destination port of the clone pool member and sends the traffic with destination port 80. So I was looking for a way to clone traffic and change the destination port from 80 to 8080, but it seems to be impossible without TCP::collect. Regards,
  • Hi,

    What you can do when you clone your traffic is specifying the pool member with the port. For example :

    clone pool clone_pool_1 member 10.1.1.1 8080
    
  • I tried it but got the following error: Rule [/Common/clone] error: /Common/clone:2: error: [wrong args][clone pool clone_pool member 10.100.127.2 8080]

     

  • Ok lets try without the destination port :

    clone pool clone_pool_1 member 10.100.127.2
    
    • Lior_54855's avatar
      Lior_54855
      Icon for Nimbostratus rankNimbostratus
      Hi, This is working, but it's like regular clone pool. The destination port is still 80. Thank you,
  • Ok lets try without the destination port :

    clone pool clone_pool_1 member 10.100.127.2
    
    • Lior_54855's avatar
      Lior_54855
      Icon for Nimbostratus rankNimbostratus
      Hi, This is working, but it's like regular clone pool. The destination port is still 80. Thank you,
  • Rbman's avatar
    Rbman
    Icon for Nimbostratus rankNimbostratus

    Hi

    Its been a while but have you manage to wotk it out??