10G Core Routing Switch User Manual
陈泽科技有限公司
- - 33 - -
www.stephen-tele.com
To delete a static route use
no
ip route
ipaddress netmask
nexthopaddr
[
metric
] global configuration command.
The parameters are explained as follows:
ipaddress and netmask
The ipaddress and netmask are in a dotted decimal format. As "1"s in the 32-bit mask is required to be consecutive,
the dotted decimal mask can also be replaced by the mask-length (which refers to the digits of the consecutive "1"s in
the mask).
Nexthopaddr
When configuring a static route, you can specify the gateway-address to decide the next hop address, depending on
the actual conditions.
In fact, for all the routing items, the next hop address must be specified. When IP layer transmits a packet, it will first
search the matching route in the routing table according to the destination address of the packet. Only when the next
hop address of the route is specified can the link layer find the corresponding link layer address, and then forward the
packet according to this address.
Configuring a default route
Perform the following configurations in global configuration mode.
Beginning in privileged EXEC mode, follow these steps to configure a default route.
Command
Purpose
Step 1
config terminal
Enter global configuration mode.
Step 2
ip route 0.0.0.0 0.0.0.0
nexthopaddr
[
metric
]
Configuring default route.
Step 3
exit
Return to privileged EXEC mode.
Step 4
show ip route
Verify your entries.
Step 5
Copy
running-config
startup-config
(Optional) Save your entries in the configuration file.
To delete a static route use
no ip route 0.0.0.0 0.0.0.0
nexthopaddr
[
metric
]
global configuration command.
The meanings of parameters in the command are the same as those of the static route.
Typical Static Route Configuration Example
I. Networking requirements
As shown in the figure below, the masks of all the IP addresses in the figure are 255.255.255.0. It is required that all
the hosts or Routing Switches can be interconnected in pairs by configuring static routes.
II. Networking diagram