Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create server in GTM under LTM via CLI ?

Diga_171140
Nimbostratus
Nimbostratus

How to create server in GTM under LTM via CLI ?

 

11 REPLIES 11

Max_Q_factor
Cirrocumulus
Cirrocumulus

I assume you mean inside TMSH shell as the "LTM via CLI"? If so then here is what I would do:

1) Make sure you create a Datacenter object first

create gtm datacenter /Common/ { }

2) creating a redundant LTM server object

create gtm server /Common/ { addresses {  { device-name "" }  { device-name "" } } datacenter /Common/ monitor /Common/bigip  product redundant-bigip }

If you login to GTM Global Traffic Server ( Multiple Datacenter’s are created ( Product BIG-IP System (Redundant) ) Under this Datacenter We create New Virtual Server Via GUI. I would like to know How to create Virtual server in Server Data Center under GTM via CLI ( Command Line ) ?

how I typically figure out what the TMSH commands that are needed for a configuration is, I create the object in the GUI exactly how I want the object to appear, and in TMSH I save the config using the one-line option `save sys config one-line file ` and find the object I created in the text file that was saved in `/var/local/scf/` . I know this does not answer your question directly but I think you will be able to find a lot more useful options that way. There is also another way to load objects into TMSH. I would again create an object in the GUI, then in TMSH I would list it (i.e. `list gtm server `, copy the output from the list, edit the output and then perform a `load sys config merge from-terminal` and paste the new object into the terminal followed by a control-d to complete the merge and the new object should be in the configuration.

Diga_171140
Nimbostratus
Nimbostratus

sorry to say bt it didnt help actually in GTM under the server there is server is created which product type is BIG-IP System (Redundant) and under this server we normally create virtual server , that I would like to know via command line

 

Max_Q_factor
Cirrocumulus
Cirrocumulus

Here is how I would create a virtual server that uses translation after I created a Data center, and a GTM server

modify gtm server  virtual-servers add {  { destination : translation-address  translation-port  } } }

Diga_171140
Nimbostratus
Nimbostratus

Thanks for your response and it was very helpful. below command parameter worked for me. modify gtm server < Server Name > virtual-servers add { : { name < VS_Name > } }

 

Diga_171140
Nimbostratus
Nimbostratus

modify gtm server < Server Name > virtual-servers add { : { name < VS_Name > } }

 

Diga_171140
Nimbostratus
Nimbostratus

please ignore last port and ipv4 after closing double curly braces

 

Diga_171140
Nimbostratus
Nimbostratus

modify gtm server < Server Name > virtual-servers add { : { name < VS_Name > } }

 

in GTM running with version BIG-IP 11.5.1 Build 8.0.175 Hotfix HF8 above command is not working.

 

giving an error at name option.

 

Please help. I have tried with ltm-name option but it didnt worked and it gave me error at : it is taking as name. how to specify IP and port.

 

Diga_171140
Nimbostratus
Nimbostratus

modify gtm server < Server Name > virtual-servers add { ipv4:port { name < VS_Name > } }

 

in GTM running with version BIG-IP 11.5.1 Build 8.0.175 Hotfix HF8 above command is not working.

 

giving an error at name option.

 

Please help. I have tried with ltm-name option but it didnt worked and it gave me error at ipv4:port it is taking as name. how to specify IP and port.

 

Please try

modify gtm server <server_name> virtual-servers add {<virtual servername>  {destination<IP_address>:http monitor bigip}}

Cheers