Vro static route configuration command

Source: Internet
Author: User

When configuring Static Routing, you can specify both the sending interface and the next hop address. which method is used depends on the actual situation.

1. ip route

Configure or delete a static route.

[No] ip route ip-address {mask | mask-length} {interfacce-name | gateway-address} [preference-value] [reject | blackhole]

Parameter description]

Ip-address and mask are destination ip addresses and masks, which are in decimal format. Because '1' in 32-bit masks must be continuous, therefore, the mask in dotted-decimal format can be replaced by the mask length mask-length. The mask length is the number of consecutive '1' bits in the mask.

Interfacce-name specifies the sending Interface name of the route, and gateway-address is the next hop IP address of the route (in decimal format ).

Preference-value indicates the priority of the route. The value ranges from 0 ~ 255.

Reject indicates that the route is not accessible.

Blackhole indicates a black hole route.

Default condition]

By default, the system can obtain the subnet route to the subnet connected to the router. If priority is not specified When configuring static routing, the default value is 60. If reject or blackhole is not specified, the default value is reachable.

Command mode]

Global Configuration Mode

User Guide]

Note:

When the destination IP address and mask are both 0.0.0.0, the default route is configured. That is, when the route table fails to be searched, packets are forwarded based on the default route.

You can flexibly apply Routing Management Policies for different configurations of priorities. For example, if multiple routes are configured to reach the same destination, load balancing can be implemented if the same priority is specified. If different priorities are specified, you can back up routes.

When configuring static routes, you can specify both the sending interface and the next hop address. which method is used depends on the actual situation: for interfaces or point-to-point interfaces that support network address resolution from the link layer to the link layer, you can specify the sending interface. For NBMA interfaces, such as interfaces that encapsulate X.25 or frame relay and dial-up ports, point-to-point interfaces are supported, in this case, in addition to configuring IP routing, you also need to establish a secondary route on the link layer, that is, the ing between the ip address and the link layer address (such as dialer map ip, x.25 map ip, or frame-relay map IP ), this kind of sentiment? The sending interface cannot be specified when configuring static routes. The next hop IP address should be configured.

Example]

Configure the next hop of the default route to 129.102.0.2.

Quidway (config) # ip route 0.0.0.0 0.0.0.0 129.102.0.2

Related commands]

Show ip route, show ip route detail, show ip route static

2. show ip route

Displays the route table Summary.

Show ip route

Command mode]

Privileged user mode

User Guide]

The command output displays the route table in a list. Each line represents a route, including:

Destination Address/Mask Length

Protocol

Priority

Metric Value

Next Hop

Output interface

Example]

Quidway # show ip route

Routing Tables:

Destination/Mask Proto Pref Metric Nexthop Interface

127.0.0.0/8 Static 0 0 127.0.0.1 127.0.0.1 (LO0)

127.0.0.1/32 Direct 0 0 127.0.0.1 127.0.0.1 (LO0)

138.102.128.0/17 Direct 0 0 138.102.129.7 138.102.129.7 (EN0)

202.38.165.0/24 Direct 0 0 202.38.165.1 202.38.165.1 (SL1)

Related commands]

Ip route, show ip route detail, show ip route static

3. show ip route detail

Show route table details

Show ip route detail

Command mode]

Privileged user mode

User Guide]

The command output helps you diagnose routing faults.

Example]

Quidway # show ip route detail

Route state description

NoAdv: do not advertiset Int: AS Interior route

Ext: AS External route Del: route to be deleted

Active: current route Retain: route retains in the routing table

Rej: rejecting route Black: black hole route

Routing Tables:

Generate Default: no

+ = Active Route,-= Last Active, * = Both

Destinations: 4 Routes: 4

Holddown: 0 Delete: 9 Hidden: 0

** Destination: 127.0.0.0 Mask: 255.0.0.0

Protocol: * Static Preference: 0

NextHop: 127.0.0.1 Interface: 127.0.0.1 (LO0)

State: $ # @ 60; NoAdv Int Active Retain Rej $ # @ 62;

Age: 19:31:06 Metric: 0/0

** Destination: 127.0.0.1 Mask: 255.255.255.255

Protocol: * Direct Preference: 0

NextHop: 127.0.0.1 Interface: 127.0.0.1 (LO0)

State: $ # @ 60; NoAdv Int Active Retain $ # @ 62;

Age: Metric: 0/0

First, the symbols used to describe the Routing Status are displayed. Then, the statistics of the entire route table are output, and the detailed descriptions of each route are output in sequence. The meanings are shown in Table 4-1.

Table 4-1 route table information

Related commands]

Ip route, show ip route, show ip route static

4. show ip route static

Displays the static route table.

Show ip route static

Command mode]

Privileged user mode

User Guide]

Based on the command output information, you can check whether the static route configuration is correct.

Example]

Quidway # show ip route static

Static routes for family INET: (* indicates gateway (s) in use)

1.2.3.0/24 pref 60 $ # @ 60; Int $ # @ 62; intf EN0

127.0.0.0/8 pref 0 $ # @ 60; NoAdv Int Retain Rej $ # @ 62; intf 127.0.0.1

The static route table is displayed in the list. Each line represents a static route, which is displayed from left to right:

Destination Address/Mask Length

Priority

$ #@ 60; status parameter $ # @ 62;

Output interface and next hop

Related commands]

Ip route, show ip route, show ip route detail

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.