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.

The ReadNics command returns the following elements:

  • Nics: Information about one or more NICs.

  • ResponseContext: Information about the context of the response.

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 NOT_SPECIFIED] \
  --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 FNIs > FNIs Attachment to Instances.

  • 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 FNIs > FNIs Attachment to Instances.

  • 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 FNIs > FNIs Attachment to Instances.

    • 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 FNIs > FNIs Attachment to Instances.

    • 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.