Warning!

Make sure you are in root@pod01-srv01 during these steps.

Contiv Commands

Step 1 - Inspect VLAN configuration (POD01-srv1)

This command would help us determine which VLANs are configured and being use. This command becomes helpful in case someone needs to verify the VLANs that configured and are matching with APIC, plus the number of VLANs that are being used.

pod01-srv1
1
# This is the copy group: 1
netctl global inspect

[root@01-srv1 ~]# netctl global inspect
Inspecting global
{
  "Config": {
    "key": "global",
    "arpMode": "proxy",
    "fwdMode": "bridge",
    "name": "global",
    "networkInfraType": "aci",
    "pvtSubnet": "172.19.0.0/16",
    "vlans": "500-505",
    "vxlans": "1-10000"
  },
  "Oper": {
    "clusterMode": "docker",
    "numNetworks": 3,
    "vlansInUse": "500-502"
  }
}
     

Step 2 - Inspect Network configuration (POD01-srv1)

This command will show how the network is being configured. It is going to show the following information:

pod01-srv1
2
# This is the copy group: 2
netctl network inspect -t ContivTN01 ContivNet01

[root@01-srv1 ~]# netctl network inspect -t ContivTN01 ContivNet01
Inspeting network: ContivNet01 tenant: ContivTN01

{
  "Config": {
    "key": "ContivTN01:ContivNet01",
    "encap": "vlan",
    "gateway": "10.0.248.1",
    "networkName": "ContivTN01",
    "nwType": "data",
    "subnet": "10.0.248.0/29",
    "tenantName": "ContivTN01",
    "link-sets": {
      "EndpointGroups": {
        "ContivTN01:conapp": {
          "type": "endpointGroup",
          "key": "ContivTN01:conapp"
        },
        "ContivTN01:condb": {
          "type": "endpointGroup",
          "key": "ContivTN01:condb"
        }
      }
    },
    "links": {
      "Tenant": {
        "type": "tenant",
        "key": "ContivTN01"
      }
    }
  },
  "Oper": {
    "allocatedAddressesCount": 2,
    "allocatedIPAddresses": "10.0.248.1-10.0.248.3",
    "availableIPAddresses": "10.0.248.4-10.0.248.6, -",
    "endpoints": [
      {
        "containerID": "a3b623a60f055b3e1f795accc2668e26c7f325b8ed260c1eef4526ecc2b57f63",
        "containerName": "/app",
        "endpointGroupId": 2,
        "endpointGroupKey": "conapp:ContivTN01",
        "endpointID": "706db466919ef1bab60ba8c5b274ce7213ff21f35a00b3423bf02495bced2e9f",
        "homingHost": "pod01-srv2.ecatsrtpdmz.cisco.com",
        "ipAddress": [
          "10.0.248.2",
          ""
        ],
        "labels": "map[com.docker.swarm.id:af545079a88575bac495f5ceb27280b698c455e5814a493fa017eaa3806d6d97]",
        "macAddress": "02:02:0a:00:f8:02",
        "network": "ContivNet01.ContivTN01",
        "serviceName": "conapp"
      },
      {
        "containerID": "7406a3892ad4d476e40ea19e8777bf2de4f91bea75d248544cbd608f0ae62d4f",
        "containerName": "/db",
        "endpointGroupId": 1,
        "endpointGroupKey": "condb:ContivTN01",
        "endpointID": "ed3fdeac4cf9b2c4926643aa8abb1b361f74440edb8390e6b04d44b2640a7b5a",
        "homingHost": "pod01-srv2.ecatsrtpdmz.cisco.com",
        "ipAddress": [
          "10.0.248.3",
          ""
        ],
        "labels": "map[com.docker.swarm.id:8d5a69b5b4d1ef2f300afc03fa582c8629799393ef133f93fe07a21dd8ab69d8]",
        "macAddress": "02:02:0a:00:f8:03",
        "network": "ContivNet01.ContivTN01",
        "serviceName": "condb"
      }
    ],
    "numEndpoints": 2,
    "pktTag": 500
  }
}
     

