A route table consists of multiple routing policies that control the outbound traffic direction of subnets in the VPC. Each subnet can only be associated with one route table, while each route table can be associated with multiple subnets. You can create multiple route tables for subnets with different traffic routes.
There are two types of route tables: default and custom.
A route table controls traffic routes by using routing policies. A routing policy consists of the destination, next-hop type, and next hop.
172.16.1.1/32). The destination cannot be an IP range of the VPC where the route table resides, because the local route already allows private network interconnection in this VPC.
If you have deployed a TKE service in the VPC, the destination you configure in the routing policy of the VPC subnet cannot fall within the VPC CIDR block or contain the TKE IP range.
For example, if the VPC CIDR block is
184.108.40.206/16and the TKE CIDR block is
192.168.0.0/16, the destination IP range cannot fall within
220.127.116.11/16, or contain
192.168.0.0/16when you configure routing policy for a VPC subnet.
When there are multiple routing rules in a routing table, the following routing priority applies:
When a subnet is associated with a NAT Gateway, and the CVM in the subnet has a public IP (or EIP), the CVM accesses the Internet through the NAT Gateway by default (because the priority of the exact match route is higher than that of the public IP). However, you can set a routing policy to allow the CVM to access the Internet by using its public IP address. For details, see Adjusting the Priorities of NAT Gateways and EIPs.