set protocols static route next-hop
The set protocols static route command configures a unicast static route.
Command Syntax
set protocols static [vrf <vrf-name>] route <ip-address> next-hop <nexthop-address>
Parameter
Parameter | Description |
vrf <vrf-name> | Optional. Specifies a VRF name. The value is a string. It’s a user-defined VRF set by the command set ip vrf <vrf-name> [description <string>]. NOTE:
|
route <ip-address> | Specifies a destination IPv4 or IPv6 address network segment for route. For example, 192.168.1.0/24, 200::0/64 |
next-hop <nexthop-address> | Specifies the next-hop address. For example, 10.10.1.0, fc00:0:0:2002::2. |
Usage Guidelines
On a simple network, you only need to configure static routes to ensure that the network runs properly. When the destination IP address is set to 0.0.0.0/0 or 0::0/0, a default route is configured. If the switch cannot find a route in the routing table to forward packets, the switch will use the default route to forward packets.
The static route entries are in the default VRF if not explicitly bound to any VRF.
Example
- Set the next-hop address of 192.168.1.0/24 to 10.10.0.1.
admin@Xorplus# set protocols static vrf vrf100 route 192.168.1.0/24 next-hop 10.10.0.1 admin@Xorplus# commit
Copyright © 2025 Pica8 Inc. All Rights Reserved.