MES53xx, MES33xx, MES23xx Ethernet Switch Series
189
11.6
Routing protocol configuration
11.6.1
Static Routing Configuration
Static routing is a type of routing when paths are specified in an explicit form when configuring the
router. Routing is performed without using any routing protocols.
Global configuration mode commands
Command line prompt in the global configuration mode is as follows:
console(config)#
Table 5.221. Global configuration mode commands
Command
Value/Default value
Action
ip route
prefix
{
mask
|
prefix_length
} {
gateway
[metric
distance
] |
rejectroute}
prefix_length: (0..32);
distance (1..255)/1
Create a static routing rule.
-
prefix
– target network (e.g. 172.7.0.0);
-
mask
– network mask (in decimal system format);
-
prefix_length
- netmask prefix (the number of units in the mask);
-
gateway
– the gateway for target network access;
-
distance
- route weight;
-
reject-route
- prohibits routing to the target network via all
gateways.
no ip route
prefix
{
mask
|
prefix_length
} {
gateway
|
rejectroute}
Delete a rule from the static routing table.
EXEC mode commands
Command line prompt in the EXEC mode is as follows:
console#
Table 5.222. EXEC mode commands
Command
Value/Default value
Action
show ip route [connected |
static | address
ip_address
[
mask
|
prefix_length
]
[longer-prefixes]]
-
Display routing table which satisfies the specified criteria.
–
connected
– connected route, i.e. a route taken from directly
connected and running interface;
–
static
– static route specified in the routing table.
Examples of command usage
Display the routing table:
console#
show ip route
Maximum Parallel Paths: 2 (4 after reset)
Codes: C - connected, S - static
C 10.0.1.0/24 is directly connected, Vlan 1
S 10.9.1.0/24 [5/2] via 10.0.1.2, 17:19:18, Vlan 12
S 10.9.1.0/24 [5/3] via 10.0.2.2, Backup Not Active
S 172.1.1.1/32 [5/3] via 10.0.3.1, 19:51:18, Vlan 12
Table 5.223. Description of command result
Field
Description
C
Display a route origin:
C - Connected (the route is taken from directly connected and running interface),
S – Static (static route specified in the routing table).