Getting Information About Your NICs

You can get information about your network interface cards (NICs).

Information about your NICs is also available from within the associated virtual machines (VMs) themselves. For more information, see Accessing the Metadata and User Data of a VM.

Getting Information About Your NICs Using Cockpit v2

See the NICs dashboard.

Getting Information About Your NICs Using OSC CLI

The ReadNics command lists one or more network interface cards (NICs).
A NIC is a virtual network interface that you can attach to a virtual machine (VM) in a Net.

Request sample
$ osc-cli api ReadNics --profile "default" \
    --Filters '{
        "NicIds": ["eni-12345678"],
      }'
Request sample
$ osc-cli api ReadNics --profile "default" \
    --Filters '{
        "LinkNicVmIds": ["i-12345678"],
      }'

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • Filters: (optional) One or more filters.

    • Descriptions: (optional) The descriptions of the NICs.

    • IsSourceDestCheck: (optional) Whether the source/destination checking is enabled (true) or disabled (false).

    • LinkNicDeleteOnVmDeletion: (optional) Whether the NICs are deleted when the VMs they are attached to are terminated.

    • LinkNicDeviceNumbers: (optional) The device numbers the NICs are attached to.

    • LinkNicLinkNicIds: (optional) The attachment IDs of the NICs.

    • LinkNicStates: (optional) The states of the attachments.

    • LinkNicVmAccountIds: (optional) The account IDs of the owners of the VMs the NICs are attached to.

    • LinkNicVmIds: (optional) The IDs of the VMs the NICs are attached to.

    • LinkPublicIpAccountIds: (optional) The account IDs of the owners of the public IPs associated with the NICs.

    • LinkPublicIpLinkPublicIpIds: (optional) The association IDs returned when the public IPs were associated with the NICs.

    • LinkPublicIpPublicDnsNames: (optional) The public DNS names associated with the public IPs.

    • LinkPublicIpPublicIpIds: (optional) The allocation IDs returned when the public IPs were allocated to their accounts.

    • LinkPublicIpPublicIps: (optional) The public IPs associated with the NICs.

    • MacAddresses: (optional) The Media Access Control (MAC) addresses of the NICs.

    • NetIds: (optional) The IDs of the Nets where the NICs are located.

    • NicIds: (optional) The IDs of the NICs.

    • PrivateDnsNames: (optional) The private DNS names associated with the primary private IPs.

    • PrivateIpsLinkPublicIpAccountIds: (optional) The account IDs of the owner of the public IPs associated with the private IPs.

    • PrivateIpsLinkPublicIpPublicIps: (optional) The public IPs associated with the private IPs.

    • PrivateIpsPrimaryIp: (optional) Whether the private IP is the primary IP associated with the NIC.

    • PrivateIpsPrivateIps: (optional) The private IPs of the NICs.

    • SecurityGroupIds: (optional) The IDs of the security groups associated with the NICs.

    • SecurityGroupNames: (optional) The names of the security groups associated with the NICs.

    • States: (optional) The states of the NICs.

    • SubnetIds: (optional) The IDs of the Subnets for the NICs.

    • SubregionNames: (optional) The Subregions where the NICs are located.

    • TagKeys: (optional) The keys of the tags associated with the NICs.

    • TagValues: (optional) The values of the tags associated with the NICs.

    • Tags: (optional) The key/value combination of the tags associated with the NICs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

