forked from slchorne/ibcli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser_guide_ibcli.html
More file actions
1724 lines (1676 loc) · 60.7 KB
/
user_guide_ibcli.html
File metadata and controls
1724 lines (1676 loc) · 60.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>user_guide.html</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:_postfix@neige.apple.com" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#ibcli">Ibcli</a></li>
<li><a href="#synopsis">Synopsis</a></li>
<li><a href="#description">Description</a></li>
<li><a href="#quickstart">Quickstart</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#getting_started">Getting started</a></li>
<li><a href="#setting_the_debug_level">Setting the debug level</a></li>
<li><a href="#command_line_options">Command line options</a></li>
<ul>
<li><a href="#config_file">config file</a></li>
</ul>
<li><a href="#other_gritty_details">Other Gritty Details</a></li>
<ul>
<li><a href="#members_and_secondaries">Members and secondaries</a></li>
<li><a href="#laziness">Laziness</a></li>
<li><a href="#tab_completion_and_other_commands">TAB completion and other commands</a></li>
<li><a href="#batch_processing">BATCH processing</a></li>
</ul>
<li><a href="#general_command_reference">GENERAL COMMAND REFERENCE</a></li>
<li><a href="#dns_configuration">DNS Configuration</a></li>
<ul>
<li><a href="#add_a_view_to_dns">Add a view to dns</a></li>
<li><a href="#remove_a_view_from_dns">Remove a view from dns</a></li>
<li><a href="#add_a_shared_record_group">Add a shared record group</a></li>
<li><a href="#add_a_zone">Add a Zone</a></li>
<li><a href="#remove_a_zone">Remove a zone</a></li>
<li><a href="#copy_a_zone_to_another_view">Copy a zone to another view</a></li>
<li><a href="#add_a_ns_group">Add a NS group</a></li>
<li><a href="#delete_a_ns_group">Delete a NS group</a></li>
<li><a href="#add_a_host_to_a_zone">Add a host to a zone</a></li>
<li><a href="#modifying_hosts">Modifying hosts</a></li>
<li><a href="#remove_a_host_from_a_zone">Remove a host from a zone</a></li>
<li><a href="#add_an_a_record_to_a_zone">Add an A record to a zone</a></li>
<li><a href="#remove_an_a_record_from_a_zone">Remove An A record from a zone</a></li>
<li><a href="#add_an_aaaa_record_to_a_zone">Add an AAAA record to a zone</a></li>
<li><a href="#remove_an_aaaa_record_from_a_zone">Remove An AAAA record from a zone</a></li>
<li><a href="#add_an_mx_record_to_a_zone">Add an MX record to a zone</a></li>
<li><a href="#remove_an_mx_record_from_a_zone">Remove An MX record from a zone</a></li>
<li><a href="#add_an_srv_record_to_a_zone">Add an SRV record to a zone</a></li>
<li><a href="#add_a_bulk_host_to_a_zone">Add a bulk host to a zone</a></li>
<li><a href="#remove_a_bulk_host_from_a_zone">Remove a bulk host from a zone</a></li>
<li><a href="#add_a_cname_to_a_zone">Add a CNAME to a zone</a></li>
<li><a href="#remove_a_cname_from_a_zone">Remove a CNAME from a zone</a></li>
<li><a href="#add_a_txt_record_to_a_zone">Add a TXT record to a zone</a></li>
<li><a href="#remove_a_txt_record_from_a_zone">Remove a TXT Record from a zone</a></li>
<li><a href="#add_a_ptr_to_a_zone">Add a PTR to a zone</a></li>
<li><a href="#remove_a_ptr_from_a_zone">Remove a PTR from a zone</a></li>
</ul>
<li><a href="#dhcp_configuration">DHCP Configuration</a></li>
<ul>
<li><a href="#add_a_network_view">Add a network view</a></li>
<li><a href="#add_a_network">Add a network</a></li>
<li><a href="#modifying_networks">Modifying Networks</a></li>
<li><a href="#add_a_network_container">Add a network container</a></li>
<li><a href="#remove_a_network">Remove a network</a></li>
<li><a href="#remove_a_network_template">Remove a network Template</a></li>
<li><a href="#move_networks">Move Networks</a></li>
<li><a href="#join_networks">Join Networks</a></li>
<li><a href="#add_a_shared_network">Add a shared network</a></li>
<li><a href="#remove_a_shared_network">Remove a shared network</a></li>
<li><a href="#split_a_network">Split a network</a></li>
<li><a href="#adding_network_to_parents">Adding network to parents</a></li>
<li><a href="#add_a_failover_association">Add a failover association</a></li>
<li><a href="#add_a_fixed_address">Add a fixed address</a></li>
<li><a href="#add_a_roaming_address__that_has_no_ip_addr_">Add a roaming address (that has no IP addr)</a></li>
<li><a href="#modify_a_fixed_address">Modify a fixed address</a></li>
<li><a href="#add_a_fixed_address_template">Add a fixed address Template</a></li>
<li><a href="#modify_a_fixed_address">Modify a fixed address</a></li>
<li><a href="#add_a_dhcp_range_to_a_network">Add a dhcp range to a network</a></li>
<li><a href="#modifying_ranges">Modifying Ranges</a></li>
<li><a href="#remove_a_dhcp_range">Remove a dhcp range</a></li>
<li><a href="#add_a_dhcp_filter">Add a DHCP filter</a></li>
<li><a href="#remove_a_dhcp_filter">Remove a DHCP filter</a></li>
<li><a href="#add_a_mac_address_to_a_filter">Add a mac address to a filter</a></li>
<li><a href="#remove_a_mac_address_from_a_filter">remove a mac address from a filter</a></li>
</ul>
<li><a href="#ipam_configuration">IPAM Configuration</a></li>
<ul>
<li><a href="#show_information_about_an_ip_address">Show information about an IP address</a></li>
<li><a href="#add_a_network_to_a_discovery_job">Add a network to a discovery job</a></li>
<li><a href="#show_a_discovery_job">Show a discovery job</a></li>
<li><a href="#adding_custom_metadata_fields">Adding custom metadata fields</a></li>
<li><a href="#showing_attributes_types">Showing attributes types</a></li>
<li><a href="#showing_device_types">Showing device types</a></li>
<li><a href="#showing_definitions_for_a_device_type">Showing definitions for a device type</a></li>
<li><a href="#showing_scheduled_updates">Showing scheduled updates</a></li>
<li><a href="#deleting_scheduled_updates">Deleting scheduled updates</a></li>
</ul>
<li><a href="#radius_configuration">RADIUS Configuration</a></li>
<ul>
<li><a href="#adding_radius_users">Adding Radius users</a></li>
<li><a href="#deleting_radius_users">Deleting Radius users</a></li>
<li><a href="#showing_radius_users">Showing Radius users</a></li>
<li><a href="#adding_radius_devices">Adding Radius devices</a></li>
<li><a href="#deleting_radius_devices">Deleting Radius devices</a></li>
<li><a href="#showing_radius_users">Showing Radius users</a></li>
</ul>
<li><a href="#grid_configuration">Grid Configuration</a></li>
<ul>
<li><a href="#adding_administrator_groups">Adding Administrator groups</a></li>
<li><a href="#adding_administrator_roles">Adding Administrator Roles</a></li>
<li><a href="#adding_users">Adding users</a></li>
<li><a href="#adding_permissions">Adding permissions</a></li>
<li><a href="#deleting_or_changing_permissions">Deleting or Changing permissions</a></li>
<li><a href="#modifying_permissions">Modifying permissions</a></li>
<li><a href="#configure_global_grid_settings">configure global Grid settings</a></li>
<li><a href="#configure_member_settings">configure Member settings</a></li>
<li><a href="#configure_member_dns_settings">Configure Member DNS settings</a></li>
<li><a href="#show_member_dns_settings">Show Member DNS settings</a></li>
<li><a href="#configure_member_dhcp_settings">Configure Member DHCP settings</a></li>
<li><a href="#adding_members">Adding members</a></li>
<li><a href="#removing_members">Removing members</a></li>
<li><a href="#add_global_dns_settings">add global DNS settings</a></li>
<li><a href="#add_global_dhcp_option_definitions">add global DHCP option definitions</a></li>
<li><a href="#add_global_dhcp_options">add global DHCP options</a></li>
<li><a href="#remove_a_custom_option">Remove a custom option</a></li>
<li><a href="#show_global_dns_options">Show global DNS options</a></li>
<li><a href="#show_global_dhcp_options">Show global DHCP options</a></li>
</ul>
<li><a href="#show_commands">SHOW commands</a></li>
<ul>
<li><a href="#showing_zones">Showing Zones</a></li>
<li><a href="#showing_views">Showing Views</a></li>
<li><a href="#showing_hosts">Showing hosts</a></li>
<li><a href="#showing_records">Showing records</a></li>
<li><a href="#showing_leases">Showing leases</a></li>
<li><a href="#showing_networks">Showing networks</a></li>
<li><a href="#showing_networks_templates">Showing networks templates</a></li>
<li><a href="#showing_network_views">Showing Network Views</a></li>
<li><a href="#showing_network_failover">Showing network failover</a></li>
<li><a href="#showing_network_option_definitions__grid_level_">Showing network option definitions (grid level)</a></li>
<li><a href="#showing_network_statistics">Showing network statistics</a></li>
<li><a href="#showing_network_ipam">Showing network IPAM</a></li>
<li><a href="#showing_ranges">Showing ranges</a></li>
<li><a href="#showing_fixed_addresses">Showing fixed addresses</a></li>
<li><a href="#showing_fixed_addresses_templates">Showing fixed addresses templates</a></li>
<li><a href="#show_global_grid_settings">Show global Grid settings</a></li>
<li><a href="#show_global_member_settings">Show global Member settings</a></li>
<li><a href="#showing_users_and_groups">Showing users and groups</a></li>
</ul>
<li><a href="#server_management">Server Management</a></li>
<ul>
<li><a href="#connect_to_a_server">Connect to a server</a></li>
<li><a href="#connecting_to_the_mgmt__management__port">connecting to the MGMT (management) port</a></li>
<li><a href="#show_server_details">Show server details</a></li>
<li><a href="#restarting_services">Restarting services</a></li>
<li><a href="#download_csv_data_for_an_object_type">Download csv data for an object type</a></li>
<li><a href="#export_log_files">Export log files</a></li>
<li><a href="#download_the_database">Download the database</a></li>
<li><a href="#restore_the_database">Restore the database</a></li>
<li><a href="#upload_lease_data">Upload lease data</a></li>
<li><a href="#download_the_dhcp_configuration">Download the DHCP configuration</a></li>
<li><a href="#upload_the_dhcp_expert_mode_configuration">Upload the DHCP expert mode configuration</a></li>
<li><a href="#browse_and_load_a_datbase_backup">Browse and load a datbase backup</a></li>
<li><a href="#show_the_contents_of_a_file">show the contents of a file</a></li>
<li><a href="#change_the_path_of_the_current_node">Change the path of the current node</a></li>
<li><a href="#debugging__">Debugging :</a></li>
</ul>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<h1><a name="ibcli">Ibcli</a></h1>
<p>The INFOBLOX CLI, a users guide</p>
<p>
</p>
<hr />
<h1><a name="synopsis">Synopsis</a></h1>
<p>*A guide for commandline junkies*</p>
<p>
</p>
<hr />
<h1><a name="description">Description</a></h1>
<p>The Ibcli is a simple command line tool that lets you do some (mostly)
powerful things. It leverages the Infoblox api but provides a wrapper to
the more complex (and detailed) API calls that uses more simple command
line type calls.</p>
<p>It also lets you create batch scripts that can configure an Infoblox SDB
without actually writing any perl.</p>
<p>So why do this, what is this CLI for ? Well there were a few primary
reasons:</p>
<dl>
<dt><strong><a name="quick_changes_are_now_easy" class="item">Quick changes are now easy,</a></strong>
<dd>
<p>You don't need to wait for a GUI to start or get the right version
of java functional, this allows you to quickly get into the database
and make some simple and efficient changes</p>
</dd>
</li>
<dt><strong><a name="abstract_command_set" class="item">Abstract command set</a></strong>
<dd>
<p>Now you don't need to know the intricacies of the API, a few simple
commands will achieve the same effect, if you are a user that
doesn't know PERL you can still drive the CLI and get the results
you need. This may not be an advantage if you are reading data from
another system to import into an Infoblox unit (since you still need
to write software to parse the data, eg PERL) but it may still help
and end user that can convert this data in to the CLI command set
but not know enough to write PERL.</p>
</dd>
</li>
<dt><strong><a name="customers_wanted_it" class="item">Customers wanted it</a></strong>
<dd>
<p>Need I say more ?</p>
</dd>
</li>
</dl>
<p>Lastly, why is this called 'ibcli' and not 'DNScli' ? Well, this is just
a wrapper to any API we like, it is not really DNS specific.</p>
<p>
</p>
<hr />
<h1><a name="quickstart">Quickstart</a></h1>
<p>Simple example, adding a zone</p>
<pre>
Start ibcli</pre>
<pre>
ibcli -s 10.0.1.114 -u admin -p infoblox</pre>
<pre>
Then run some commands</pre>
<pre>
admin@10.0.1.224 > conf zone add infoblox.com
admin@10.0.1.224 > conf zone add sales.infoblox.com</pre>
<p>A more detailed example</p>
<pre>
admin@10.0.1.224 > conf zone add com
admin@10.0.1.224 > conf zone add foo.com
admin@10.0.1.224 > conf zone foo.com add host test 1.2.3.4
admin@10.0.1.224 > conf zone delete bar.com</pre>
<p>
</p>
<hr />
<h1><a name="installation">Installation</a></h1>
<p>It should run 'as is' from a uniz machine.</p>
<p>If you have a windows OS then you will have a few hurdles to cross:</p>
<ul>
<li><strong><a name="rename_the_script_to_ibcli_pl" class="item">Rename the script to 'ibcli.pl'.</a></strong>
<p>I still don't understand why Windows uses file suffix to type its data
rather than doing something intelligent like looking at the contents of
the file, but then, we are dealing with people who thought 8.3 was all
you'd ever need as a file namespace and 640K for ram...</p>
</li>
<li><strong><a name="make_sure_you_have_the_necessary_libraries_installed" class="item">Make sure you have the necessary libraries installed,</a></strong>
<p>you'll need:</p>
<pre>
o Getopt::Long</pre>
<pre>
o Text::Abbrev</pre>
<pre>
o Term::EditLine (good luck with that)</pre>
</li>
</ul>
<p>
</p>
<hr />
<h1><a name="getting_started">Getting started</a></h1>
<p>Run the ibcli - it is a perl script, you will get a prompt</p>
<pre>
% ./ibcli
server ? ></pre>
<p>Ideally, you should now connect the CLI to a server somewhere, to do
this you give it the server and a user and a password, you can do these in
either order, it just tries to eventually connect when it has enough data.</p>
<pre>
server ? > conf server 10.0.1.224 user admin password infoblox
admin@10.0.1.224 ></pre>
<p>Or you can also do this from the initial invocation:</p>
<pre>
% ./ibcli -s 10.0.1.230 -u admin -p infoblox</pre>
<p>"HOLD ON A SEC", I hear you ask, "Why am i connecting to a server, isn't
this CLI running on a console somewhere ?". No, Grasshopper, the CLI is
just a wrapper to the Infoblox.pm so you can run it from anywhere in
the world. This gives you the added advantage of being able to work on
MANY servers from the one CLI.</p>
<p>
</p>
<hr />
<h1><a name="setting_the_debug_level">Setting the debug level</a></h1>
<pre>
server ? > conf debug 3
server ? ></pre>
<p>Or you can also do this from the initial invocation:</p>
<pre>
% ./ibcli -d 3</pre>
<p>
</p>
<hr />
<h1><a name="command_line_options">Command line options</a></h1>
<dl>
<dt><strong><a name="s_server" class="item">-s <server></a></strong>
<dd>
<p>Connect to this server</p>
</dd>
</li>
<dt><strong><a name="u_username" class="item">-u <username></a></strong>
<dd>
<p>Connect as this user</p>
</dd>
</li>
<dt><strong><a name="p_password" class="item">-p <password></a></strong>
<dd>
<p>Connect with this password</p>
</dd>
</li>
<dt><strong><a name="w" class="item">'-w'</a></strong>
<dd>
<p>Print a CGI header instead of the normal header</p>
</dd>
</li>
<dt><strong><a name="e_command" class="item">-e <command></a></strong>
<dd>
<p>Run a single command and exit. The command must be quoted (for obvious reasons).
For example</p>
</dd>
<dd>
<pre>
% ./ibcli -e 'show zone'</pre>
</dd>
</li>
<dt><strong><a name="b_f_file" class="item">-b|f <file></a></strong>
<dd>
<p>load a database backup file for browsing</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="config_file">config file</a></h2>
<p>If ibcli finds a file in the current working dircetory called '.ibcli.cf' it will
silently load and run the commands in that file. This is useful for doing things
like auto connection to a server (in CGI mode).</p>
<p>
</p>
<hr />
<h1><a name="other_gritty_details">Other Gritty Details</a></h1>
<p>OK, so what can I do from here ?</p>
<p>
</p>
<h2><a name="members_and_secondaries">Members and secondaries</a></h2>
<p>By default all stuff is added to just the Grid Master, the API guesses
this from the SERVER setting. If you explicitly want to add stuff to
certain members you need to append the members to the command arg :</p>
<pre>
conf zone add foo.com member 1.2.3.4
conf zone add foo.com member 1.2.3.4 member 1.2.3.5</pre>
<p>
</p>
<h2><a name="laziness">Laziness</a></h2>
<p>The command parser accepts abbreviations</p>
<pre>
co z a foo.com</pre>
<p>is the same as</p>
<pre>
conf zone add foo.com</pre>
<p>
</p>
<h2><a name="tab_completion_and_other_commands">TAB completion and other commands</a></h2>
<p>The cli uses a full line editor with history and the usual bells and
whistles. Command completion can be achieved by pressing <tab></p>
<p>To clear the line press '<ctrl>-u' or '\'</p>
<p>To exit the cli, press '<ctrl>-D' (not <ctrl>-c)</p>
<p>
</p>
<h2><a name="batch_processing">BATCH processing</a></h2>
<p>You can process command in batch by just writing them to a file and
adding it to the command line thus :</p>
<pre>
ibcli -s 10.64.128.50 -u admin -p infoblox demo.cf</pre>
<p>
</p>
<hr />
<h1><a name="general_command_reference">GENERAL COMMAND REFERENCE</a></h1>
<p>The syntax mostly matches the API syntax. Also, since this is based on
the API (duh), the same restrictions about required arguments applies.
Don't expect the cli to work around requiring dumb extra arguments. When
you look deep into the API you realise why they are there.</p>
<p>
</p>
<hr />
<h1><a name="dns_configuration">DNS Configuration</a></h1>
<p>
</p>
<h2><a name="add_a_view_to_dns">Add a view to dns</a></h2>
<pre>
conf zone add view internal</pre>
<p>Add a view disabled :</p>
<pre>
conf zone add view internal disabled</pre>
<p>You can also modify views</p>
<pre>
conf zone modify view internal set match_clients=[1.1.1.1,2.2.2.2]</pre>
<p>
</p>
<h2><a name="remove_a_view_from_dns">Remove a view from dns</a></h2>
<pre>
conf zone delete view internal</pre>
<p>
</p>
<h2><a name="add_a_shared_record_group">Add a shared record group</a></h2>
<pre>
conf zone add shared_record_group my_group</pre>
<pre>
conf zone delete shared_record_group my_group</pre>
<p>
</p>
<h2><a name="add_a_zone">Add a Zone</a></h2>
<p>Zones can be added as either forward or reverse. If you add a zone of the
form n.n.n.n/mm it will assume it is a reverse zone</p>
<p>Add a forward zone</p>
<pre>
conf zone add foo.com</pre>
<p>Add a reverse zone</p>
<pre>
conf zone add 10.0.1.0/24
conf zone add 10.in-addr.arpa</pre>
<p>Add a zone to specific members</p>
<pre>
conf zone add foo.com primary 1.2.3.4 secondary 1.2.3.5 sec 1.2.3.6</pre>
<p>Add a zone to a specific view</p>
<pre>
conf zone add foo.com view internal</pre>
<p>Add a zone with extensible attributes</p>
<p>You can add multiple attributes by having multiple 'info' pairs</p>
<pre>
conf zone add foo.com ... info <name>=<value></pre>
<p>Add a zone with external primary</p>
<pre>
conf zone add foo.com ext_primary ns1.foo.com,1.2.3.4</pre>
<p>Add a zone with stealth primary or secondary</p>
<pre>
conf zone add foo.com stealth_secondary 1.2.3.20
conf zone add foo.com stealth_ext_secondary ns1.foo.com,1.2.3.4
conf zone add foo.com stealth_ext_primary ns0.foo.com,1.2.3.4</pre>
<p>Add a zone with an nsgroup</p>
<pre>
conf zone add foo.com ns_group mygroup</pre>
<p>Add a shared record group to a zone</p>
<pre>
conf zone modify foo.com shared_record_group mygroup
conf zone add foo.com shared_record_group mygroup</pre>
<p>Add a forwarding zone (and assign it to members)</p>
<pre>
conf zone add fwd.foo.com forward_to ns1.x.com,2.2.2.2 forward_to ns2.x.com,3.3.3.3 member 10.0.0.20</pre>
<p>Add a delegated zone</p>
<pre>
configure zone add deleg.foo.com delegate_to ns1.s.foo.com,1.2.3.4</pre>
<p>Add a stub zone (and assign it to members)</p>
<pre>
conf zone add foo.com stub_from ns0.foo.com,1.2.3.4 mem 2.2.2.2
=head2 Import a zone</pre>
<p>Zones can be imported as either forward or reverse. You just add an extra
argument of the import source</p>
<p>Import a forward zone</p>
<pre>
conf zone add foo.com import 45.0.1.220</pre>
<p>Import a reverse zone</p>
<pre>
conf zone add 10.0.1.0/24 import 45.0.1.220</pre>
<p>Auto Generate hosts</p>
<p>You can also just post process a zone and create host records</p>
<pre>
conf zone mod foo.com generate_hosts</pre>
<p>Set a random API method on a zone</p>
<pre>
conf zone add foo set <method>=<value>
conf zone add foo set disable_forwarding=FALSE</pre>
<p>When setting arrays you need special syntax "[ ]" and seperate your
values by a ',' (This mostly seems to work)</p>
<pre>
... set allow_update="[10.0.0.0/8,168.147.0.0/24,192.168.114.0/24]"</pre>
<p>
</p>
<h2><a name="remove_a_zone">Remove a zone</a></h2>
<p>Forward or reverse, the syntax follows the same logic as add zone</p>
<p>Remove a forward zone</p>
<pre>
conf zone del foo.com</pre>
<p>Remove a reverse zone</p>
<pre>
conf zone del 10.0.1.0/24</pre>
<p>
</p>
<h2><a name="copy_a_zone_to_another_view">Copy a zone to another view</a></h2>
<p>you need the source and destination zone and views</p>
<pre>
conf zone copy <zone> view <src_view> to <dst_zone> dest_view <dst_view>
conf zone copy zone.com view int to newzone.com dest_view external</pre>
<p>
</p>
<h2><a name="add_a_ns_group">Add a NS group</a></h2>
<pre>
conf zone add ns_group internal primary 45.0.12.20 secondary 45.0.128.20</pre>
<p>You can also call this as a grid command</p>
<pre>
conf grid Infoblox dns add ns_group internal ...
If you want to modify a ns_group, secondaries and external_secondaries
will get ADDED to the current list, (instead of replacing the current
list)</pre>
<pre>
conf zone mod ns_group Internal secondary 45.0.128.20</pre>
<p>
</p>
<h2><a name="delete_a_ns_group">Delete a NS group</a></h2>
<pre>
conf zone del ns_group internal</pre>
<p>You can also call this as a grid command</p>
<pre>
conf grid Infoblox dns del ns_group internal</pre>
<p>
</p>
<h2><a name="add_a_host_to_a_zone">Add a host to a zone</a></h2>
<pre>
conf zone foo.com add host test 1.2.3.4</pre>
<pre>
conf zone foo.com add host test 1.2.3.4 comment "this is a comment"</pre>
<p>If you don't know the zone, then just put in a blank and use a FQDN</p>
<pre>
conf zone "" add host test.foo.com 1.2.3.4</pre>
<p>Add a host to a specific view</p>
<pre>
conf zone "" add host test.foo.com 1.2.3.4 view internal</pre>
<p>Add hosts with multiple ip addresses. seperate the values with a ','</p>
<pre>
conf zone foo.com add host test 1.2.3.4,1.2.3.5</pre>
<p>Add hosts with multiple ip addresses and mac addresses, append the
mac address with ':<mac>' to the ipaddress</p>
<pre>
conf zone foo.com add host test 1.2.3.4:00:FE:00:01:02:03,1.2.3.5</pre>
<p>To add hosts with fixed addresses, and a fixed addr template</p>
<pre>
conf zone foo.com add host test 1.2.3.4:00:FE:00:01:02:03 template mytemp</pre>
<p>Add Hosts with Fixed addreses and settings,
The settings could be on the fixed address, or the host itself. So you
have 2 directives</p>
<pre>
- to set something on the Fixed Address :
conf zone add host ... set <method>=<value></pre>
<pre>
- to set something on the Host Address :
conf zone add host ... set_host <method>=<value></pre>
<p>Add hosts with fixed addresses and options.
only the fixed addr can take options, so use the option directive</p>
<pre>
conf zone add host ... option <num>=<value></pre>
<p>Add hosts with aliases (CNAMES)</p>
<pre>
conf zone foo.com add host test 1.2.3.4 alias www alias ftp</pre>
<p>Adding hosts with IPAM or Extensible Attributes
You add multiple fields with additional 'info <name=value>' pairs</p>
<pre>
conf zone info.com add host pc1 2.3.3.3 info Asset=23456-06</pre>
<p>Quotes are required of your value has spaces in it :</p>
<pre>
conf zone info.com add host pc2 2.3.3.3 info Custom1="Room 207"</pre>
<p>configuring a host for no dns (disable for dns)</p>
<pre>
conf zone info.com add host pc2 2.3.3.3 ... nodns</pre>
<p>
</p>
<h2><a name="modifying_hosts">Modifying hosts</a></h2>
<p>You cannot rename a host, only modify the contents of it</p>
<pre>
conf zone foo.com modify host test 1.2.3.4</pre>
<pre>
conf zone foo.com modify host test 1.2.3.4 comment "this is a comment"</pre>
<p>
</p>
<h2><a name="remove_a_host_from_a_zone">Remove a host from a zone</a></h2>
<pre>
conf zone foo.com delete host test</pre>
<p>
</p>
<h2><a name="add_an_a_record_to_a_zone">Add an A record to a zone</a></h2>
<pre>
conf zone foo.com add a_record test 1.2.3.4</pre>
<p>Add it to a view :</p>
<pre>
conf zone foo.com add a_record test 1.2.3.4 view my_view</pre>
<p>To add the record to a shared record group (zone must be blank)</p>
<pre>
conf zone "" add a_record test 1.2.3.4 shared_record_group mygroup</pre>
<p>
</p>
<h2><a name="remove_an_a_record_from_a_zone">Remove An A record from a zone</a></h2>
<pre>
conf zone foo.com delete A test 1.2.3.4</pre>
<p>
</p>
<h2><a name="add_an_aaaa_record_to_a_zone">Add an AAAA record to a zone</a></h2>
<pre>
conf zone foo.com add AAAA test fe80::0001</pre>
<p>To add the record to a shared record group (zone must be blank)</p>
<pre>
conf zone "" add AAAA test ad::2007 shared_record_group mygroup</pre>
<p>
</p>
<h2><a name="remove_an_aaaa_record_from_a_zone">Remove An AAAA record from a zone</a></h2>
<pre>
conf zone foo.com delete AAAA test fe80::0001</pre>
<p>
</p>
<h2><a name="add_an_mx_record_to_a_zone">Add an MX record to a zone</a></h2>
<pre>
conf zone foo.com add mx mail 10 mail.bar.com</pre>
<p>To add the record to a shared record group (zone must be blank)</p>
<pre>
conf zone "" add mx mail 10 mail.bar.com shared_record_group mygroup</pre>
<p>
</p>
<h2><a name="remove_an_mx_record_from_a_zone">Remove An MX record from a zone</a></h2>
<pre>
conf zone foo.com del mx mail 10 mail.bar.com</pre>
<p>
</p>
<h2><a name="add_an_srv_record_to_a_zone">Add an SRV record to a zone</a></h2>
<pre>
conf zone foo.com add SRV <name> <pri> <weight> <port> <target>
conf zone foo.com add SRV _ldap._tcp 0 100 3268 dc01.foo.com</pre>
<p>To add the record to a shared record group (zone must be blank)</p>
<pre>
conf zone "" add srv ... shared_record_group mygroup</pre>
<p>
</p>
<h2><a name="add_a_bulk_host_to_a_zone">Add a bulk host to a zone</a></h2>
<pre>
conf zone foo.com add bulkhost my_prefix 1.2.3.10 1.2.3.20</pre>
<pre>
conf zone foo.com add bulkhost my_prefix 1.2.3.10 1.2.3.20 addreverse</pre>
<pre>
conf zone foo.com add bulkhost my_prefix 1.2.3.10 1.2.3.20 view foo</pre>
<pre>
conf zone foo.com add bulkhost my_prefix 1.2.3.10 1.2.3.20 comment "bah"</pre>
<p>
</p>
<h2><a name="remove_a_bulk_host_from_a_zone">Remove a bulk host from a zone</a></h2>
<pre>
conf zone foo.com del bulkhost my_prefix 1.2.3.10 1.2.3.20</pre>
<p>
</p>
<h2><a name="add_a_cname_to_a_zone">Add a CNAME to a zone</a></h2>
<pre>
conf zone foo.com add CNAME alias real.foo.com</pre>
<p>
</p>
<h2><a name="remove_a_cname_from_a_zone">Remove a CNAME from a zone</a></h2>
<pre>
conf zone foo.com delete CNAME alias</pre>
<p>
</p>
<h2><a name="add_a_txt_record_to_a_zone">Add a TXT record to a zone</a></h2>
<pre>
conf zone foo.com add TXT alias real.foo.com</pre>
<p>When adding SPF refords or other things with quotes in them, you have
to protect the quotes by using ('') instead of (")</p>
<pre>
conf zone foo.com add TXT spf "''v=spf1'' ''+ip4:1.2.3.4''"</pre>
<p>
</p>
<h2><a name="remove_a_txt_record_from_a_zone">Remove a TXT Record from a zone</a></h2>
<pre>
conf zone foo.com delete txt name</pre>
<p>
</p>
<h2><a name="add_a_ptr_to_a_zone">Add a PTR to a zone</a></h2>
<pre>
conf zone 10.0.0.0/24 add PTR 10.0.0.20 ns2.foo.com</pre>
<p>Add a PTR with comments</p>
<pre>
conf zone 10.0.0.0/24 add PTR 10.0.0.20 ns2.foo.com comment "string"</pre>
<p>
</p>
<h2><a name="remove_a_ptr_from_a_zone">Remove a PTR from a zone</a></h2>
<pre>
conf zone 10.0.0.0/24 del PTR 10.0.0.20 ns2.foo.com</pre>
<p>
</p>
<hr />
<h1><a name="dhcp_configuration">DHCP Configuration</a></h1>
<p>
</p>
<h2><a name="add_a_network_view">Add a network view</a></h2>
<pre>
conf net add view internal</pre>
<p>You can also modify existing views</p>
<pre>
conf net modify view internal set external_ddns_primaries=1.1.1.1,2.2.2.2</pre>
<p>
</p>
<h2><a name="add_a_network">Add a network</a></h2>
<pre>
conf network add 1.1.1.0/24</pre>
<p>Add a network witwith a reverse zone</p>
<pre>
conf network add 1.1.1.0/24 addreverse</pre>
<p>Add a network to a network_view</p>
<pre>
conf network add 1.1.1.0/24 view default</pre>
<p>Add a network with members</p>
<pre>
conf network add 1.1.1.0/24 member 10.1.1.20 member 10.1.1.40</pre>
<p>If no members are specified, the network will be added to the Grid
master. If you don't want to assign any members use '0.0.0.0'</p>
<pre>
conf network add 1.1.1.0/24 member 0.0.0.0</pre>
<p>Add a network using a template</p>
<pre>
conf network add 1.1.1.0/24 template MyTemplate</pre>
<p>Add a network with options</p>
<pre>
conf network add 1.1.1.0/24 option 82="some data"</pre>
<p>Add a network with vendor class options (class.option)</p>
<pre>
conf network add 1.1.1.0/24 option SunW.bootsvr="some data"</pre>
<p>Add a network with comments (comments must come last)</p>
<pre>
conf network add 1.1.1.0/24 comment "comment string"</pre>
<p>Add a network with IPAM info</p>
<pre>
conf network add 1.1.1.0/24 info <field>="<Value>"</pre>
<p>Add a network and set any additional parameters. (the setting
must match a method in the API)</p>
<pre>
conf network add 1.1.1.0/24 set <method=value>
conf network add 1.1.1.0/24 set enable_ddns=FALSE</pre>
<p>If the method requires an ARRAY you have to specify this in the
value by putting the values onside '[]' :</p>
<pre>
conf network ... set some-method="[10.216.2.8,10.204.3.162]"</pre>
<p>even if you only have a single value, you still need to pass the
value as an array :</p>
<pre>
conf network ... set some-method="[10.216.2.8]"</pre>
<p>
</p>
<h2><a name="modifying_networks">Modifying Networks</a></h2>
<p>You cannot renumber a network, only modify the contents of it.</p>
<pre>
conf network modify 1.1.1.0/24 set <method=value></pre>
<pre>
conf network modify 1.1.1.0/24 option 82="some data"</pre>
<p>You also can't change the network_view, but you will have to specify
the view to find the network to modify</p>
<pre>
conf network modify 1.1.1.0/24 view default</pre>
<p>If you change things like options arrays, ALL the existing values will be
replaced by the new list.</p>
<p>So if you want to just append a new option to an existing list, (or change
one of the current options you can use 'addoption'. This will KEEP the
current options array intact.</p>
<pre>
conf network modify 1.1.1.0/24 addoption 82="some data"</pre>
<p>
</p>
<h2><a name="add_a_network_container">Add a network container</a></h2>
<pre>
conf network add container 1.1.1.0/24
conf network modify container 1.1.1.0/24 comment "new comment"</pre>
<p>Network containers can only have a view, comment, Extensible Attributes,
or be disabled.</p>
<p>You probably only need this function when you want to add a container
OVER some existing networks. In most other cases (with NIOS 5x) you can
just add networks and the right thing will happen.</p>
<p>
</p>
<h2><a name="remove_a_network">Remove a network</a></h2>
<pre>
conf network del 1.1.1.0/24</pre>
<p>
</p>
<h2><a name="remove_a_network_template">Remove a network Template</a></h2>
<pre>
conf template del network my_template</pre>
<p>
</p>
<h2><a name="move_networks">Move Networks</a></h2>
<p>Move a network to a different member, or move a network onto members to
match a failover association. The ranges inside the network will also be
moved.</p>
<p>Moving a network to a single member :</p>
<pre>
configure network move 45.0.0.0/24 member 2.2.2.2</pre>
<p>Moving a network to a multiple members :</p>
<pre>
configure network move 45.0.0.0/24 member 2.2.2.2 member 3.3.3.3</pre>
<p>Moving a network to use DHCP failover :</p>
<pre>
configure network move 45.0.0.0/24 failover box1-boxb</pre>
<p>
</p>
<h2><a name="join_networks">Join Networks</a></h2>
<pre>
** This feature will soon change, use with caution **</pre>
<pre>
conf network 1.1.1.0/23 join /23 net 1.1.2.0/24</pre>
<pre>
# this will copy all the ranges etc from the network
# and create a new network</pre>
<p>
</p>
<h2><a name="add_a_shared_network">Add a shared network</a></h2>
<pre>
conf network add shared my_shared child_network 1.1.1.0/24 child 1.1.2.0/24</pre>
<p>Add a shared network with options</p>
<pre>
conf network add shared foo option 82="some data"</pre>
<p>Add a shared network with comments</p>
<pre>
conf network add shared my_shared ... comment "comment string"</pre>
<p>
</p>
<h2><a name="remove_a_shared_network">Remove a shared network</a></h2>
<pre>
conf network del shared my_shared</pre>
<p>
</p>
<h2><a name="split_a_network">Split a network</a></h2>
<p>You need to specify the netmaks of the children networks when you are
doing a split. So to split a /16 into /20 networks :</p>
<pre>
conf network 1.1.0.0/16 split /24</pre>
<p>Split a network and add all children</p>
<pre>
conf network 1.1.0.0/16 split /24 all</pre>
<p>
</p>
<h2><a name="adding_network_to_parents">Adding network to parents</a></h2>
<p>When you split a network and want to add children you just add them to
the parent network. All other options are the same as for adding networks</p>
<pre>
conf network 1.1.0.0/16 add 1.1.4.0/22</pre>
<p>
</p>
<h2><a name="add_a_failover_association">Add a failover association</a></h2>
<pre>
conf net add failover AtoB primary 45.0.12.20 secondary 45.0.128.30</pre>
<p>
</p>
<h2><a name="add_a_fixed_address">Add a fixed address</a></h2>
<pre>
conf network 10.0.1.0/24 add fixed 10.0.1.4 aa:bb:cc:11:22:33</pre>
<p>The 'network' is actually optional, this syntax also works :</p>
<pre>
conf network add fixed 10.0.1.4 aa:bb:cc:11:22:33</pre>
<p>To add the fixed addr with specific options</p>
<pre>
conf network add fixed ... option <name>=<value> [opt <name>=value>]
conf network add fixed 10.0.1.4 .. option 82="some data"</pre>
<p>To add the fixed addr to a specific view</p>
<pre>
conf network add fixed 10.0.1.4 aa:bb:cc:11:22:33 view default</pre>
<p>Add a fixed address with a Fixed Address Template</p>
<pre>
conf network 10.0.1.0/24 add fixed 10.0.1.4 aa:bb:cc:11:22:33 template mytemp</pre>
<p>Add a fixed address with comments</p>
<pre>
conf net 10.0.1.0/24 add fixed 10.0.1042 aa:bb:cc:11:22:33 comment "comment string"</pre>
<p>
</p>
<h2><a name="add_a_roaming_address__that_has_no_ip_addr_">Add a roaming address (that has no IP addr)</a></h2>
<p>You will need to specify the name instad of the IP address</p>
<pre>
conf network add fixed myroamer aa:bb:cc:11:22:33</pre>
<p>
</p>
<h2><a name="modify_a_fixed_address">Modify a fixed address</a></h2>
<p>You can also modify existing addresses with the same syntax</p>
<pre>
conf network 10.0.1.0/24 modify fixed 10.0.1.4 aa:bb:cc:11:22:33 ...</pre>
<p>You also can't change the network_view, but you will have to specify
the view to find the range to modify</p>
<pre>
conf network modify fixed 10.0.1.4 view default</pre>
<p>
</p>
<h2><a name="add_a_fixed_address_template">Add a fixed address Template</a></h2>
<pre>
conf template add fixed <name> offset <value> ...
conf template add fixed router-a offset 1</pre>
<p>Add a fixed address with comments</p>
<pre>
conf template add fixed ... comment "use this for routers"</pre>
<p>
</p>
<h2><a name="modify_a_fixed_address">Modify a fixed address</a></h2>
<p>You can also modify existing addresses with the same syntax</p>
<pre>
conf template modify fixed ...</pre>
<p>
</p>
<h2><a name="add_a_dhcp_range_to_a_network">Add a dhcp range to a network</a></h2>
<p>Dhcp ranges, by default, will get added to the Grid master unless you
override that setting with the 'member <ip>' syntax</p>
<pre>
conf network add range 10.1.1.20 10.1.1.40</pre>
<p>Add a range to a network view</p>
<pre>
conf network add range 10.1.1.20 10.1.1.40 view default</pre>
<p>Failover associations are an additional argument</p>
<pre>
conf net add range 10... failover "my_peering"</pre>
<p>As are adding the member</p>
<pre>
conf net add range 10... member 1.1.1.2</pre>
<p>If no members are specified, the range will be added to the Grid
master. If you don't want to assign any members use '0.0.0.0'</p>
<pre>
conf net add range 10... member 0.0.0.0</pre>
<p>You can also add exclusions</p>
<pre>
conf net add range 10... exclude 1.1.1.2,1.1.2.5</pre>
<p>You can also add filters to a range (multiples are allowed)</p>
<pre>
conf net add range 10... macfilter <name>=<permission></pre>
<p>And add new filters to an existing range, you only have to specify start addr</p>
<pre>
conf net mod range 10.1.1.20 macfilter <name>=<permission></pre>
<pre>
conf net add range 10.1.1.20 10.1.1.40 filter_option <name>=<permission></pre>
<p>
</p>
<h2><a name="modifying_ranges">Modifying Ranges</a></h2>
<p>You cannot renumber a range, only modify the contents of it.</p>
<pre>
conf network modify range 10.. set <method=value></pre>
<pre>
conf network modify range 10.. option 82="some data"</pre>
<p>You also can't change the network_view, but you will have to specify
the view to find the range to modify</p>
<pre>
conf network modify range 10.. view default ...</pre>
<p>If you change things like options arrays, ALL the existing values will be
replaced by the new list. 'modify' does not append to existing lists, it
does a complete replacement of it.</p>
<p>
</p>
<h2><a name="remove_a_dhcp_range">Remove a dhcp range</a></h2>
<pre>
conf net delete range 1.1.1.20 1.1.1.40</pre>
<p>
</p>
<h2><a name="add_a_dhcp_filter">Add a DHCP filter</a></h2>
<p>Filters can take many forms, so you need to be specific</p>
<pre>
conf network add macfilter my_filter</pre>
<p>