It is a common scenario in large servers to have more than one NIC for purposes demanded by the software to function properly, or for networking reasons. GCP allows a maximum of eight NICs (depending on the instance type) to be attached to an instance with nic0
being the default NIC to which GCP's DHCP server sends a default route and nic1
to nic7
being optional.
In this recipe, we'll create an instance with two NICs with each of the NICs attached to a different network. One network would be a management network to manage the instance and another network, a data network, used to serve data to the public domain.
The following are the initial setup verifications and network creation to be carried out before the recipe can be executed:
- Create or select a GCP project.
- Enable billing and enable the default APIs (some APIs such as BigQuery, storage, monitoring, and a few others are enabled automatically).
- We'll create the management...