0
0
GCPcloud~10 mins

Routes and routing in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a custom route in GCP that directs traffic to a specific instance.

GCP
gcloud compute routes create my-route --network default --destination-range [1] --next-hop-instance my-instance --next-hop-instance-zone us-central1-a
Drag options to blanks, or click blank then click option'
A10.0.0.0/24
B192.168.1.0/16
C172.16.0.0/12
D0.0.0.0/0
Attempts:
3 left
💡 Hint
Common Mistakes
Using a destination range that is too narrow for the intended traffic.
Forgetting to specify the next hop instance.
2fill in blank
medium

Complete the code to list all routes in the default network.

GCP
gcloud compute routes list --filter='network:[1]'
Drag options to blanks, or click blank then click option'
Acustom-network
Bdefault
Cglobal
Dprivate-network
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect network names that do not exist.
Omitting the filter and getting too many results.
3fill in blank
hard

Fix the error in the command to delete a route named 'old-route'.

GCP
gcloud compute routes [1] old-route
Drag options to blanks, or click blank then click option'
Aremove
Bdestroy
Cdelete
Ddel
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'remove' or 'del' which are not valid gcloud subcommands.
Typo in the subcommand causing command failure.
4fill in blank
hard

Fill both blanks to create a route that directs traffic to an IP address as the next hop.

GCP
gcloud compute routes create my-route --network [1] --destination-range 10.0.0.0/24 --next-hop-[2] 192.168.1.1
Drag options to blanks, or click blank then click option'
Adefault
Binstance
Caddress
Dgateway
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'instance' as next hop when an IP address is required.
Using incorrect network names.
5fill in blank
hard

Fill all three blanks to create a route with a priority and a next hop gateway.

GCP
gcloud compute routes create my-route --network [1] --destination-range [2] --priority [3] --next-hop-gateway default-internet-gateway
Drag options to blanks, or click blank then click option'
Acustom-network
Bdefault
C0.0.0.0/0
D1000
Attempts:
3 left
💡 Hint
Common Mistakes
Using an invalid destination range.
Omitting the priority or using a non-numeric value.