< Home

Configuring an Address Object and Address Group Using the CLI

This section describes how to use the CLI to configure an address object and address group.

Configuring an Address Object

  1. Access the system view.

    system-view

  2. Create an address object and access the address object view.

    ip address-set address-set-name type object [ vpn-instance vpn-instance-name ]

    address-set-name cannot be set to any or all.

    You need to set type when creating an address object. You do not need to set type after accessing the address object view.

  3. Add addresses to the address object.

    • Add IPv4 addresses to the address object.

      address [ id ] { ipv4-address { 0 | wildcard | mask { mask-address | mask-len } } | range start-ipv4-address end-ipv4-address } [ description description ]

    • Add IPv6 addresses to the address object.

      address [ id ] { ipv6-address mask-len | range start-ipv6-address end-ipv6-address } [ description description ]

    • Add MAC addresses to the address object.

      address [ id ] mac-address [ description description ]

    You can run this command repeatedly to add multiple addresses to the address object. All IP addresses in an address object are valid, irrespective of whether these IP addresses are in multiple address objects.

  4. Optional: Configure a description for the address object.

    description description

    Appropriate descriptions of address objects help you to further manage the address objects.

Configuring an Address Group

  1. Access the system view.

    system-view

  2. Create an address group and access the address group view.

    ip address-set address-set-name type group [ vpn-instance vpn-instance-name ]

    address-set-name cannot be set to any or all.

    You need to set type when creating an address group. You do not need to set type after accessing the address group view.

  3. Add a member.

    • Add an IPv4 address.

      address [ id ] { ipv4-address { 0 | wildcard | mask { mask-address | mask-len } } | range start-ipv4-address end-ipv4-address } [ description description ]

    • Add an IPv6 address or address group.

      address [ id ] { ipv6-address mask-len | range start-ipv6-address end-ipv6-address } [ description description ]

    • Add a MAC address.

      address [ id ] mac-address [ description description ]

    • Add an address object or address group.

      address [ id ] address-set address-set-name [ description description ]

    You can run this command repeatedly to add multiple address objects to the address group. All IP address objects in an address group are valid, irrespective of whether these IP address objects are in multiple address groups.

  4. Optional: Configure a description for the address group.

    description description

    Appropriate descriptions of address groups help you to further manage the address groups.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >