< Home

default-route originate (RIP)

Function

The default-route originate command configures the current FW to generate a default route and send it to neighbors, or sends a default route in its routing table to neighbors.

The undo default-route originate command deletes the default route.

By default, the current FW does not send the default route to neighbors.

Format

default-route originate [ cost cost | tag tag | { match default | route-policy route-policy-name [ advertise-tag ] } [ avoid-learning ] ] *

undo default-route originate

Parameters

Parameter Description Value
cost cost Specifies the cost value of the default route. The value is an integer ranging from 0 to 15. By default, the value is 0.
tag tag Specifies the tag value to be applied while advertising default route. The value is an integer ranging from 0 to 65535. By default, the value is 0.
match default Indicates that if a default route generated by another routing protocol or RIP processes exists in the routing table, this default route is advertised to neighbors. -
route-policy route-policy-name Specifies the name of a routing policy. RIP will originate the default route only if route that matches the routing policy is active in the routing table. The value is a string of 1 to 40 case-sensitive characters and cannot contain a space.
advertise-tag Specifies inherit the tag value applied through route-policy while advertising default route. -
avoid-learning Prevents a RIP process from importing default routes. If there is an active default route in the routing table, using this parameter will set the status of the default route to inactive. -

Views

RIP view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In a routing table, the destination address and mask of a default route are all 0s. If the destination address of a packet does not match any entry in the routing table of the FW, the FW sends the packet along the default route.

If no default route exists and the destination address of the packet does not match any entry in the routing table, the FW discards the packet and sends an Internet Control Message Protocol (ICMP) packet, informing the originating host that the destination address or network is unreachable.

Default routes are originated unconditionally, or based on the configured routing policy or match default. When default routes are originated based on the configuration, default routes learned from RIP neighbors will be deleted.
  • When the default-route originate command is configured without any parameter, the default route is originated unconditionally regardless of whether the default route exists in the IP routing table.
  • When the default-route originate command is configured with route-policy, RIP will originate the default route only if the route that matches route-policy is active in the IP routing table.
  • When the default-route originate command is configured with match default, RIP will originate the default route only if a default route learned by another routing protocol or RIP process is present in the IP routing table.
  • When the default-route originate command is configured with avoid-learning, RIP will not learn the default route advertised by RIP peers.

Prerequisites

A RIP process has been created, and the RIP view is displayed using the rip command.

Example

# Set the cost value of a default route to 2.

<FW> system-view
[FW] rip 100
[FW-rip-100] default-route originate cost 2

# Set the cost value of a default route in the routing table to 2.

<FW> system-view
[FW] rip 100
[FW-rip-100] default-route originate match default cost 2

# Set the current FW to originate the default route, which matches the routing policy named filter, and set the cost to 15.

<FW> system-view
[FW] rip 100
[FW-rip-100] default-route originate route-policy filter cost 15

# Delete a default route.

<FW> system-view
[FW] rip 100
[FW-rip-100] undo default-route originate 

# Prevent RIP from importing default routes from other routing protocols or RIP processes.

<FW> system-view
[FW] rip 100
[FW-rip-100] default-route originate match default avoid-learning 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >