10 ip route, 10 ip route -10 – PLANET WGSW-52040 User Manual

Page 399

Advertising
background image

23-10

Usage Guide:

Configure the default gateway of the router to specify the default next hop address to which the packets will be sent.

Example:

Specify a default gateway:

Switch(config)# ip default-gateway 10.1.1.10

Cancel the setting of a default gateway:

Switch(config)# no ip default-gateway 10.1.1.10

23.2.10 ip route

Command:

ip route {<ip-prefix> <mask> | <ip-prefix>/<prefix-length>} {<gateway-address> | <gateway-interface>}

[<distance>]

no ip route {<ip-prefix> <mask> | <ip-prefix>/<prefix-length>} [<gateway-address> | <gateway-interface>]

[<distance>]

Function:

Configure the static route. The no command deletes the static route.

Parameter:

<ip-prefix> and <mask> are respectively destination IP address and subnet mask, shown in dotted decimal notation;

<ip-prefix> and <prefix-length> are respectively the destination IP address and the length of prefix;

<gateway-address> is the next-hop IP address shown in dotted decimal notation; <gateway-interface> is the

next-hop interface; < distance > is the distance value of route management, the range is 1 to 255.

Default:

The default distance value of route management is 1.

Command Mode:

Global Mode.

Usage Guide:

When configuring the next-hop of static route, the next-hop IP address of route packets and the manner of egress or

interface can be appointed.

The distance values of all kinds of the switch routes are the following:

Route Type

Distance Value

Advertising