Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

VertexAI notebook does not obtain Shared VPC IP

Hello, 

when I create a new VertexAI notebook I can select:

networking:  Shared network (from host project: XXXC) 

GCP then asks me the network and the subnet.
In the subnet dropdown the tooltip reads:

Assigns the notebook an IPv4 address from the subnetwork's range. Notebooks in different subnetworks can communicate with each other using their internal IPs as long as they belong to the same network.

But this does not seem to work at all ?

Once I create the notebook I can run ifconfig in the terminal and there it's clear that the notebook never got an IP from the subnet I selected above.

Anyone knows how I can use this feature?
Thanks!

0 3 837
3 REPLIES 3

Hey @dgnemo 

Can you confirm whether you are using a Managed or User-Managed Notebook? 

If you are using a Managed notebook, one of the IPs you see in the terminal should be from the 
service producer network. This is a Google-managed project where your notebook/GCE is provisioned. 

This diagram is a good reference.

From that article: "... A resource in the service producer network is similar to other resources in your VPC network. For example, it's reachable through internal IP addresses by other resources in your VPC network. You can also create firewall rules in your VPC network to control access to the service producer's network..."

Your SharedVPC should have a VPC network peering connection to the producer project. This connection includes a destination CIDR range with routes for the resources to communicate. 

Can you share more colour about the blocker(s) you are trying to solve other than the specific IP assigned to the notebook? If you are using a Google-managed notebook, maybe the way to go for your case is a user-managed notebook considering all trade-offs.

I hope this helps.

JC 

Sorry for the double posting. we can continue the conversation in the other thread if it's ok.

Anyway, yes, I am using Managed Notebooks.

The issue I am trying to solve is to allow the notebook to access internet, without exposing it publicly with an external IP address.

To achieve that, I was hoping that the netbook could use the Cloud NAT available in the Shared VPC.

Unfortunately I could not find a way to make it work.

1. Should the notebook also receive an IP address in the VPC subnet range (like mentioned by the GCP UI ?)
2. If not, and the only IP assigned to the notebook is the IP in the Google Managed Network, is it possible to configure the network such that the notebook can reach internet through the VPC Cloud Nat ?

Thanks a lot!

Oh, I see. In case anyone else is interested in this thread please follow the conversation here

https://www.googlecloudcommunity.com/gc/Infrastructure-Compute-Storage/Help-understanding-Shared-VPC...