Summary of commands related to policy routing configuration

Source: Internet
Author: User

It is very useful to know some knowledge about policy routing configuration. Here we mainly explain the summary of the commands related to policy routing configuration, A routemap consists of a set of route-mapstatements with the same route-map Name.

These statements can use permit and deny to identify whether to execute policy routing configuration. If the statement that a data packet matches is deny, it is forwarded as a common destination address route. If it is permit, all the set commands on it will be applied. SetB and C are executed for any data packet that matches X, Y, and Z. If there is no match, no set command is executed. Let's take a look at the command below:

1. Use the route-map command to create routemap. The map-tag parameter specifies the routemap name. The permit and deny Parameters specify the actions to be executed if the conditions match, the sequence-number parameter is used to differentiate each routemapstatement. Different statement has different sequencenumbers. With this parameter, you can insert or delete a routemapstatement at a specific location of a routemap and edit it separately. A routemap can contain multiple routemapstatement statements. The execution sequence of these statements is the same as that of ACL. For a route, match the route first.

2. Use the matchroutemap command to define the check conditions. Router (config-route-map) # match {}.

3. Use the setroute-map policy routing configuration command to define the behavior after condition matching, Router (config-route-map) # set {}, A routemap can contain multiple routemapstatement, A match statement can contain multiple conditions. If a condition is true, this condition is considered to be matched. However, this routemapstatement match only when all conditions are matched.

The serial number parameter determines the order of condition matching. Only when the statement with the serial number of 10 does not match will the statement with the serial number of 20 be checked. The last default value of a routemap is "denyany ". The use result of this deny depends on how the routemap is used. If a packet does not match routemap, it will be forwarded according to the normal destination address. If you want to discard this package, you need to include a set statement to route the package to a null interface. This statement should be placed at the end of routemap. The criteria used to perform matching in route-map include:

1. Standard access lists and extended access lists can be used to establish matching standards for Policy Routing configurations. To use the IP address access list for policy routing configuration, run the matchipaddress command: Router (config-route-map) # matchipaddress {| }[... |]. If multiple access control lists are defined, an access list is considered to be matched.

2. The matchlength command is used to establish matching based on the three-tier package length. Router (config-route-map) # The matchlength parameter defines the maximum and minimum length of a three-tier package. When the length of a package is between the two values, the matching is true. You can use the matchlength command to differentiate transmission types. For example, interactive data packets and file transmission data packets tend to be large in file transmission.

1) Routerconfig-route-map) # setipnext-hop [...]

The Setipnexthop command sets the next hop address of the packet from the outbound port. This address must be the IP address of the neighboring router. If multiple interfaces are configured for Policy Routing, use the first available interface. This command affects all data packet types and is always in use.

2) Routerconfig-route-map) # setinterface [...]

The Setinterface command sets the outbound port for the data packet. The parameter specifies the type and number of the interface. If multiple interfaces are defined, the first found up interface is used. Sometimes, a route table may not contain an obvious route to a data packet's destination address, for example, a broadcast packet or a data packet whose destination address is unknown, the command does not affect these packets or the command ignores these packets.

3) Router (config-route-map) # setipdefanexnexthop [...]

The setipdefanexnexthop command is used to set the next hop address when there is no obvious route to the destination address of the data packet in the routing table.

4) Router (config-route-map) # setdefaultinterface [...]

If there is no obvious route to the destination address, the setdefaultinterface command sets the output interface for these packets. Once the target address or interface is selected, other defaultset commands are ignored.

5) Router (config-route-map) # setiptos

Setiptos is used to set the IPToS value of IP packets. You can set the following values:

6) Router (config-route-map) # setipprecedence [|]

The Setipprecedence command is used to set the IP packet priority. The following table lists the available priority values and Corresponding names. These set commands can be used in combination as shown in the preceding demo.

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.