Configuration Guide Managing Routes
Configuring a Static Route
(Mandatory) It is used to configure a static route entry.
Configures an IPv4 static route.
Configures an IPv6 static route.
Configuring a Default Route
(Optional) It is used to configure the default gateway.
Configures an IPv4 default gateway on a L2
device.
Configures an IPv6 default gateway on a L2
device.
ip route 0.0.0.0 0.0.0.0 gateway
Configures an IPv4 default gateway on a L3
device.
ipv6 route ::/0 ipv6-gateway
Configures an IPv6 default gateway on a L3
device.
Configures an IPv4 default network on a L3
device.
Configuring Route
Limitations
(Optional) It is used to limit the number of equal-cost routes and number of static routes,
or disable routing.
Configures the maximum number of
equal-cost routes.
Configures the maximum number of IPv4
static routes.
Configures the maximum number of IPv6
static routes.
1.4.1 Configuring a Static Route
Configuration Effect
Generate a static route in the routing table. Use the static route to forward packets to a remote network.
Notes
If the no ip routing command is configured on a L3 device, you cannot configure IPv4 static routes on this switch, and
existing IPv4 static routes will also be deleted. Before the device is restarted, reconfiguring the ip routing command
can recover the deleted IPv4 static routes. After the device is restarted, deleted IPv4 static routes cannot be recovered.
If the no ipv6 unicast- routing command is configured on a L3 device, you cannot configure IPv6 static routes on this
switch, and existing IPv6 static routes will also be deleted. Before the device is restarted, reconfiguring the ipv6
unicast- routing command can recover the deleted IPv6 static routes. After the device is restarted, deleted IPv6 static
routes cannot be recovered.