Use Windows route

Source: Internet
Author: User

Add route

Route-P add [target] [mask <network mask>] [gateway] [metric <metric value>] [If <interface>].
The following table describes the parameters of the route-P add command.

Parameter description
The Network target of the route. The target can be an IP address or subnet prefix (also known as a network address or network identifier) (where the host bit with the prefix is set to 0), the IP address of the host route, or 0.0.0.0 (default route ).
The mask specifies the subnet mask associated with the network target. The subnet mask can be the corresponding subnet mask of the IP address or subnet prefix, 255.255.255.255 (host route), or 0.0.0.0 (default route ). If the mask is omitted, the subnet mask 255.255.255.255 is used. Because the relationship between the target and the subnet mask in the route is defined, the target cannot be more specific than its corresponding subnet mask. In other words, if the bit in the subnet mask is 0, the corresponding bit in the target cannot be set to 1.
The gateway specifies the IP address of the previous or next hop to access the address set defined by the Network destination and subnet mask. For a local connection subnet route, the gateway address is the IP address assigned to the interface connected to the subnet. For remote routing (which can be used by one or more routers), the gateway address is the IP address that can be directly accessed to the adjacent router.
Metric specifies the integer cost measurement value (from 1 to 9999) of the route, which is used to select between multiple routes in the route table (these routes are closest to matching the destination address of the data packet to be forwarded. The route with the lowest metric value will be selected. The measurement value can reflect the number of hops, path speed, path reliability, Path Throughput, or management attributes.
If indicates the interface index of the interface used to access the target. For a list of interfaces and their corresponding interface indexes, use the routing print command display function. You can use decimal or hexadecimal values for interface indexes. The hexadecimal number starts with 0x. If the parameter is omitted, the interface is determined by the gateway address.

Metric metric Value
Measurement value, that is, priority. If there are multiple entries to the same destination address, the lower the value, the higher the priority.
Of course, you can also use other methods to change the default gateway value:
1. For example, if route delelte 0.0.0.0 is used, delete the two default gateways and add them. Note that the metric value cannot be the same when you add a new metric.
2. Use route change to change the metric value of the Internet gateways of the two default gateways ..

Change default route

By default, route change cannot modify Automatically Generated Routes. To modify automatically generated routes, add a route to overwrite the default route and then modify the new route.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.