< Home

add address

Function

The add address command adds IP addresses to the unknown zone, predefined regions, and user-defined regions.

The undo add address command deletes added IP addresses.

Format

add address { ip-address mask { mask-address | mask-length } | range start-ip-address end-ip-address }

undo add address { ip-address mask { mask-address | mask-length } | range start-ip-address end-ip-address }

Parameters

Parameter Description Value

ip-address

Specifies the IP address or network segment to be added.

The value is in dotted decimal notation.

mask { mask-address | mask-length }

Specifies the subnet mask of the IP address.

You can use either of the following parameters to specify a subnet mask:

  • mask-address: specifies a subnet mask.
  • mask-length: specifies the length of a subnet mask. The value is an integer ranging from 1 to 32.

range start-ip-address end-ip-address

Specifies an IP address range.

  • start-ip-address: Specify the start IP address. The value is in dotted decimal notation.
  • end-ip-address: Specify the end IP address. The value is in dotted decimal notation.

Views

Unknown zone view, predefined region view, or user-defined region view

Default Level

2: Configuration level

Usage Guidelines

The region identification signature database may not be updated in time. Therefore, you can change the IP addresses in predefined regions to meet specific requirements. The modified configuration of predefined regions has a higher priority than the update of the region identification signature database. Therefore, after the update, the manually modified configuration still takes effect.

  • You can add IP addresses to predefined regions. If the IP address you are adding to a predefined region has been added to a user-defined region or predefined region, the addition takes effect and the IP address is removed from the predefined or user-defined region to which the IP address belonged.
  • To exclude certain predefined IP addresses in a predefined region but the locations of these IP addresses are unknown, add these IP addresses to the unknown zone.
  • The undo add address command can delete only manually added IP addresses.

You can delete the entire address range of a region, but you cannot delete part of the address range. For example, if you have added IP address range 10.20.20.20 to 10.20.20.30 for a region, you cannot delete 10.20.20.20 to 10.20.20.25.

If the IP address you are adding to a user-defined region has been added to a user-defined region or predefined region, the addition takes effect and the IP address is removed from the predefined or user-defined region to which the IP address belonged.

User-defined configurations (configurations of user-defined and predefined regions) have a higher priority than the region identification signature database, and they are allowed to have the same IP addresses.

Example

# Add IP address range 10.20.20.20 to 10.20.20.30 to predefined region BeiJing.

<sysname> system-view
[sysname] location
[sysname-location] geo-location pre-defined BeiJing
[sysname-pre-defined-location-BeiJing] add address range 10.20.20.20 10.20.20.30

# Exclude IP address range 10.10.10.1 to 10.10.10.20 from predefined region BeiJing and add it to the unknown zone.

<sysname> system-view
[sysname] location
[sysname-location] geo-location unknown-zone
[sysname-pre-defined-location-unknown-zone] add address range 10.10.10.1 10.10.10.20

# Delete IP address range 10.20.20.20 to 10.20.20.30 that you have added to BeiJing.

<sysname> system-view
[sysname] location
[sysname-location] geo-location pre-defined BeiJing
[sysname-pre-defined-location-BeiJing] undo add address range 10.20.20.20 10.20.20.30

# Add IP addresses to user-defined region mycity.

<sysname> system-view
[sysname] location
[sysname-location] geo-location user-defined mycity
[sysname-user-defined-location-mycity] add address 10.40.0.0 mask 16
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >