Skip to content

VIF and ENI compared

The two acronyms are easy to confuse and describe entirely different things. An ENI is a network card for an EC2 instance. A VIF is closer to a virtual cable between an on-premises network and AWS.

  • A virtual network card for resources inside a VPC.
  • Lives in one subnet, and therefore in one Availability Zone.
  • Operates at the instance level.
  • Carries private IPv4 addresses, optionally a public address and Elastic IPs, IPv6 addresses, a MAC address, security groups and a source/destination check flag.
  • Can be detached from one instance and attached to another, which is the basis of a cheap failover pattern.

Used for attaching multiple interfaces to an instance, building management networks, running network and security appliances, and giving an instance several IP addresses.

  • A configuration object on a Direct Connect connection — a VLAN with a BGP session.
  • Operates at the connection level, between AWS and your network.
  • Carries a VLAN tag, a BGP ASN and BGP peering addresses.
  • Attaches to a virtual private gateway, or to a Direct Connect gateway.

Used for private connectivity to VPCs (private VIF), access to AWS public endpoints (public VIF), and connection to a transit gateway (transit VIF).

On-premises → VIF → Direct Connect → VPC → ENI → EC2 instance

The VIF is how traffic enters AWS. The ENI is where it arrives.