Administrator Guide
ip route
Assign a static route to the switch.
Syntax
ip route [vrf vrf-name] ip-address mask {ip-address | interface [ip-
address]} [distance] [name description] [permanent] [tag tag-value] [vrf
vrf-name] [weight weight-value]
To delete a specific static route, use the no ip route destination mask command.
To delete all routes matching a certain route, use the no ip route destination mask command.
Parameters
vrf
vrf-name
(Optoinal) Enter the keyword vrf and then the name of the VRF to configure a
static route corresponding to that VRF. Use this VRF option after the ip route
keyword to configure a static route on that particular VRF.
destination
Enter the IP address in dotted decimal format of the destination device.
mask
Enter the mask in the slash prefix format (/x) of the destination IP address.
ip-address
Enter the IP address of the forwarding router in dotted decimal format.
interface Enter one of the following keyword followed by the interface information
● For a 1-GigabitEthernet interface, enter the keyword GigabitEthernet then
the slot/port information.
● For a 10-Gigabit Ethernet interface, enter the keyword
TenGigabitEthernet then the slot/port information.
● For a Loopback interface, enter the keyword loopback then a number from 0
to 16383.
● For the Management interface on the stack-unit, enter the keyword
ManagementEthernet then the slot/port information.
● For a port channel interface, enter the keywords port-channel then a
number.
● For a Null interface, enter the keyword null then the Null interface number.
● For a VLAN interface, enter the keyword vlan then a number from 1 to 4094.
● For a tunnel interface, enter the keyword tunnel then the tunnel interface
number. The range is from 1 to 16383.
If you configure a static IPv6 route using an egress interface and enter the ping
command to reach the destination IPv6 address, the ping operation may not work.
Configure the IPv6 route using a next-hop IPv6 address in order for the ping
command to detect the destination address.
interface
ip-
address
Enter the keyword interface then the IP address.
distance
(OPTIONAL) Enter the value of the distance metric assigned to the route. The
range is from 1 to 255.
name
description
(OPTIONAL) Enter the keyword name and the description for the IPv4 static route
configuration.
permanent (OPTIONAL) Enter the keyword permanent to specify that the route must not be
removed even if the interface assigned to that route goes down. The route must be
currently active to be installed in the routing table. If you disable the interface, the
route is removed from the routing table.
tag
tag-value
(OPTIONAL) Enter the keyword tag then a number to assign to the route. The
range is from 1 to 4294967295.
vrf
vrf-name
Enter the keyword vrf followed by the name of the VRF. Use this VRF option
after the next hop to specify which VRF the next hop belongs to. This setting is
used in route leaking cases. See “R”oute Leaking VRFs” in the Virtual Routing and
Forwarding (VRF) section of the Configuration guide.
738 IPv4 Routing