364
ip route 0.0.0.0 0.0.0.0 <gateway> [<preference>]
no ip route 0.0.0.0 0.0.0.0 <gateway>
[<preference>]
Configures a default route;
the “no ip route
<ip_address> <mask>
<gateway>
[<preference>]” command
deletes a default route entry.
15.2.3.2 Static Route Configuration Commands z ip route
z show ip route
Command: ip route <ip_address> <mask> <gateway> [<preference>]
no ip route <ip_address> <mask> <gateway> [<preference>]
Function: Configures a static route; the “no ip route <ip_address> <mask> <gateway>
[<preference>]” command deletes a static route entry.
Parameter: <ip-address> and <mask> are the IP address and subnet mask, in dot
decimal format; <gateway> is the IP address for the next hop in dot decimal
format; <preference> is the route priority, ranging from 1 to 255, the smaller
preference indicates higher priority.
Default: The default priority for static route of ES4626/ES4650 is 1.
Command mode: Global Mode
Usage Guide: When configuring the next hop for static route, next hop IP address can be
specified for routing packets.
The default preference of all route type in ES4626/ES4650 is listed below:
Route Type Preference Value
Direct route 0
Static Route 1
OSPF 110
RIP 120
IBEP 200
EBGP 20
By default, direct route has the highest priority, and static route, EBGP, OSPF, RIP and
IBGP have descending priorities in the order listed.
Example:
Example 1: add a static route
Switch(Config)#ip route 1.1.1.0 255.255.255.0 2.1.1.1
Example 2: add a default route
Switch(Config)#ip route 0.0.0.0 0.0.0.0 2.2.2.1