H3C S3100-52P Operating instructions

Category
Network switches
Type
Operating instructions
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Table of Contents
i
Table of Contents
Chapter 1 IP Routing Protocol Overview....................................................................................1-1
1.1 Introduction to IP Route and Routing Table ......................................................................1-1
1.1.1 IP Route ..................................................................................................................1-1
1.1.2 Routing Table..........................................................................................................1-1
1.1.3 Routing Protocols and Routing Priority...................................................................1-3
1.1.4 Route Backup..........................................................................................................1-4
1.2 Displaying and Maintaining a Routing Table.....................................................................1-4
Chapter 2 Static Route Configuration.........................................................................................2-1
2.1 Introduction to Static Route ...............................................................................................2-1
2.1.1 Static Route.............................................................................................................2-1
2.1.2 Default Route ..........................................................................................................2-2
2.2 Static Route Configuration.................................................................................................2-2
2.2.1 Configuration Prerequisites.....................................................................................2-2
2.2.2 Configuring a Static Route......................................................................................2-2
2.3 Displaying and Maintaining Static Routes.........................................................................2-3
2.4 Static Route Configuration Example..................................................................................2-3
2.5 Troubleshooting a Static Route .........................................................................................2-5
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 1 IP Routing Protocol Overview
1-1
Chapter 1 IP Routing Protocol Overview
Go to these sections for information you are interested in:
z Introduction to IP Route and Routing Table
z Displaying and Maintaining a Routing Table
Note:
The term router in this chapter refers to a router in a generic sense or an Ethernet
switch running a routing protocol.
1.1 Introduction to IP Route and Routing Table
1.1.1 IP Route
Routers are used for route selection on the Internet. As a router receives a packet, it
selects an appropriate route (through a network) according to the destination address
of the packet and forwards the packet to the next router. The last router on the route is
responsible for delivering the packet to the destination host.
1.1.2 Routing Table
I. Function
The key for a router to forward packets is the routing table. Each router maintains a
routing table. Each entry in this table contains an IP address that represents a
host/subnet and specifies which physical port on the router should be used to forward
the packets destined for the host/subnet. And the router forwards those packets
through this port to the next router or directly to the destination host if the host is on a
network directly connected to the router.
II. Routing entry
Each routing entry in a routing table contains:
z Destination: It identifies the address of the destination host or network of an IP
packet.
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 1 IP Routing Protocol Overview
1-2
z Mask: Along with the destination address, it identifies the address of the network
segment where the destination host or router resides. By performing a logical AND
operation between destination address and network mask, you can get the
address of the network segment where the destination host or router resides. For
example, if the destination address is 129.102.8.10 and the mask is 255.255.0.0,
the address of the network segment where the destination host or router resides is
129.102.0.0. A mask consists of some consecutive 1s, represented either in
dotted decimal notation or by the number of the consecutive 1s in the mask.
z Interface: It indicates through which interface IP packets should be forwarded to
the destination.
z Nexthop: It indicates the next router that IP packets will pass through to reach the
destination.
z Preference: There may be multiple routes with different next hops to the same
destination. These routes may be discovered by different routing protocols, or be
manually configured static routes. The one with the highest preference (the
smallest numerical value) will be selected as the current optimal route.
According to different destinations, routes fall into the following categories:
z Subnet route: The destination is a subnet.
z Host route: The destination is a host.
In addition, according to whether the network where the destination resides is directly
connected to the router, routes fall into the following categories:
z Direct route: The router is directly connected to the network where the destination
resides.
z Indirect route: The router is not directly connected to the network where the
destination resides.
In order to avoid an oversized routing table, you can set a default route. All the packets
for which the router fails to find a matching entry in the routing table will be forwarded
through this default route.
Figure 1-1 shows a relatively complicated internet environment, the number in each
network cloud indicate the network address. Router G is connected to three networks,
and so it has three IP addresses and three physical ports. Its routing table is shown in
Figure 1-1.
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 1 IP Routing Protocol Overview
1-3
Router A
Router B
Router H
Router E
16.0.0.2
17.0.0.2
15.0.0.0
12.0.0.0
17.0.0.0
11.0.0.0 16.0.0.0
13.0.0.0
14.0.0.0
Router C
Router D
Router F
Router G
11.0.0.1
11.0.0.2
12.0.0.1
12.0.0.2
15.0.0.1 15.0.0.2
17.0.0.1
16.0.0.1
13.0.0.1 13.0.0.2
13.0.0.3
14.0.0.1 14.0.0.3
15.0.0.3
14.0.0.2
14.0.0.4
Destination Network Nexthop Interface
11.0.0.0 14.0.0.1 3
12.0.0.0 14.0.0.1 3
13.0.0.0 16.0.0.1 2
14.0.0.0 14.0.0.3 3
15.0.0.0 17.0.0.2 1
16.0.0.0 16.0.0.2 2
17.0.0.0 17.0.0.1 1
Figure 1-1 Routing table
1.1.3 Routing Protocols and Routing Priority
Different routing protocols may find different routes (including static routes) to the same
destination. However, not all of those routes are optimal. In fact, at a particular moment,
only one protocol can uniquely determine the current optimal routing to the destination.
For the purpose of route selection, each routing protocol (including static routes) is
assigned a priority. The route found by the routing protocol with the highest priority is
preferred.
The following table lists some routing protocols and the default priorities for routes
found by them:
Table 1-1 Routing protocols and priorities of their default route
Routing approach Priority
DIRECT
0
STATIC 60
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 1 IP Routing Protocol Overview
1-4
Note:
z The smaller the priority value, the higher the priority.
z The priority for a direct route is always 0, which you cannot change. Any other type
of routes can have their priorities manually configured.
z Each static route can be configured with a different priority.
1.1.4 Route Backup
You can configure multiple routes to the same destination, expecting the one with the
highest priority to be the primary route and all the rest backup routes.
Route backup can help improve network reliability. Automatic switching can happen
between the primary route and a backup route.
Under normal circumstances, packets are forwarded through the primary route. When
the primary route goes down, the route with the highest priority among the backup
routes is selected to forward packets. When the primary route recovers, the route
selection process is performed again and the primary route is selected again to forward
packets.
1.2 Displaying and Maintaining a Routing Table
To do… Use the command… Remarks
Display brief information
about a routing table
display ip routing-table [ | { begin |
exclude | include }
regular-expression ]
Display detailed information
about a routing table
display ip routing-table verbose
Display information about
routes permitted by a basic
ACL
display ip routing-table acl
acl-number [ verbose ]
Display routes to a specified
destination
display ip routing-table ip-address
[ mask | mask-length ]
[ longer-match ] [ verbose ]
Display routes to specified
destinations
display ip routing-table ip-address1
{ mask1 | mask-length1 } ip-address2
{ mask2 | mask-length2 } [ verbose ]
Display routes discovered
by a routing protocol
display ip routing-table protocol
protocol [ inactive | verbose ]
Display the tree-structured
routing table information
display ip routing-table radix
Display statistics about a
routing table
display ip routing-table statistics
Available in
any view
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 1 IP Routing Protocol Overview
1-5
To do… Use the command… Remarks
Clear statistics about a
routing table
reset ip routing-table statistics
protocol { all | protocol }
Available in
user view
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 2 Static Route Configuration
2-1
Chapter 2 Static Route Configuration
When configuring a static route, go to these sections for information you are interested
in:
z Introduction to Static Route
z Static Route Configuration
z Displaying and Maintaining Static Routes
z Static Route Configuration Example
z Troubleshooting a Static Route
Note:
The term router in this chapter refers to a router in a generic sense or an Ethernet
switch running a routing protocol.
2.1 Introduction to Static Route
2.1.1 Static Route
Static routes are special routes. They are manually configured by the administrator. In a
relatively simple network, you only need to configure static routes to make routers work
normally. Proper configuration and usage of static routes can improve network
performance and ensure sufficient bandwidth for important applications.
When the network topology changes, static routes may become unreachable because
they cannot adapt themselves to the change automatically, thus resulting in network
interruption. In this case, the network administrator needs to modify the configuration of
static routes manually.
Static routes are divided into three types:
z Reachable route: normal route. If a static route to a destination is of this type, the
IP packets destined for this destination will be forwarded to the next hop. It is the
most common type of static routes.
z Unreachable route: route with the reject attribute. If a static route to a destination
has the reject attribute, all the IP packets destined for this destination will be
discarded, and the source hosts will be informed of the unreachability of the
destination.
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 2 Static Route Configuration
2-2
z Blackhole route: route with blackhole attribute. If a static route destined for a
destination has the blackhole attribute, the outgoing interface of this route is the
Null 0 interface regardless of the next hop address, and all the IP packets
addressed to this destination will be dropped without notifying the source hosts.
The attributes reject and blackhole are usually used to limit the range of the
destinations this router can reach, and help troubleshoot the network.
2.1.2 Default Route
To avoid too large a routing table, you can configure a default route.
When the destination address of a packet fails to match any entry in the routing table,
z If there is default route in the routing table, the default route will be selected to
forward the packet.
z If there is no default route, the packet will be discarded and an ICMP Destination
Unreachable or Network Unreachable packet will be returned to the source.
2.2 Static Route Configuration
2.2.1 Configuration Prerequisites
Before configuring a static route, perform the following tasks:
z Configuring the physical parameters of related interfaces
z Configuring IP addresses for related interfaces
2.2.2 Configuring a Static Route
Follow these steps to configure a static route:
To do... Use the command... Remarks
Enter system view
system-view
Configure a static
route
ip route-static ip-address
{ mask | mask-length }
{ interface-type interface-number
| next-hop } [ preference
preference-value ] [ reject |
blackhole ] [ description text ]
Required
By default, the system can
obtain the route to the
subnet directly connected
to the router.
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 2 Static Route Configuration
2-3
Note:
z Use the ip route-static command to configure a default route by setting the
destination IP address and the mask to 0.0.0.0.
z Avoid configuring the next hop address of a static route to the address of an
interface on the local switch.
z Different preferences can be configured to implement flexible route management
policies.
2.3 Displaying and Maintaining Static Routes
To do... Use the command... Remarks
Display the current
configuration information
display current-configuration
Display the brief information of
a routing table
display ip routing-table
Display the detailed
information of a routing table
display ip routing-table verbose
Display the information of
static routes
display ip routing-table protocol
static [ inactive | verbose ]
Available in
any view
Delete all static routes
delete static-routes all
Available in
system view
2.4 Static Route Configuration Example
I. Network requirements
A small company requires that any two nodes in its office network communicate with
each other, and that the network structure be simple and stable. The company hopes
that the existing devices that do not support any dynamic routing protocol can be fully
utilized.
In this case, static routes can implement communication between any two nodes.
II. Network diagram
According to the network requirements, the network topology is designed as shown in
Figure 2-1.
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 2 Static Route Configuration
2-4
Figure 2-1 Network diagram for static route configuration
III. Configuration procedure
Note:
When only one interface of the device is interconnected with another network segment,
you can implement network communication by configuring either a static route or
default route.
1) Perform the following configurations on the switch.
# Approach 1: Configure static routes on Switch A.
<SwitchA> system-view
[SwitchA] ip route-static 1.1.3.0 255.255.255.0 1.1.2.2
[SwitchA] ip route-static 1.1.4.0 255.255.255.0 1.1.2.2
[SwitchA] ip route-static 1.1.5.0 255.255.255.0 1.1.2.2
# Approach 2: Configure a static route on Switch A.
<SwitchA> system-view
[SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.2.2
# Approach 1: Configure static routes on Switch B.
<SwitchB> system-view
[SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.3.1
[SwitchB] ip route-static 1.1.5.0 255.255.255.0 1.1.3.1
[SwitchB] ip route-static 1.1.1.0 255.255.255.0 1.1.3.1
# Approach 2: Configure a static route on Switch B.
<SwitchB> system-view
Operation Manual – Static Route
H3C S3100-52P Ethernet Switch Chapter 2 Static Route Configuration
2-5
[SwitchB] ip route-static 0.0.0.0 0.0.0.0 1.1.3.1
# Configure static routes on Switch C.
<SwitchC> system-view
[SwitchC] ip route-static 1.1.1.0 255.255.255.0 1.1.2.1
[SwitchC] ip route-static 1.1.4.0 255.255.255.0 1.1.3.2
2) Perform the following configurations on the host.
# Set the default gateway address of Host A to 1.1.5.1. Detailed configuration
procedure is omitted.
# Set the default gateway address of Host B to 1.1.4.1. Detailed configuration
procedure is omitted.
# Set the default gateway address of Host C to 1.1.1.1. Detailed configuration
procedure is omitted.
Now, all the hosts and switches in the figure can communicate with each other.
2.5 Troubleshooting a Static Route
Symptom: The switch is not configured with a dynamic routing protocol. Both the
physical status and the link layer protocol status of an interface are UP, but IP packets
cannot be forwarded on the interface.
Solution: Perform the following procedure.
1) Use the display ip routing-table protocol static command to view whether the
corresponding static route is correctly configured.
2) Use the display ip routing-table command to view whether the static route is
valid.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11

H3C S3100-52P Operating instructions

Category
Network switches
Type
Operating instructions

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI