C613-50163-01 Rev C
Command Reference for GS970M Series
679
AlliedWare Plus™ Operating System - Version 5.4.7-0.x
R
OUTING
C
OMMANDS
IP
ROUTE
ip route
Overview
This command adds a static route to the Routing Information Base (RIB). If this
route is the best route for the destination, then your device adds it to the
Forwarding Information Base (FIB). Your device uses the FIB to advertise routes to
neighbors and forward packets.
The
no
variant of this command removes the static route from the RIB and FIB.
Syntax
ip route
<subnet&mask>
{
<gateway-ip>
|
<interface>
} [
<distance>
]
no ip route
<subnet&mask>
{
<gateway-ip>
|
<interface>
}
[
<distance>
]
Mode
Global Configuration
Default
The default administrative distance for a static route is 1 for priority over non-static
routes.
Usage
Administrative distance can be modified so that static routes do not take priority
over other routes.
Examples
To add the destination 192.168.3.0 with the mask 255.255.255.0 as a static route
available through the device at “10.10.0.2” with the default administrative
distance, use the commands:
awplus#
configure terminal
awplus(config)#
ip route 192.168.3.0 255.255.255.0 10.10.0.2
Parameter
Description
<
subnet&mask
>
The IPv4 address of the destination subnet defined using either a
prefix length or a separate mask specified in one of the following
formats:
•
The IPv4 subnet address in dotted decimal notation followed by
the subnet mask, also in dotted decimal notation.
•
The IPv4 subnet address in dotted decimal notation, followed
by a forward slash, then the prefix length
<
gateway-ip
>
The IPv4 address of the gateway device.
<
interface
>
The interface that connects your device to the network. Enter the
name of the VLAN or its VID.
The gateway IP address or the interface is required.
<
distance
>
The administrative distance for the static route in the range
<
1-255
>. Static routes by default have an administrative distance
of 1.