To add a static route, use the ip route command in Global Configuration Mode. The route defines the IP address or interface through which the destination can be reached. The no form of this command deletes a static route. If the static route is configured without any metric value, the route will be configured with metric value 1.
Parameter | Type | Description |
---|---|---|
<ucast_addr> |
A.B.C.D | Enter to configure unicast destination IP address; 0.0.0.0 is IP address for a default route |
<ip_mask> |
A.B.C.D | Enter to configure a subnet mask for the destination; 0.0.0.0 is subnet mask for a default route |
<next-hop> |
Enter to configure the IP address or IP alias of the next hop that can be used to reach that network | |
cybsec |
Enter for configure security application | |
<distance_value (1-255)> |
Integer | Enter to configure the Administrative distance for the specified next hop address or the interface. This value ranges from 1 to 255. The default is 1. |
private |
Enter to configure a private route | |
<ucast_addr> |
A.B.C.D | Enter to define unicast destination IP address; 0.0.0.0 is IP address for a default route |
<ip_mask> |
A.B.C.D | Enter to configure a subnet mask for the destination; 0.0.0.0 is subnet mask for a default route |
<next-hop> |
Enter to configure the IP address or IP alias of the next hop that can be used to reach that network | |
vlan |
Enter for configure a vlan option. | |
<vlan-id/vfi-id> |
specify the range of the specified VLAN ID This is a unique value that represents the specific VLAN created and activated. The range (1-4094) is for VLAN ID and the range (4096 - 65535) is for VFI. Note that if router ports are used then correspondingly the last set of vlans will not be available. For example, if router ports is 24, then max VLAN number will be 4070 only | |
switch |
Enter to configure name of the switch. | |
<switch-name> |
Enter a name for the switch. | |
<next-hop> |
Enter to configure the IP address or IP alias of the next hop that can be used to reach that network | |
Gigabitethernet <interface-id> |
Enter to select Gigabit Ethernet interface. Gigabit Ethernet interface is a version of Ethernet that supports data transfer up to 10 Gigabits per second. This Ethernet supports only full duplex links. Specify the interface ID with a format <0>/<1-28>—slot number/port number | |
Extreme-Ethernet <interface-id> |
Enter to select Extreme Ethernet interface. Extreme Ethernet interface is a version of LAN standard architecture that supports data transfer up to 1 Gigabit per second. Specify the interface ID with a format <0>/<1-28>—slot number/port number | |
Linuxvlan |
Enter to specify Linux VLAN interface related configuration. | |
<interface-name> |
Enter a name for the Linux VLAN Interface. | |
Cpu0 |
Enter to set the Out of Band Management Interface for the route. | |
tunnel |
Enter to configure the static route for the specified Tunnel Identifier. | |
<tunnel-id (0-128)> |
Enter a value for tunnel Identifier. This value ranges from 0 to 128. | |
<IP-interface-type> |
Enter to configures the static route for the specified L3 Pseudo wire interface in the system | |
<IP-interface-number> |
Enter a value that represents the specific interface. This value ranges from 1 to 65535 for Pseudowire interface. | |
ppp |
Enter to configure the PPP (point-to-point protocol) interface for the route. | |
<1-10> |
Enter a value for PPP. The value ranges from 1 to 10 | |
<distance_value (1-255)> |
Integer | Enter to configure the Administrative distance for the specified next hop address or the interface. This value ranges from 1 to 255. The default is 1. |
private |
Enter to configure a private route | |
permanent |
Enter to configure a switch name /context name; option default is available now. | |
name |
Enter to configure a next hop name. | |
<nexthop-name> |
Enter a next hop name. |
Global Configuration Mode
Interface must be a router port.
iS5Comm (config)# ip route 30.0.0.2 255.255.255.255 vlan 1
iS5Comm (config)# ip route 30.0.0.2 255.255.255.255 gi 0/2 12.2