Forum Discussion

tmkuzma_138268's avatar
tmkuzma_138268
Icon for Nimbostratus rankNimbostratus
Feb 04, 2014

V11.2.1 CLI TMSH Command Structure Help

I am trying to get use to writing changes in v11.2.1 TMSH CLI and I am having trouble figuring out when the {} are needed in commands.

 

Looking at the create/modify virtual in the TMSH guide the way I read it I could copy the following command into a F5:

 

create ltm virtual vxxn4-xx-443 description Xpg-XXfarm3.xx.xw.xx.com destination 19X.X08.X2.X7:https ip-protocol tcp mask {255.255.255.255} persist {source-IP-address-timeout-20 {default yes}} pool vxxn4-XX-X443 Profiles add {fastL4 {}} snat automap vlans-disable

 

But when I do a list ltm virtual I see a lot more brackets and quote marks (see below) that do not see to appear in the tmsh command reference manual. Any help to clarify this discrepancy would be appreciated.

 

ltm virtual vxxn4-xx-443 { description "Xpg-XXfarm3.xx.xw.xx.com" destination 19X.X08.X2.X7:https ip-protocol tcp mask 255.255.255.255 persist { source-IP-address-timeout-20 { default yes } } pool vxxn4-XX-X443 profiles { fastL4 { } } snat automap vlans-disabled }

 

3 Replies

  • The way to determine whether a brace/curly bracket is needed in a tmsh command is simply to type the partial command and press the key. This triggers tmsh command completion and where there are multiple possibilities, lists the valid options.

     

    e.g. From an interactive TMSH session, type in

     

    create ltm virtual vxxn4-xx-443

     

    but don't press , instead press the key.

     

    You will see that it lists both "description" and "{" as valid inputs (as well as lots of other options too).

     

    • tmkuzma_138268's avatar
      tmkuzma_138268
      Icon for Nimbostratus rankNimbostratus
      Sorry what do you mean by 'press the key' what key are you talking about the tab key? or the '?' key? when i do the create ltm virtual testvirtual ? i see a list of options and the '{' is listed as 'Optional delimiter' see below: root@(nxxdcm-06xx-b24-lal01-t)(cfg-sync In Sync)(/S2-green-P:Standby)(/Common)(tmos) create ltm virtual ? Identifier: [object identifier] Name of the virtual server root@(nxxdcm-06xx-b24-lal01-t)(cfg-sync In Sync)(/S2-green-P:Standby)(/Common)(tmos) create ltm virtual test ? Identifier: [object identifier] Name of the virtual server Properties: "{" Optional delimiter auth Specifies a list of authentication profile names separated by spaces that the virtual server uses to manage authentication. auto-lasthop Specifies whether to automatically map last hop for pools or not. The default is to use next level's default. clone-pools Specifies a pool or list of pools that the virtual server uses to replicate either client-side or server-side traffic. You must specify a value of "clientside" or "serverside" for the context option for each clone pool. Typically, this option is used for intrusion detection. cmp-enabled Enables or disables clustered multi-processor (CMP) acceleration. This feature applies to certain platforms only. The default value is enabled. connection-limit Specifies the maximum number of concurrent connections you want to allow for the virtual server. description User defined description. destination Specifies the : on which the virtual server listens for connections. can be an IP address or a previously created virtual-address. dhcp-relay Specifies a virtual server that relays all received dhcp requests to all pool members. If there is no pool, the received request get dropped. disabled Note that when you disable a virtual server, the virtual server no longer accepts new connection requests. However, it allows current connections to finish processing before going to a down state. enabled Specifies the state of the virtual server. The default value is enabled. This brings the virtual server to a state where it will accept new connections. fallback-persistence Specifies a fallback persistence profile for the virtual server to use when the default persistence profile is not available. gtm-score http-class Specifies an ordered list of httpclass profiles which the virtual server uses to increas
    • Mike_61663's avatar
      Mike_61663
      Icon for Cirrus rankCirrus
      Sorry about that, I meant the TAB key - I had an HTML markup issue with my last post - fixed now so it should be readable! My point is that BOTH versions of the command that you specified will be valid. The curly brace is optional in this case. What I was saying is to determine whether you need to use it or not, simply use command completion! If it is "required" then it will appear as the only option.