Step 3 - Inspect EPG configuration (POD01-srv1)

This command would help us determine how the EPGs are configured and It is going to show the following information:

pod01-srv1
3
# This is the copy group: 3
netctl group inspect -t ContivTN01 conapp

[root@01-srv1 ~]# netctl group inspect -t ContivTN01 conapp
Inspeting endpointGroup: conapp tenant: ContivTN01
{
  "Config": {
    "key": "ContivTN01:conapp",
    "groupName": "conapp",
    "networkName": "ContivNet01",
    "tenantName": "ContivTN01",
    "link-sets": {
      "MatchRules": {
         "ContivTN01:app2db:1": {
          "type": "rule",
          "key": "ContivTN01:app2db:1"
        }
      }
    },
    "links": {
       "AppProfile": {
        "type": "appProfile",
        "key": "ContivTN01:APP-TN01"
      },
      "NetProfile": {},
       "Network": {
        "type": "network",
        "key": "ContivTN01:ContivNet01"
      },
      "Tenant": {
        "type": "tenant",
        "key": "ContivTN01"
      }
    }
  },

   "Oper": {
    "endpoints": [
      {
        "containerID": "a3b623a60f055b3e1f795accc2668e26c7f325b8ed260c1eef4526ecc2b57f63",
        "containerName": "/app",
        "endpointGroupId": 2,
        "endpointGroupKey": "conapp:ContivTN01",
        "endpointID": "706db466919ef1bab60ba8c5b274ce7213ff21f35a00b3423bf02495bced2e9f",
        "homingHost": "pod01-srv2.ecatsrtpdmz.cisco.com",
        "ipAddress": [
          "10.0.248.2",
          ""
        ],
        "labels": "map[com.docker.swarm.id:af545079a88575bac495f5ceb27280b698c455e5814a493fa017eaa3806d6d97]",
        "macAddress": "02:02:0a:00:f8:02",
        "network": "ContivNet01.ContivTN01",
        "serviceName": "conapp"
      }
    ],
    "numEndpoints": 1,
    "pktTag": 502
  }
}

     

Step 4 - Inspect End Point configuration (POD01-srv1)

This command would help us determine how the End Point is configured with the following information:

First, we need to query the endpointID

pod01-srv1
4
# This is the copy group: 4
netctl group inspect -t ContivTN01 conapp | grep endpointID

[root@01-srv1 ~]# netctl group inspect -t ContivTN01 conapp | grep endpointID

        "endpointID": "74de87dfb60e35c24f77d4ac292441b4f6ce8acb45d62764bd24bf1be870b63b",
     

Once we gathered the endpointID, in this particular example is "74de87dfb60e35c24f77d4ac292441b4f6ce8acb45d62764bd24bf1be870b63b".
You will need to use the following command netctl endpoint inspect with the endpointID from your container.


netctl endpoint inspect 74de87dfb60e35c24f77d4ac292441b4f6ce8acb45d62764bd24bf1be870b63b
     

netctl endpoint inspect 74de87dfb60e35c24f77d4ac292441b4f6ce8acb45d62764bd24bf1be870b63b

{
  "Oper": {
    "endpointGroupId": 2,
    "endpointGroupKey": "conapp:ContivTN01",
    "endpointID": "74de87dfb60e35c24f77d4ac292441b4f6ce8acb45d62764bd24bf1be870b63b",
    "homingHost": "pod01-srv2.ecatsrtpdmz.cisco.com",
    "ipAddress": [
      "10.0.248.2",
      ""
    ],
    "labels": "map[]",
    "macAddress": "02:02:0a:00:f8:da",
    "network": "ContivNet01.ContivTN01",
    "serviceName": "conapp",
    "virtualPort": "vvport1"
  }
}

     
© Copyright Cisco Systems 2017