object-group
Use object-group to configure an object group and enter its view, or enter the view of an existing object group.
Use undo object-group to delete an object group.
Syntax
object-group { { ip | ipv6 } address | port } object-group-name
undo object-group { { ip | ipv6 } address | port } object-group-name
Default
Default object groups exist.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
ip address: Configures an IPv4 address object group.
ipv6 address: Configures an IPv6 address object group.
port: Configures a port object group.
object-group-name: Specifies an object group name, a case-insensitive string of 1 to 31 characters.
Usage guidelines
The object-group command execution results vary with the specified object group.
If the specified group does not exist, the system creates a new object group and enters the object group view.
If the specified group exists but the group type is different from that in the command, the command fails.
The undo object-group command execution results vary with the specified object group.
If the specified group does not exist, the system executes the command without any system prompt.
If the specified group exists and the group type is the same as that in the command, the system deletes the group.
If the specified group exists but the group type is different from that in the command, the command fails.
If the specified object group is being used by an ACL or object group, the command fails.
Default object groups cannot be deleted.
Examples
# Configure an IPv4 address object group named ipgroup.
<Sysname> system-view [Sysname] object-group ip address ipgroup
# Configure an IPv6 address object group named ipv6group.
<Sysname> system-view [Sysname] object-group ipv6 address ipv6group
# Configure a port object group named portgroup.
<Sysname> system-view [Sysname] object-group port portgroup