create multiple address objects and then add to address group

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

create multiple address objects and then add to address group

L0 Member

Hello,

 

Looking for a good way to create 122 address objects to add to an address group.

Would like to create an array of the 122 ips, then loop thru and create the objects, then add them to my group.

 

Thanks.

3 REPLIES 3

L1 Bithead

Anytime I have to add large numbers of addresses / groups I script it in the CLI.

 

Example:

set device-group DG_Name address ADDRESS_NAME ip-netmask 10.0.0.0/8

 

set device-group DG_NAME address-group GROUP_NAME static ADDRESS_NAME

 

 

 

Hi RHuss1,

 

I'm with a scenario where i need to create 500 host objects and add them to an already existing group, and i think i need some help understanding your examples, if you could.

 

Using this example:
"set device-group DG_Name address ADDRESS_NAME ip-netmask 10.0.0.0/8"

Are we creating a new object for the 10.0.0.0/8 network, called "ADDRESS_NAME", and adding it in a group named "DG_Name" that already exists? 

 

The other one:

"set device-group DG_NAME address-group GROUP_NAME static ADDRESS_NAME" 

I'm confused about this one, looks like "DG_NAME" and "GROUP_NAME" are 2 different groups and i'm adding the object "ADDRESS_NAME" to one of them, but i think i did't get it right.

 

I have a lot of experience with another vendors, but i'm new to panorama and i like to work with CLI for these cases, and i didn't find any detailed documentation about it.

 

I found these other ones and was planning to create a script using them, but i really don't know how they will work.

"set address host_XXX ip-netmask XXX/32
set address-group GROUP_NAME static host_XXX"

 

Line 1 - Create the new host object

Line 2 - Add the new objetc to the GROUP_NAME group.

 

Will the line 2 command ADD the host_XXX into the group without removing the other objects already there? Or this will make the host_XXX object the only one on that group? This is what i'm afraid...=] 

 

Btw, this is a shared group used by multiple device groups.

 

Sorry about the long message and lots of questions, i'm just tryng to be clear (i'm not an english native speaker) =/

 

Thank you very much in advance.

 

L1 Bithead

Using this example:
"set device-group DG_Name address ADDRESS_NAME ip-netmask 10.0.0.0/8"

Are we creating a new object for the 10.0.0.0/8 network, called "ADDRESS_NAME", and adding it in a group named "DG_Name" that already exists?    YES

 

In the 2nd example,  You are adding the address object you created,  to the address Group in the device group in Panorama.

 

Play around with it,  you will get the hang of it.

 

  • 8755 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!