Here’s how to add a new route in Google Cloud Platform.
gcloud compute routes create name-of-new-route \ --destination-range=200.20.0.0/15 \ --next-hop-gateway=default-internet-gateway \ --project=host-project \ --network="default" \ --priority=900 |
cloud engineer
by Ulysses
Here’s how to add a new route in Google Cloud Platform.
gcloud compute routes create name-of-new-route \ --destination-range=200.20.0.0/15 \ --next-hop-gateway=default-internet-gateway \ --project=host-project \ --network="default" \ --priority=900 |
gcloud compute routes create name-of-new-route \ --destination-range=200.20.0.0/15 \ --next-hop-gateway=default-internet-gateway \ --project=host-project \ --network="default" \ --priority=900
by Ulysses
I ran into an issue with Google Compute Engine TCP internal load balancer. The targets are unhealthy although all configs were correct installed. At one time the targets were working, but somehow they became unhealthy. In the end, 3 things needed to be checked.
You will need to change the server’s IP from DHCP to static to add ILB VIP.
by Ulysses
Here’s how to add a route in Windows. Open CMD as Administrator.
route add 10.10.10.10 mask 255.255.255.0 10.10.10.254 |
route add 10.10.10.10 mask 255.255.255.0 10.10.10.254
To make it persistent, add -p.
route add 10.10.10.10 mask 255.255.255.0 10.10.10.254 |
route add 10.10.10.10 mask 255.255.255.0 10.10.10.254
To display. Specifies IP 4 only.
route print -4 |
route print -4
by Ulysses
Test if the GCP Load Balancer is working by sending a curl command from the backend VM.
Assume the load balancer IP address is 10.1.2.99, and the VM is called vm-a1.
curl http://10.1.2.99 |
curl http://10.1.2.99
The end result is …
Page served from: vm-a1 |
Page served from: vm-a1
Make sure there’s an entry in the local table that matches the IP of the load balancer.
ip route show table local | grep 10.1.2.99 |
ip route show table local | grep 10.1.2.99
If not, add it.
ip route add to local 10.1.2.99/32 dev eth0 proto 66 |
ip route add to local 10.1.2.99/32 dev eth0 proto 66
by Ulysses
Here’s how to enable secondary private IPs for AWS EC2 instances.
ifcfg-eth0:0
NM_CONTROLLED="no" DEVICE="eth0:0" ONBOOT="yes" BOOTPROTO="static" IPADDR="10.0.0.14" NETMASK="255.255.255.255" |
NM_CONTROLLED="no" DEVICE="eth0:0" ONBOOT="yes" BOOTPROTO="static" IPADDR="10.0.0.14" NETMASK="255.255.255.255"
ifcfg-eth0:1
NM_CONTROLLED="no" DEVICE="eth0:1" ONBOOT="yes" BOOTPROTO="static" IPADDR="10.0.0.15" NETMASK="255.255.255.255" |
NM_CONTROLLED="no" DEVICE="eth0:1" ONBOOT="yes" BOOTPROTO="static" IPADDR="10.0.0.15" NETMASK="255.255.255.255"