Configuring a static route at the cli – H3C Technologies H3C SecPath F1000-E User Manual

Page 362

Advertising
background image

337

Configuring a static route at the CLI

Before you configure a static route, complete the following tasks:

Configure the physical parameters for related interfaces.

Configure the link-layer attributes for related interfaces.

Configure the IP addresses for related interfaces.

Follow these guidelines when you configure a static route:

The next hop address of a static route cannot be the IP address of a local interface (such as Ethernet
interface and VLAN interface). Otherwise, the static route does not take effect.

If you do not specify the preference when you configure a static route, the default preference will be
used. Reconfiguring the default preference applies only to newly created static routes.

You can flexibly control static routes by configuring tag values and using the tag values in the
routing policy.

If the destination IP address and mask are both configured as 0.0.0.0 with the ip route-static
command, the route is the default route.

For detailed information about Track, see High Availability Configuration Guide.

To configure a static route:

Step Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Configure a static

route.

Approach 1:
ip route-static dest-address { mask | mask-length }

{ next-hop-address [ bfd control-packet [ bfd-source

ip-address ] | track track-entry-number ] |
interface-type interface-number [ next-hop-address ] |

[ bfd { control-packet [ bfd-source ip-address ] |

echo-packet } ] vpn-instance d-vpn-instance-name

next-hop-address [ track track-entry-number ] }
[ preference preference-value ] [ tag tag-value ]

[ permanent ] [ description description-text ]

Approach 2:

ip route-static vpn-instance

s-vpn-instance-name&<1-6> dest-address { mask |

mask-length } { next-hop-address [ public ] [ bfd
control-packet [ bfd-source ip-address ] | track

track-entry-number ] | interface-type interface-number

[ next-hop-address ] [ bfd { control-packet [ bfd-source
ip-address ] | echo-packet } ] | vpn-instance

d-vpn-instance-name next-hop-address [ track

track-entry-number ] } [ preference preference-value ]
[ tag tag-value ] [ permanent ] [ description

description-text ]

Use either approach.
By default, preference

for static routes is 60,
tag is 0, and no

description

information is
configured.
Do not specify the
permanent and track

keywords
simultaneously.
If the outgoing
interface is down, the

permanent static route
is still active.

3.

Configure the
default preference

for static routes.

ip route-static default-preference default-preference-value

Optional.
60 by default.

Advertising