The ReadNics command returns the following elements:

  • Nics: Information about one or more NICs.

    • AccountId: The account ID of the owner of the NIC.

    • Description: The description of the NIC.

    • IsSourceDestChecked: (Net only) If true, the source/destination check is enabled. If false, it is disabled.

    • LinkNic: Information about the NIC attachment.

      • DeleteOnVmDeletion: If true, the NIC is deleted when the VM is terminated.

      • DeviceNumber: The device index for the NIC attachment (between 1 and 7, both included).

      • LinkNicId: The ID of the NIC to attach.

      • State: The state of the attachment (attaching | attached | detaching | detached).

      • VmAccountId: The account ID of the owner of the VM.

      • VmId: The ID of the VM.

    • LinkPublicIp: Information about the public IP association.

      • LinkPublicIpId: (Required in a Net) The ID representing the association of the public IP with the VM or the NIC.

      • PublicDnsName: The name of the public DNS.

      • PublicIp: The public IP associated with the NIC.

      • PublicIpAccountId: The account ID of the owner of the public IP.

      • PublicIpId: The allocation ID of the public IP.

    • MacAddress: The Media Access Control (MAC) address of the NIC.

    • NetId: The ID of the Net for the NIC.

    • NicId: The ID of the NIC.

    • PrivateDnsName: The name of the private DNS.

    • PrivateIps: The private IPs of the NIC.

      • IsPrimary: If true, the IP is the primary private IP of the NIC.

      • LinkPublicIp: Information about the public IP association.

        • LinkPublicIpId: (Required in a Net) The ID representing the association of the public IP with the VM or the NIC.

        • PublicDnsName: The name of the public DNS.

        • PublicIp: The public IP associated with the NIC.

        • PublicIpAccountId: The account ID of the owner of the public IP.

        • PublicIpId: The allocation ID of the public IP.

      • PrivateDnsName: The name of the private DNS.

      • PrivateIp: The private IP of the NIC.

    • SecurityGroups: One or more IDs of security groups for the NIC.

      • SecurityGroupId: The ID of the security group.

      • SecurityGroupName: The name of the security group.

    • State: The state of the NIC (available | attaching | in-use | detaching).

    • SubnetId: The ID of the Subnet.

    • SubregionName: The Subregion in which the NIC is located.

    • Tags: One or more tags associated with the NIC.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Nics": [
    {
      "SubregionName": "eu-west-2a",
      "SubnetId": "subnet-12345678",
      "State": "in-use",
      "LinkNic": {
        "VmId": "i-12345678",
        "LinkNicId": "eni-attach-12345678",
        "VmAccountId": "123456789012",
        "DeleteOnVmDeletion": false,
        "DeviceNumber": 0,
        "State": "attached"
      },
      "IsSourceDestChecked": true,
      "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
      "Tags": [],
      "Description": "Primary network interface",
      "AccountId": "123456789012",
      "SecurityGroups": [
        {
          "SecurityGroupName": "security-group-example",
          "SecurityGroupId": "sg-12345678"
        }
      ],
      "MacAddress": "A1:B2:C3:D4:E5:F6",
      "NetId": "vpc-12345678",
      "NicId": "eni-12345678",
      "PrivateIps": [
        {
          "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
          "PrivateIp": "10.0.0.4",
          "IsPrimary": true
        }
      ]
    }
  ]
}

Getting Information About Your FNIs Using AWS CLI

To get information about your FNIs, use the describe-network-interfaces command following this syntax:

Request sample
$ aws ec2 describe-network-interfaces \
  --profile YOUR_PROFILE \
  --network-interface-ids eni-12345678 \
  --filters Name=X,Values=Y \
  --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) network-interface-ids: The ID of one or more FNIs.

  • (optional) filters: One or more filters, in the "Name=X,Values=Y" format.

    You can specify several values for a same filter using the "Name=X,Values=Y, Z" format.

    The following filters are available:

    • addresses.association.owner-id: The account ID of the owner of the IPs associated with the FNI.

    • addresses.association.public-ip: The association ID returned when the FNI was associated with an External IP (EIP). addresses.primary: Whether the private IP is the primary IP associated with the FNI.

    • addresses.private-ip-address: The private IPs associated with the FNI.

    • association.allocation-id: The allocation ID returned when you allocated the EIP to your account.

    • association.association-id: The association ID returned when the FNI was associated with an EIP.

    • association.ip-owner-id: The account ID of the owner of the EIP associated with the FNI.

      As you can only associate EIPs belonging to your account to your FNIs, this filter is always your account ID.

    • association.public-dns-name: The public DNS name associated with the EIP.

    • association.public-ip: The EIP associated with the FNI.

    • attachment.attach.time: The time at which the FNI was attached to an instance.

    • attachment.attachment-id: The attachment ID of the FNI.

    • attachment.delete-on-termination: Whether the FNI is deleted (true) or detached (false) when the instance it is attached to is terminated.

    • attachment.device-index: The device index used for the FNI.

    • attachment.instance-id: The ID of the instance the FNI is attached to.

    • attachment.instance-owner-id: The account ID of the owner of the instance the FNI is attached to.

      As you can only attach your FNIs to instances belonging to you, this filter is always your account ID.

  • attachment.status: The state of the attachment. For more information, see About NICs > NICs Attachment to VMs.

  • availability-zone: The Availability Zone (AZ) where the FNI is located.

  • description: The description of the FNI.

  • group-id: The ID of a security group associated with the FNI.

  • group-name: The name of a security group associated with the FNI.

  • mac-address: The Media Access Control (MAC) address of the FNI.

  • network-interface-id: The ID of the FNI.

  • owner-id: The account ID of the FNI owner.

As you cannot share FNIs with other accounts, this filter is always your account ID.

  • private-dns-name: The private DNS name associated with the primary private IP.

  • private-ip-address: The primary private IP of the FNI.

  • source-dest-check: Whether the source/destination checking is enabled (true) or disabled (false).

  • status: The state of the FNI. For more information, see About NICs > NICs Attachment to VMs.

  • subnet-id: The ID of the subnet in where the FNI is located.

  • vpc-id: The ID of the VPC in where the FNI is located.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The describe-network-interfaces command returns the following elements:

  • NetworkInterfaces: Information about one or more FNIs. This element contains the following information:

    • Association: Information about the association between the FNI and an EIP. This element contains the following information:

      • AllocationId: The allocation ID returned when you allocated the EIP to your account.

      • AssociationId: The association ID returned when the FNI was associated with an EIP.

      • IpOwnerId: The account ID of the owner of the EIP associated with the FNI.

      • PublicDnsName: The public DNS name associated with the EIP.

      • PublicIp: The EIP associated with the FNI.

    • Attachment: Information about the FNI attachment. This element contains the following information:

      • AttachTime: The time at which the FNI was attached to an instance.

      • AttachmentId: The attachment ID of the FNI.

      • DeleteOnTermination: If true, the FNI is deleted when the instance is terminated. If false, the FNI is only detached.

      • DeviceIndex: The device index used for the FNI attachment.

      • InstanceId: The ID of the instance the FNI is attached to.

      • InstanceOwnerId: The account ID of the owner of the instance the FNI is attached to.

      • Status: The state of the attachment. For more information, see About NICs > NICs Attachment to VMs.

    • AvailabilityZone: The Availability Zone (AZ) where the FNI is located.

    • Description: The description of the FNI.

    • Groups: Information about one or more security groups associated with the FNI. This element contains the following information:

      • GroupName: The name of a security group associated with the FNI.

      • GroupId: The ID of a security group associated with the FNI.

    • MacAddress: The Media Access Control (MAC) address of the FNI.

    • NetworkInterfaceId: The ID of the FNI.

    • OwnerId: The account ID of the FNI owner.

    • PrivateDnsName: The private DNS name associated with the primary private IP of the FNI.

    • PrivateIpAddress: The primary private IP of the FNI.

    • PrivateIpAddresses: Information about the EIP and the private IPs assigned to the FNI. This element contains the following information:

      • Association: Information about the association of the FNI with an EIP. This element contains the following information:

        • PublicIp: The EIP associated with the FNI.

        • AssociationId: The association ID returned when the FNI was associated with an EIP.

        • PublicDnsName: The public DNS name associated with the EIP.

        • AllocationId: The allocation ID returned when you allocated the EIP to your account.

        • IpOwnerId: The account ID of the owner of the EIP associated with the FNI.

      • Primary: If true, the following private IP is the primary one. If false, it is a secondary one.

      • PrivateDnsName: The private DNS name associated with the primary private IP of the FNI.

      • PrivateIpAddress: A private IP assigned to the FNI.

    • SourceDestCheck: If true, the traffic to or from the instance is validated. If false, it is not.

    • Status: The state of the FNI. For more information, see About NICs > NICs Attachment to VMs.

    • SubnetId: The ID of the subnet where the FNI is located.

    • TagSet: One or more tags associated with the FNI.

    • VpcId: The ID of the VPC where the FNI is located.

Result sample
{
  "NetworkInterfaces": [
      {
      "Association": {
        "AllocationId": "eipalloc-06e13163",
              "AssociationId": "eipassoc-87654321",
              "IpOwnerId": "123456789000",
              "PublicDnsName": "ows-111-1-1-1.eu-west-2.compute.outscale.com",
              "PublicIp": "111.1.1.1"
          },
          "Attachment": {
              "AttachTime": "2016-08-24T08:27:33.000Z",
              "AttachmentId": "eni-attach-12345678",
              "DeleteOnTermination": false,
              "DeviceIndex": 1,
              "InstanceId": "i-12345678",
              "InstanceOwnerId": "123456789000",
              "Status": "attached"
          },
      "AvailabilityZone": "eu-west-2a",
          "Description": "my-FNI",
          "Groups": [
              {
                  "GroupName": "SG1",
                  "GroupId": "sg-12345678"
              }
          ],
          "MacAddress": "02:2f:8f:b0:cf:75",
          "NetworkInterfaceId": "eni-12345678",
          "OwnerId": "123456789000",
          "PrivateDnsName": "ip-10-0-1-17.eu-west-2.compute.internal",
      "PrivateIpAddress": "10.0.1.17",
          "PrivateIpAddresses": [
              {
                  "Association": {
            "AllocationId": "eipalloc-06e13163",
                      "AssociationId": "eipassoc-87654321",
                      "IpOwnerId": "123456789000",
                      "PublicDnsName": "ows-111-1-1-1.eu-west-2.compute.outscale.com",
                      "PublicIp": "111.1.1.1"
                  },
          "Primary": true,
                  "PrivateDnsName": "ip-10-0-1-17.eu-west-2.compute.internal",
          "PrivateIpAddress": "10.0.1.17"
              }
          ],
          "SourceDestCheck": true,
          "Status": "in-use",
          "SubnetId": "subnet-12345678",
          "TagSet": [],
      "VpcId": "vpc-12345678"
       }
   ]
}

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.