Help Center/ Object Storage Service/ FAQs/ OBS Basics/ Querying the OBS Network Segment and Determining the Access Type
Updated on 2026-08-20 GMT+08:00

Querying the OBS Network Segment and Determining the Access Type

You can use the commands below to query the network segment used to access OBS and determine whether the access is private or public.

The IP address obtained through DNS resolution for accessing a Huawei Cloud OBS bucket domain name may change over time. Therefore, you are not advised to directly use an IP address to access OBS.

Query and Identification Methods

  • To query the private IP address of OBS, run any of the following commands to initiate a request from the private network (for example, access within the same region):
  • To query the public IP address of OBS, run any of the following commands to initiate a request from the public network (for example, access between different regions using an EIP):

The following lists common private and public network access methods:

  • Private network access: access within the same region, cross-region access to OBS through VPN or Cloud Connect, access to OBS through VPC endpoints, and access between on-premises data centers and OBS through Direct Connect
  • Public network access: access to OBS buckets across regions using EIPs and access to OBS buckets over the Internet
ping OBS endpoint

Or

dig OBS endpoint

Or

nslookup OBS endpoint

For details about OBS endpoints, see Regions and Endpoints.

  • If the returned IP address falls within the 100.x.x.x or 214.x.x.x network range, the OBS bucket is accessed over a private network.
  • If the returned IP address does not fall within the 100.x.x.x or 214.x.x.x network range, the OBS bucket is accessed over a public network.

Examples

  • Create an ECS (ECS01) without an EIP bound in the CN North-Beijing4 region, and use the ECS to access the endpoint of an OBS bucket in the same region. Intra-region access is considered as private network access. The IP address returned by any of the following commands is the private IP address.

    If an EIP is bound to the ECS, the ECS preferentially uses the private network for access. If the private network access fails, it then uses the EIP for access. Therefore, if an EIP has been bound to the ECS, select the endpoint in the same region as the ECS when running the following commands. Otherwise, the returned IP address will be a public IP address. To ensure the accuracy of the query result, it is recommended that you do not bind an EIP to the ECS.

    ping obs.cn-north-4.myhuaweicloud.com

    Or

    dig obs.cn-north-4.myhuaweicloud.com

    Or

    nslookup obs.cn-north-4.myhuaweicloud.com

    As shown above, if the returned IP address falls within the 100.x.x.x or 214.x.x.x network range, the OBS bucket is accessed over a private network.

  • Create an ECS (ECS02) with an EIP bound in the CN North-Beijing4 region, and use the ECS to access the endpoint of an OBS bucket in another region (for example, CN-Hong Kong). Inter-region access using an EIP is considered as public network access. The IP address returned by any of the following commands is the public IP address.
    ping obs.ap-southeast-1.myhuaweicloud.com

    Or

    dig obs.ap-southeast-1.myhuaweicloud.com

    Or

    nslookup obs.ap-southeast-1.myhuaweicloud.com

    As shown above, if the returned IP address does not fall within the 100.x.x.x or 214.x.x.x network range, the OBS bucket is accessed over a public network.