set protocols static route
The set protocols static route command configures a unicast static route by specifying the next hop.
The delete protocols static route command removes the static route.
Note:
If you are configuring a default route in the default VRF, you need to enable management VRF (After enabled by using command set system management-vrf enable true, eth0 will automatically be moved to management VRF from default VRF) to ensure the normal access to eth0 management port.
Command Syntax
set protocols static [vrf<vrf-name>] route <ip/prefixlen> {next-hop <nexthop-address> | blackhole | null0 | reject} [distance <distance> | tag <tag>]
delete protocols static [vrf<vrf-name>] route <ipv4/prefixlen> {next-hop <nexthop-address> | blackhole | null0 | reject}
Parameter
Parameter | Description |
vrf <vrf-name> | Optional. Specifies a VRF name. If not specified, it will create a static route in the default VRF. |
route <ip/prefixlen> | Specifies a destination IPv4 or IPv6 address. Where prefixlen specifies the number of bits in the address mask in int format (x), where x is a decimal number from 1 to 32 for IPv4 and 1 to 128 for IPv6. |
next-hop <nexthop-address> | Specifies the next-hop address. |
blackhole | Specifies that packets matching the destination route are silently discarded and no ICMP error notification is sent to the sender. |
null0 | Specifies the NULL0 interface as an outgoing interface. All the IP packets destined for the destination address are discarded without notifying the source host. |
reject | Specifies that packets matching the destination route are discarded and an ICMP error notification is sent to the sender. |
distance <distance> | Optional. Specifies the administrative distance of a static route. The value is an integer that ranges from 1 to 255. |
tag <tag> | Optional. Specifies the tag value of a static route. By configuring different tag values, you can classify static routes to implement different routing policies. For example, other routing protocols can import static routes with specified tag values through routing policies. |
Example
• This example creates a static black hole route.
admin@XorPlus# set protocols static route 10.10.10.10/32 blackhole admin@XorPlus# commit
Copyright © 2024 Pica8 Inc. All Rights Reserved.