public sealed class NetworkInterface : IMessage<NetworkInterface>, IEquatable<NetworkInterface>, IDeepCloneable<NetworkInterface>, IBufferMessage, IMessage
Reference documentation and code samples for the Backup and DR Service v1 API class NetworkInterface.
A network interface resource attached to an instance.
s
public RepeatedField<AccessConfig> AccessConfigs { get; }
Optional. An array of configurations for this interface. Currently, only
one access config,ONE_TO_ONE_NAT is supported. If there are no
accessConfigs specified, then this instance will have
no external internet access.
Optional. An IPv4 internal IP address to assign to the instance for this
network interface. If not specified by the user, an unused internal IP is
assigned by the system.
public RepeatedField<AccessConfig> Ipv6AccessConfigs { get; }
Optional. An array of IPv6 access configurations for this interface.
Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
is no ipv6AccessConfig specified, then this instance will
have no external IPv6 Internet access.
public NetworkInterface.Types.Ipv6AccessType Ipv6AccessType { get; set; }
Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
IP can be accessed from the Internet. This field is always inherited from
its subnetwork.
Optional. An IPv6 internal network address for this network interface. To
use a static internal IP address, it must be unused and in the same region
as the instance's zone. If not specified, Google Cloud will automatically
assign an internal IPv6 address from the instance's subnetwork.
Optional. The URL of the network attachment that this interface should
connect to in the following format:
projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
Optional. The networking queue count that's specified by users for the
network interface. Both Rx and Tx queues will be set to this number. It'll
be empty if not specified by the users.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eNetworkInterface\u003c/code\u003e class is part of the Backup and DR Service v1 API, representing a network interface resource attached to an instance, implementing interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class allows configuration of properties such as \u003ccode\u003eAccessConfigs\u003c/code\u003e, \u003ccode\u003eAliasIpRanges\u003c/code\u003e, IPv4 and IPv6 addresses, network and subnetwork URLs, and settings for the type of network interface and networking queues, with many properties being optional.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eNetworkInterface\u003c/code\u003e class offers constructors for creating instances, including a copy constructor, and also manages boolean properties to check if specific fields are set, such as \u003ccode\u003eHasIpAddress\u003c/code\u003e and \u003ccode\u003eHasNetwork\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt also handles IPv6 related configurations including \u003ccode\u003eIpv6AccessType\u003c/code\u003e, \u003ccode\u003eIpv6AccessConfigs\u003c/code\u003e, and \u003ccode\u003eInternalIpv6PrefixLength\u003c/code\u003e, giving the ability to set IPV6 configurations for an instance.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this class is 2.1.0, with previous versions being documented including 2.0.0, 1.2.0, 1.1.0, and 1.0.0-beta02.\u003c/p\u003e\n"]]],[],null,["# Backup and DR Service v1 API - Class NetworkInterface (2.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.NetworkInterface)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/2.1.0/Google.Cloud.BackupDR.V1.NetworkInterface)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/2.0.0/Google.Cloud.BackupDR.V1.NetworkInterface)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/1.2.0/Google.Cloud.BackupDR.V1.NetworkInterface)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/1.1.0/Google.Cloud.BackupDR.V1.NetworkInterface)\n- [1.0.0-beta02](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/1.0.0-beta02/Google.Cloud.BackupDR.V1.NetworkInterface) \n\n public sealed class NetworkInterface : IMessage\u003cNetworkInterface\u003e, IEquatable\u003cNetworkInterface\u003e, IDeepCloneable\u003cNetworkInterface\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Backup and DR Service v1 API class NetworkInterface.\n\nA network interface resource attached to an instance.\ns \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e NetworkInterface \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[NetworkInterface](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.NetworkInterface), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[NetworkInterface](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.NetworkInterface), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[NetworkInterface](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1.NetworkInterface), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.BackupDR.V1](/dotnet/docs/reference/Google.Cloud.BackupDR.V1/latest/Google.Cloud.BackupDR.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.BackupDR.V1.dll\n\nConstructors\n------------\n\n### NetworkInterface()\n\n public NetworkInterface()\n\n### NetworkInterface(NetworkInterface)\n\n public NetworkInterface(NetworkInterface other)\n\nProperties\n----------\n\n### AccessConfigs\n\n public RepeatedField\u003cAccessConfig\u003e AccessConfigs { get; }\n\nOptional. An array of configurations for this interface. Currently, only\none access config,ONE_TO_ONE_NAT is supported. If there are no\naccessConfigs specified, then this instance will have\nno external internet access.\n\n### AliasIpRanges\n\n public RepeatedField\u003cAliasIpRange\u003e AliasIpRanges { get; }\n\nOptional. An array of alias IP ranges for this network interface.\nYou can only specify this field for network interfaces in VPC networks.\n\n### HasInternalIpv6PrefixLength\n\n public bool HasInternalIpv6PrefixLength { get; }\n\nGets whether the \"internal_ipv6_prefix_length\" field is set\n\n### HasIpAddress\n\n public bool HasIpAddress { get; }\n\nGets whether the \"ip_address\" field is set\n\n### HasIpv6AccessType\n\n public bool HasIpv6AccessType { get; }\n\nGets whether the \"ipv6_access_type\" field is set\n\n### HasIpv6Address\n\n public bool HasIpv6Address { get; }\n\nGets whether the \"ipv6_address\" field is set\n\n### HasName\n\n public bool HasName { get; }\n\nGets whether the \"name\" field is set\n\n### HasNetwork\n\n public bool HasNetwork { get; }\n\nGets whether the \"network\" field is set\n\n### HasNetworkAttachment\n\n public bool HasNetworkAttachment { get; }\n\nGets whether the \"network_attachment\" field is set\n\n### HasNicType\n\n public bool HasNicType { get; }\n\nGets whether the \"nic_type\" field is set\n\n### HasQueueCount\n\n public bool HasQueueCount { get; }\n\nGets whether the \"queue_count\" field is set\n\n### HasStackType\n\n public bool HasStackType { get; }\n\nGets whether the \"stack_type\" field is set\n\n### HasSubnetwork\n\n public bool HasSubnetwork { get; }\n\nGets whether the \"subnetwork\" field is set\n\n### InternalIpv6PrefixLength\n\n public int InternalIpv6PrefixLength { get; set; }\n\nOptional. The prefix length of the primary internal IPv6 range.\n\n### IpAddress\n\n public string IpAddress { get; set; }\n\nOptional. An IPv4 internal IP address to assign to the instance for this\nnetwork interface. If not specified by the user, an unused internal IP is\nassigned by the system.\n\n### Ipv6AccessConfigs\n\n public RepeatedField\u003cAccessConfig\u003e Ipv6AccessConfigs { get; }\n\nOptional. An array of IPv6 access configurations for this interface.\nCurrently, only one IPv6 access config, DIRECT_IPV6, is supported. If there\nis no ipv6AccessConfig specified, then this instance will\nhave no external IPv6 Internet access.\n\n### Ipv6AccessType\n\n public NetworkInterface.Types.Ipv6AccessType Ipv6AccessType { get; set; }\n\nOptional. \\[Output Only\\] One of EXTERNAL, INTERNAL to indicate whether the\nIP can be accessed from the Internet. This field is always inherited from\nits subnetwork.\n\n### Ipv6Address\n\n public string Ipv6Address { get; set; }\n\nOptional. An IPv6 internal network address for this network interface. To\nuse a static internal IP address, it must be unused and in the same region\nas the instance's zone. If not specified, Google Cloud will automatically\nassign an internal IPv6 address from the instance's subnetwork.\n\n### Name\n\n public string Name { get; set; }\n\nOutput only. \\[Output Only\\] The name of the network interface, which is\ngenerated by the server.\n\n### Network\n\n public string Network { get; set; }\n\nOptional. URL of the VPC network resource for this instance.\n\n### NetworkAttachment\n\n public string NetworkAttachment { get; set; }\n\nOptional. The URL of the network attachment that this interface should\nconnect to in the following format:\nprojects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.\n\n### NicType\n\n public NetworkInterface.Types.NicType NicType { get; set; }\n\nOptional. The type of vNIC to be used on this interface. This may be gVNIC\nor VirtioNet.\n\n### QueueCount\n\n public int QueueCount { get; set; }\n\nOptional. The networking queue count that's specified by users for the\nnetwork interface. Both Rx and Tx queues will be set to this number. It'll\nbe empty if not specified by the users.\n\n### StackType\n\n public NetworkInterface.Types.StackType StackType { get; set; }\n\nThe stack type for this network interface.\n\n### Subnetwork\n\n public string Subnetwork { get; set; }\n\nOptional. The URL of the Subnetwork resource for this instance."]]