ip route

ip route< DEST-IPV4-ADDR >/{|| |拒绝

nullroute}

no ip route< DEST-IPV4-ADDR >/{|| |拒绝

nullroute}

Description

Adds an IPv4 static route on the default VRF.

Thenoform of this command deletes a IPv4 static route.

You can configure a maximum of 32 next hops per route.

Parameter

Description

< DEST-IPV4-ADDR >/

Specifies the IPv4 route destination.

Specifies the next hop address for reaching the destination in IPv4 format (x.x.x.x), wherexis a decimal number from 0 to 255.

Specifies the next hop as an outgoing interface.

nullroute

指定数据包matching the destination route are silently discarded and no ICMP error notification is sent to the sender.

reject

指定数据包matching the destination route are discarded and an ICMP error notification is sent to the sender.

Examples

switch(config)#ip route 10.0.0.0/24 nullroute

switch(config)#ip route 10.0.1.0/24 reject

switch(config)#ip route 10.0.2.0/24 20.0.0.2

switch(config)#ip route 10.0.3.0/24 1/1/1

switch(config)#ip route 10.0.3.0/24 1/1/1.110

Command History

Release

Modification

10.10

Inclusive language update.

10.07 or earlier

--

Command Information

Platforms

Command context

Authority

All platforms

config

Administrators or local user group members with execution rights for this command.