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.
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 }
| 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:
|
range start-ip-address end-ip-address |
Specifies an IP address range. |
|
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 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.
# 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