route

Use the route command to add routing information. Use the no forms of the command to disable the information.

Use show routes to display the routing table. For more information, see show routes.

route IP Address /netmask gateway [ float | nofloat ]
route IP Address netmask gateway [ float | nofloat ]
route default gateway [ float | nofloat ]
no route IP Address
no route default
no route routeId

Parameters

IP Address Specifies the destination IP address
netmask Specifies the subnet mask
/netmask Specifies the subnet mask in CIDR format
gateway Specifies the gateway
float Does not override Open Shortest Path First (OSPF) learned route
nofloat Overrides OSPF learned route
routeId Specifies index number of route on the routing table

Examples

The following example adds an IP address to the routing table, specifying the netmask in CIDR format and disallowing OSPF overrides:

EWC.extremenetworks.com:ip# route 1.1.2.1/24 10.7.0.3 nofloat

The following example adds an IP address to the routing table, specifying the netmask as an IP address and allowing OSPF overrides:

EWC.extremenetworks.com:ip# route 1.1.2.1 255.255.255.0 10.7.0.3 float

The following example configures the default route:

EWC.extremenetworks.com:ip# route default 10.7.0.3

The following example removes an IP address from the routing table:

EWC.extremenetworks.com:ip# no route 1.1.2.1

The following example removes the default route from the routing table:

EWC.extremenetworks.com:ip# no route default

The following example removes an IP address from the routing table by its index number:

EWC.extremenetworks.com:ip# no route 12