• Enable IP routing function before using this feature, for details please refer to Configuring IP Routing.
  • The static route that specifies the next hop address and the one that specifies the outgoing interface are not considered for ECMP load sharing, even if they have equal cost.
  • 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.

In L2/L3, all routing entries will be configured to the ASIC switching chip if the outgoing VLAN-interface is link-up, and the outgoing physical port is learning.

Traffic that can be routed will have a route entry in the RIB and the ARP of the next hop; the outgoing interface should be link-up. The traffic will then be soft-routed (i.e., routed by the switch's CPU).

When the switch learns the MAC address of the next-hop, the switch will forward the traffic with the ASIC chip.

Configure static route:

admin@XorPlus# set vlans vlan-id 2
admin@XorPlus# set vlans vlan-id 3
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2
admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 3
admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2
admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3
admin@XorPlus# commit
Commit OK.
Save done.
admin@XorPlus# set l3-interface vlan-interface vlan-2 address 192.168.1.1 prefix-length 24
admin@XorPlus# set l3-interface vlan-interface vlan-3 address 192.168.2.1 prefix-length 24
admin@Xorplus# set ip routing enable true
admin@XorPlus# set protocols static route 10.10.1.0/24 next-hop 192.168.2.5
admin@XorPlus# commit
Commit OK.
Save done.
admin@XorPlus# run show route static
RIB entry for static
====================
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route
 
S>* 10.10.1.0/24 [1/0] via 192.168.2.1, vlan-3, weight 1, 00:40:35


admin@Xorplus# run show route forward-route ipv4 all 
Destination          NextHopMac          Port    
---------------      -----------------   ---------
10.10.1.0/24        3C:2C:30:84:E0:81   connected
Total route count:1

With the show route forward-route ipv4 all command, all the IPv4 route entries in the ASIC chip will be displayed.

admin@Xorplus# run show route forward-route ipv4 all 
Destination          NextHopMac          Port    
---------------      -----------------   ---------
10.10.1.0/24        3C:2C:30:84:E0:81   connected
Total route count:1