ip route commands · iprouting toenableiprouting,usetheip routing...

4
IP Route Commands ip route, on page 2 ip routing, on page 3 IP Route Commands 1

Upload: others

Post on 08-Apr-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IP Route Commands · iprouting ToenableIProuting,usetheip routing commandinswitchconfigurationmode.TodisableIProuting,use theno formofthiscommand. ip routing no …File Size: 1MBPage

IP Route Commands

• ip route, on page 2• ip routing, on page 3

IP Route Commands1

Page 2: IP Route Commands · iprouting ToenableIProuting,usetheip routing commandinswitchconfigurationmode.TodisableIProuting,use theno formofthiscommand. ip routing no …File Size: 1MBPage

ip routeTo establish static routes, use the ip route command in switch configuration mode. To remove static routes,use the no form of this command.

ip route prefix mask ip-address [metric-value]no ip route prefix mask ip-address

Syntax Description Specifies the IP route prefix for the destination.prefix

Specifies the prefix mask for the destination.mask

Specifies the IP address of the next hop that can be used to reach that network.ip-address

Specifies the metric of the route. The default metric is 6. Valid range is from 1–255.metric-value

Command Default No static routes are established.

Command Modes Switch configuration (config-switch)

Command History ModificationRelease

This commandwas introduced.3.5.1

Example

The following example shows how to route packets for the network 209.165.201.2 to a router at209.165.202.3:

nfvis(config-switch)# ip route 209.165.201.2 255.255.255.0 209.165.202.3 2nfvis(config-switch)# commitnfvis(config-switch)# end

IP Route Commands2

IP Route Commandsip route

Page 3: IP Route Commands · iprouting ToenableIProuting,usetheip routing commandinswitchconfigurationmode.TodisableIProuting,use theno formofthiscommand. ip routing no …File Size: 1MBPage

ip routingTo enable IP routing, use the ip routing command in switch configuration mode. To disable IP routing, usethe no form of this command.

ip routingno ip routing

Syntax Description This command has no arguments or keywords.

Command Default IP routing is disabled.

Command Modes Switch configuration mode (config-switch)

Command History ModificationRelease

This commandwas introduced.3.5.1

Example

The following example enables IP Routing:nfvis(config-switch)# ip routingnfvis(config-switch)# commitnfvis(config-switch)# end

IP Route Commands3

IP Route Commandsip routing

Page 4: IP Route Commands · iprouting ToenableIProuting,usetheip routing commandinswitchconfigurationmode.TodisableIProuting,use theno formofthiscommand. ip routing no …File Size: 1MBPage

IP Route Commands4

IP Route Commandsip routing