Power Systems Virtual Server on IBM Cloud(AIX)에서 VLAN이 올바르게 구성되었는지 확인

소개



Power Systems Virtual Server on IBM Cloud(AIX)에서 네트워크가 연결되지 않는 문제점에 직면한 경우를 참조하십시오.

필요한 정보 얻기



해당 지역에 ibmcloud 명령으로 로그인



달라스라면 us-south , 워싱턴이라면 us-east 와 같이 지정하여 로그인합니다.
export REGION="us-east"
echo $REGION
ibmcloud login -r $REGION

계정 ID 얻기



다음 명령 또는 htps : // c ぉ d. 이 bm. 코 m/아코응 t/세친 gs에서 얻을 수 있습니다.
export TENANT_ID=`ibmcloud account show | grep ID | awk '{print $3}'`
echo $TENANT_ID

Power Systems Virtual Server 서비스 인스턴스 정보



다음 명령 또는 h tps : // c ぉ d. 이 bm. 코 m / 레소 r s에서 얻을 수 있습니다.
export SERVICE_INSTANCE="khayama-power"
echo $SERVICE_INSTANCE
export CRN=`ibmcloud resource service-instance $SERVICE_INSTANCE | grep crn | awk '{print $2}'`
echo $CRN
export GUID=`ibmcloud resource service-instance $SERVICE_INSTANCE | grep GUID | awk '{print $2}'`
echo $GUID



IAM 액세스 토큰 획득



IBM Cloud API 액세스를 인증하는 데 필요합니다.
export ACCESS_TOKEN=`ibmcloud iam oauth-tokens | head -n 1 | awk '{print $4}'`
echo $ACCESS_TOKEN

cloudInstanceId 얻기



Power Systems Virtual Server 정보를 API를 통해 검색하는 데 필요합니다.
export CLOUDINSTANCE_ID=` \
curl -X GET \
"https://$REGION.power-iaas.cloud.ibm.com/pcloud/v1/tenants/$TENANT_ID" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "CRN: $CRN" \
-H 'Content-Type: application/json' \
| jq -r '.cloudInstances | .[] | select (.name=="'$GUID'") | .cloudInstanceID' \
`
echo $CLOUDINSTANCE_ID

VLAN ID 확인



Power Systems Virtual Server 서비스 정보



다음 명령을 사용하여 Power Systems Virtual Server 네트워크에 할당된 VLAN ID를 확인할 수 있습니다.
curl -X GET \
"https://$REGION.power-iaas.cloud.ibm.com/pcloud/v1/cloud-instances/$CLOUDINSTANCE_ID/networks" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "CRN: $CRN" \
-H 'Content-Type: application/json' \
| jq .

result.json
{
  "networks": [
    {
      "href": "/pcloud/v1/cloud-instances/59ebd87b4f0440188eb1e1e6b4e1bdd4/networks/3018e801-aedc-49ed-9f8c-a36aba02c963",
      "name": "public-192_168_3_192-28-VLAN_2028",
      "networkID": "3018e801-aedc-49ed-9f8c-a36aba02c963",
      "type": "pub-vlan",
      "vlanID": 2028
    },
    {
      "href": "/pcloud/v1/cloud-instances/59ebd87b4f0440188eb1e1e6b4e1bdd4/networks/5e7ee5c5-725c-40f8-a5f9-313dfa175dc4",
      "name": "khayama-subnet",
      "networkID": "5e7ee5c5-725c-40f8-a5f9-313dfa175dc4",
      "type": "vlan",
      "vlanID": 333
    }
  ]
}

AIX OS 내부 정보



다음 명령을 사용하여 AIX 인터페이스 디바이스에 할당된 VLAN ID를 볼 수 있습니다.

check_vlan.sh
*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 7.2!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************

# entstat -d ent0 | grep VLAN
Invalid VLAN ID Packets: 0
Port VLAN ID:  2028
VLAN Tag IDs:  None

# entstat -d ent1 | grep VLAN
Invalid VLAN ID Packets: 0
Port VLAN ID:   333
VLAN Tag IDs:  None

# entstat -d ent2 | grep VLAN
Invalid VLAN ID Packets: 0
Port VLAN ID:  4094
VLAN Tag IDs:  None

참고


  • Power Cloud API - IBM Cloud API Docs
  • 좋은 웹페이지 즐겨찾기