CÔNG TY TNHH CÔNG NGHỆ VIỆT THÁI DƯƠNG
Logo CNTTShop.vn

NTT03, Line 1, Thống Nhất Complex, Thanh Xuân, Hà Nội.
Danh mục sản phẩm

Configure a Static Route

Configuration Condition

Before configuring a static route, ensure that:

  • The link layer protocol has been configured to ensure normal communication at the link layer.
  • Interface IP addresses have been configured so that neighbor nodes are reachable at the network layer.

Configure a Static Route

According to the parameters that have been specified, static routes are categorized into the following three types:

  • Interface route: For an interface route, only the output interface is specified.
  • Gateway route: For a gateway route, only the gateway address is specified.
  • Interface gateway route: For an interface gateway route, both the output interface and the gateway address are specified.

Configured static routes become invalid if some of the following conditions are met:

  1. The destination address is the local interface address.
  2. The destination address is the network of the local direct interface.
  3. The administrative distance of the route is 255.
  4. The output interface of the route is DOWN.
  5. No IP address has been configured for the output interface of the route.
  6. The gateway address is not reachable.
  7. The output interface and the gateway of the route conflict.
  8. The output interface of the route does not exist.
  9. The TRACK object that is associated with the route is "fake".
  10. The status of the Bidirectional Forwarding Detection (BFD) session that is associated with the route is DOWN.

If an interface route meets any one condition among 1, 2, 3, 4, 5, 9, and 10, the route is invalid. If a gateway route meets any one condition among 1, 2, 3, 4, 6, 8, 9, and 10, the route is invalid. If an interface gateway route meets any of the above conditions, the route is invalid.

Table 3-2 Configuring a Static Route

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure a static route.

ip route [ vrf vrf-name1] destination-ip-address destination-mask { interface-name / [ nexthop-ip-address [ vrf vrf-name2 ] ] } [ name nexthop-name ] [ tag tag-value ] [ track track-id ] [ administrative-distance ]

Mandatory.

The field administrative-distance is the administrative distance of the static route. If it is not specified, the default administrative distance is used.

note


  • For a default route, the destination network and mask must be set to 0.0.0.0.
  • The output interface of the Null0 route is Null0.
  • The output interface of the Null0 interface need not be configured with an IP address.