1220
C
81: S
HAPTER
TATIC
Examples
ip route-static default-preference
Syntax
View
Parameters
Description
Related commands:
Examples
R
C
C
OUTING
ONFIGURATION
OMMANDS
# Configure a static route, whose destination address is 1.1.1.1/24, next hop
address is 2.2.2.2, tag value is 45, and description information is "for internet &
intranet".
<Sysname> system-view
[Sysname] ip route-static 1.1.1.1 24 2.2.2.2 tag 45 description for
internet & intranet
# Configure a static route for a VPN instance named vpn1: the destination address
is 1.1.1.1/16 and the next hop address is 1.1.1.2, which is the address of this VPN
instance.
<Sysname> system-view
[Sysname] ip route-static vpn-instance vpn1 1.1.1.1 16 vpn-instance
vpn1 1.1.1.2
ip route-static default-preference default-preference-value
undo ip route-static default-preference
System view
default-preference-value: Default preference for static routes, which is in the
range of 1 to 255.
Use the
ip route-static default-preference
preference for static routes.
Use the
undo ip route-static default-preference
default.
By default, the default preference of static routes is 60.
Note that:
If no preference is specified when configuring a static route, the default
■
preference is used.
When the default preference is re-configured, it applies to newly added static
■
routes only.
display ip routing-table on page 929 and ip route-static.
# Set the default preference of static routes to 120.
<Sysname> system-view
[Sysname] ip route-static default-preference 120
command to configure the default
command to restore the