GCP - VPC peering to multiple nic interfaces

Hi all,

I wanted to test vyos on Google cloud platform with multiple nic.
I created 2 vyos instance :

  • Instance 1 - vyos1 → 2 interface (nic0 and nic1) with VPC-1 and VPC-2 subnets
  • Instance 2 - vyos2 → 1 interface (nic0) witch VPC-3 subnet
  • Then I do VPC peering between VPC-2 to VPC-3 and vice versa

Below is the diagram how :

The issue is :

  1. nic1 vyos1 unable to ping to nic0 vyos2 unless vyos1 nic0 vpc-1 peer to vyos2 nico vpc-3
  2. Then I changed vpc-3 to vpc-2 (which means vyos1 nic1 and vyos2 nic0 are in the same subnet VPC-2). This test failed as I believe that nic0 cannot communicate with other nic
  3. I try to follow Peering de rede VPC  |  Google Cloud to configure routing policy (Create VMs with multiple network interfaces  |  VPC  |  Google Cloud) but still unable to ping. I changed ip route add with table (PBR) and doing static route as below :

image

It seems static route to 10.0.1.5 not in routing table.

Please help.

Thanks

Hello @zakwan,

In this case, you need to try to define interface-route or set properly netmask for interfaces instead of /32

set protocols static interface-route 10.0.1.5/32 next-hop-interface eth1

Hi @Dmitry

Thanks for your response.

I have try static interface-route as per your suggestion but still unable to ping to each other (eth1 to eth1).

No issue if pinging eth0 to eth0.

Hi @Dmitry

Its solved now. I got help from a friend.
This is because of PBR issue (⚓ T439 local PBR support) which is solved in 1.3 Equuleus.

Because of I’m using vyOS 1.2.6-S1 crux, hence we added command on the script vyos-postconfig-bootup.script.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.