The geo-location command displays a predefined region view or creates a user-defined region and displays its view.
The undo geo-location command deletes existing user-defined regions.
geo-location { unknown-zone | { pre-defined | user-defined } geo-location-name }
undo geo-location user-defined geo-location-name
| Parameter | Description | Value |
|---|---|---|
| unknown-zone | Displays the unknown zone view. You can add IP addresses with unknown locations or temporarily unnecessary IP addresses to the unknown zone. | - |
| pre-defined geo-location-name | Specifies the name of a predefined region. |
The value must be the name of a predefined region and is case sensitive. You are advised to enter a question mark (?) and then enter the value according to the prompt messages. |
| user-defined geo-location-name | Specifies the name of a user-defined region. | The value is a case-sensitive character string. The length of a name without spaces ranges from 1 to 63 characters. The length of a name with spaces ranges from 3 to 65 characters. If a name contains spaces, the name must be enclosed with quotation marks (for example, "location for test"). The name cannot contain question marks (?). If the name does not contain any space, it also cannot have any double quotation marks ("). In addition, the name cannot be any , all, or any IPv4 or IPv6 address. NOTE:
The specified name cannot be the same as any predefined region. You can run the display geo-location all command to view the names of predefined regions. |
A region is a collection of IP addresses divided according to geographical locations. You can reference regions in policies, such as security policies and authentication policies, to implement region-specific policy control. A region can be predefined or user-defined.
Predefined regions in China include countries, provinces, and cities, and the predefined regions in other countries include only the countries.
User-defined regions referenced in policies and region groups cannot be deleted. You must cancel the reference before you delete them.
# Access the view of predefined region BeiJing.
<sysname> system-view [sysname] location [sysname-location] geo-location pre-defined BeiJing [sysname-pre-defined-location-BeiJing]
# Create a region and name it my city.
<sysname> system-view [sysname] location [sysname-location] geo-location user-defined "my city" [sysname-user-defined-location-my city]