Forum Discussion

Sajan_Network_3's avatar
Sajan_Network_3
Icon for Nimbostratus rankNimbostratus
Aug 16, 2017

tmsh command to configure pool and node in one line ?

Hi All ,

 

Can you please help me with tmsh command to configure nodes and pool in single line .

 

pool name - Sajan-8000

 

Node ip : 10.10.10.50

 

monitor tcp

 

Regards , Sajan

 

6 Replies

  • Hi Sajan,

    Try this

    tmsh create ltm pool poolname monitor tcp load-balancing-mode lb-method_name members add { toto.domain.lan:port { address x.x.x.x } }

    Replace following variables :

    • poolname
    • lb-method_name (example round-robin)
    • toto.domain.lan (the name of your backend)
    • port (pool member listenning service)
    • x.x.x.x (IP addr of the node)

    Hope it helps

    Regards

  • Here, Use the ; to separate your commands.

    create ltm node 10.10.10.50 ; create ltm pool Sajan-8000 members add { 10.10.10.50:80 } monitor tcp

    ltm pool Sajan-8900 {
    members {
        10.10.10.50:80 {
            address 10.10.10.50
            session monitor-enabled
            state down
        }
    }
    monitor tcp
    }
    

    Just in case you want to create 2 commands. But you can just go and create it with the pool itself. The node will auto-created.

  • Thanks Guys those command worked .

    I have one more doubt . I need to configure VIP as below but I don't want translate-address enabled & translate-port enabled options . How do i achieve this in CLI command ?

    create ltm virtual Sajan-8000 { destination 10.23.30.4:8000 ip-protocol tcp mask 255.255.255.255 pool Sajan-8000 profiles add { fastL4 } source 0.0.0.0/0 }

    ltm virtual Sajan-8000 {

    destination 10.23.30.4:8000
    ip-protocol tcp
    mask 255.255.255.255
    pool Sajan-8000
    profiles {
        fastL4 { }
    }
    source 0.0.0.0/0
    translate-address enabled
    translate-port enabled
    vs-index 21
    

    }

  • Try this

    create ltm virtual Sajan-8000 { destination 10.23.30.4:8000 ip-protocol tcp mask 255.255.255.255 pool Sajan-8000 profiles add { fastL4 } translate-address disabled translate-port disabled  source 0.0.0.0/0 }