Configuring the Static Routing

Overview

The static routing is manually configured, which requires low system performance and is applicable to small-size network with simple and stable topologies.

Procedure

Before configuring the routing, make sure that the Layer 3 interface has been configured.

Step1       By default, the IP routing function is disabled. In the configuration mode, enable the IP routing function.

set ip routing enable true

set ip routing enable true

Step2       Specify the destination address, and configure one of next-hop IP address and outgoing interface as needed.

set protocols static route <ip/prefixlen> next-hop <nexthop-address>

  • route <ip/prefixlen>: specifies a destination IPv4 or IPv6 address and the prefix length of 1 to 32 for IPv4 and 1 to 128 for IPv6.

  • next-hop <nexthop-address>: specifies the next-hop IP address.

set protocols static interface-route <ip/prefixlen> interface <interface-name>

  • interface <interface-name>: specifies the Layer 3 interface as an outgoing interface. The value could be a VLAN interface, loopback interface, routed interface or sub-interface.

set protocols static route <ip/prefixlen> next-hop <nexthop-address>

  • route <ip/prefixlen>: specifies a destination IPv4 or IPv6 address and the prefix length of 1 to 32 for IPv4 and 1 to 128 for IPv6.

  • next-hop <nexthop-address>: specifies the next-hop IP address.

set protocols static interface-route <ip/prefixlen> interface <interface-name>

  • interface <interface-name>: specifies the Layer 3 interface as an outgoing interface. The value could be a VLAN interface, loopback interface, routed interface or sub-interface.

Step3       Commit the configuration.

commit

commit

Verifying the Configuration

After the configuration is completed, in the configuration mode, use run show route static command to view all static routing entries.

Other Configurations

To clear the configuration of static interface, use delete protocols static route<ip/prefixlen> command.

Copyright © 2024 Pica8 Inc. All Rights Reserved.